From b37133b06d84f201b1e5502acc57e35da9494a65 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 28 Jun 2024 06:21:18 +0000 Subject: [PATCH] CodeGen from PR 3381 in test-repo-billy/azure-rest-api-specs Merge 9d668e60344f8b868ed4ff859606590cbd4f6c91 into 97e48a41aca64a22522fe1dcb8b8a02b9cbd337d --- .../azure-resourcemanager-scvmm/CHANGELOG.md | 77 +- .../azure-resourcemanager-scvmm/README.md | 21 +- .../azure-resourcemanager-scvmm/SAMPLE.md | 1172 +++-------------- sdk/scvmm/azure-resourcemanager-scvmm/pom.xml | 7 +- .../{ScvmmManager.java => SCVMMManager.java} | 196 +-- .../scvmm/fluent/AvailabilitySetsClient.java | 112 +- .../scvmm/fluent/CloudsClient.java | 112 +- .../scvmm/fluent/GuestAgentsClient.java | 60 +- .../scvmm/fluent/InventoryItemsClient.java | 64 +- .../scvmm/fluent/OperationsClient.java | 2 +- .../{ScvmmClient.java => ScVmmClient.java} | 84 +- .../fluent/VirtualMachineInstancesClient.java | 192 +-- .../fluent/VirtualMachineTemplatesClient.java | 112 +- .../scvmm/fluent/VirtualNetworksClient.java | 112 +- ...InstanceHybridIdentityMetadatasClient.java | 52 +- .../scvmm/fluent/VmmServersClient.java | 112 +- .../fluent/models/AvailabilitySetInner.java | 2 +- .../scvmm/fluent/models/CloudInner.java | 2 +- .../scvmm/fluent/models/GuestAgentInner.java | 2 +- .../fluent/models/InventoryItemInner.java | 2 +- .../scvmm/fluent/models/OperationInner.java | 17 +- .../models/VirtualMachineInstanceInner.java | 41 +- .../models/VirtualMachineTemplateInner.java | 2 +- .../fluent/models/VirtualNetworkInner.java | 2 +- ...VmInstanceHybridIdentityMetadataInner.java | 19 +- .../scvmm/fluent/models/VmmServerInner.java | 2 +- .../scvmm/fluent/models/package-info.java | 6 +- .../scvmm/fluent/package-info.java | 6 +- .../implementation/AvailabilitySetImpl.java | 10 +- .../AvailabilitySetsClientImpl.java | 1048 +++++++-------- .../implementation/AvailabilitySetsImpl.java | 50 +- .../scvmm/implementation/CloudImpl.java | 10 +- .../implementation/CloudsClientImpl.java | 1025 +++++++------- .../scvmm/implementation/CloudsImpl.java | 48 +- .../scvmm/implementation/GuestAgentImpl.java | 8 +- .../implementation/GuestAgentsClientImpl.java | 323 ++--- .../scvmm/implementation/GuestAgentsImpl.java | 28 +- .../implementation/InventoryItemImpl.java | 10 +- .../InventoryItemsClientImpl.java | 370 +++--- .../implementation/InventoryItemsImpl.java | 34 +- .../scvmm/implementation/OperationImpl.java | 8 +- .../implementation/OperationsClientImpl.java | 20 +- .../scvmm/implementation/OperationsImpl.java | 8 +- .../implementation/ResourceManagerUtils.java | 2 +- ...ntBuilder.java => ScVmmClientBuilder.java} | 63 +- ...mmClientImpl.java => ScVmmClientImpl.java} | 190 +-- .../VirtualMachineInstanceImpl.java | 16 +- .../VirtualMachineInstancesClientImpl.java | 949 +++++++------ .../VirtualMachineInstancesImpl.java | 68 +- .../VirtualMachineTemplateImpl.java | 10 +- .../VirtualMachineTemplatesClientImpl.java | 1054 +++++++-------- .../VirtualMachineTemplatesImpl.java | 50 +- .../implementation/VirtualNetworkImpl.java | 10 +- .../VirtualNetworksClientImpl.java | 1040 +++++++-------- .../implementation/VirtualNetworksImpl.java | 48 +- .../VmInstanceHybridIdentityMetadataImpl.java | 8 +- ...anceHybridIdentityMetadatasClientImpl.java | 224 ++-- ...VmInstanceHybridIdentityMetadatasImpl.java | 38 +- .../scvmm/implementation/VmmServerImpl.java | 10 +- .../implementation/VmmServersClientImpl.java | 1006 +++++++------- .../scvmm/implementation/VmmServersImpl.java | 48 +- .../models/AvailabilitySetListResult.java | 4 +- .../models/CloudListResult.java | 4 +- .../models/GuestAgentListResult.java | 4 +- .../models/InventoryItemListResult.java | 4 +- .../models/OperationListResult.java | 22 +- .../VirtualMachineInstanceListResult.java | 4 +- .../VirtualMachineTemplateListResult.java | 4 +- .../models/VirtualNetworkListResult.java | 4 +- ...tanceHybridIdentityMetadataListResult.java | 4 +- .../models/VmmServerListResult.java | 4 +- .../scvmm/implementation/package-info.java | 6 +- .../scvmm/models/ActionType.java | 4 +- .../scvmm/models/AllocationMethod.java | 2 +- .../scvmm/models/AvailabilitySet.java | 2 +- .../scvmm/models/AvailabilitySetListItem.java | 2 +- .../models/AvailabilitySetProperties.java | 2 +- .../models/AvailabilitySetTagsUpdate.java | 2 +- .../scvmm/models/AvailabilitySets.java | 84 +- .../scvmm/models/Checkpoint.java | 52 +- .../resourcemanager/scvmm/models/Cloud.java | 2 +- .../scvmm/models/CloudCapacity.java | 4 +- .../scvmm/models/CloudInventoryItem.java | 2 +- .../scvmm/models/CloudProperties.java | 2 +- .../scvmm/models/CloudTagsUpdate.java | 2 +- .../resourcemanager/scvmm/models/Clouds.java | 82 +- .../scvmm/models/CreateDiffDisk.java | 2 +- .../scvmm/models/DeleteFromHost.java | 4 +- .../scvmm/models/DynamicMemoryEnabled.java | 2 +- .../scvmm/models/ExtendedLocation.java | 2 +- .../scvmm/models/ExtensionResource.java | 145 ++ .../scvmm/models/ForceDelete.java | 4 +- .../scvmm/models/GuestAgent.java | 2 +- .../scvmm/models/GuestAgentProperties.java | 2 +- .../scvmm/models/GuestAgents.java | 56 +- .../scvmm/models/GuestCredential.java | 2 +- .../scvmm/models/HardwareProfile.java | 2 +- .../scvmm/models/HardwareProfileUpdate.java | 2 +- .../scvmm/models/HttpProxyConfiguration.java | 2 +- .../scvmm/models/InfrastructureProfile.java | 2 +- .../models/InfrastructureProfileUpdate.java | 2 +- .../scvmm/models/InventoryItem.java | 2 +- .../scvmm/models/InventoryItemDetails.java | 2 +- .../scvmm/models/InventoryItemProperties.java | 10 +- .../scvmm/models/InventoryItems.java | 60 +- .../scvmm/models/InventoryType.java | 2 +- .../scvmm/models/IsCustomizable.java | 2 +- .../scvmm/models/IsHighlyAvailable.java | 2 +- .../scvmm/models/LimitCpuForMigration.java | 2 +- .../scvmm/models/NetworkInterface.java | 2 +- .../scvmm/models/NetworkInterfaceUpdate.java | 2 +- .../scvmm/models/NetworkProfile.java | 2 +- .../scvmm/models/NetworkProfileUpdate.java | 2 +- .../scvmm/models/Operation.java | 8 +- .../scvmm/models/OperationDisplay.java | 8 +- .../scvmm/models/Operations.java | 2 +- .../resourcemanager/scvmm/models/Origin.java | 2 +- .../scvmm/models/OsProfileForVmInstance.java | 2 +- .../resourcemanager/scvmm/models/OsType.java | 2 +- .../scvmm/models/ProvisioningAction.java | 2 +- .../scvmm/models/ProvisioningState.java | 2 +- .../scvmm/models/SkipShutdown.java | 5 +- .../models/StopVirtualMachineOptions.java | 2 +- .../scvmm/models/StorageProfile.java | 2 +- .../scvmm/models/StorageProfileUpdate.java | 2 +- .../scvmm/models/StorageQosPolicy.java | 74 +- .../scvmm/models/StorageQosPolicyDetails.java | 2 +- .../scvmm/models/VirtualDisk.java | 2 +- .../scvmm/models/VirtualDiskUpdate.java | 2 +- .../VirtualMachineCreateCheckpoint.java | 2 +- .../VirtualMachineDeleteCheckpoint.java | 2 +- .../scvmm/models/VirtualMachineInstance.java | 16 +- .../VirtualMachineInstanceProperties.java | 2 +- .../models/VirtualMachineInstanceUpdate.java | 2 +- ...irtualMachineInstanceUpdateProperties.java | 2 +- .../scvmm/models/VirtualMachineInstances.java | 120 +- .../models/VirtualMachineInventoryItem.java | 2 +- .../VirtualMachineRestoreCheckpoint.java | 2 +- .../scvmm/models/VirtualMachineTemplate.java | 2 +- .../VirtualMachineTemplateInventoryItem.java | 2 +- .../VirtualMachineTemplateProperties.java | 2 +- .../VirtualMachineTemplateTagsUpdate.java | 2 +- .../scvmm/models/VirtualMachineTemplates.java | 84 +- .../scvmm/models/VirtualNetwork.java | 2 +- .../models/VirtualNetworkInventoryItem.java | 2 +- .../models/VirtualNetworkProperties.java | 2 +- .../models/VirtualNetworkTagsUpdate.java | 2 +- .../scvmm/models/VirtualNetworks.java | 84 +- .../VmInstanceHybridIdentityMetadata.java | 2 +- ...tanceHybridIdentityMetadataProperties.java | 30 +- .../VmInstanceHybridIdentityMetadatas.java | 42 +- .../scvmm/models/VmmCredential.java | 2 +- .../scvmm/models/VmmServer.java | 2 +- .../scvmm/models/VmmServerProperties.java | 2 +- .../scvmm/models/VmmServerTagsUpdate.java | 2 +- .../scvmm/models/VmmServers.java | 82 +- .../scvmm/models/package-info.java | 6 +- .../resourcemanager/scvmm/package-info.java | 6 +- .../src/main/java/module-info.java | 3 +- ...AvailabilitySetsCreateOrUpdateSamples.java | 28 +- .../AvailabilitySetsDeleteSamples.java | 23 +- ...labilitySetsGetByResourceGroupSamples.java | 23 +- ...abilitySetsListByResourceGroupSamples.java | 24 +- .../AvailabilitySetsListSamples.java | 24 +- .../AvailabilitySetsUpdateSamples.java | 26 +- .../CloudsCreateOrUpdateSamples.java | 28 +- .../scvmm/generated/CloudsDeleteSamples.java | 22 +- .../CloudsGetByResourceGroupSamples.java | 22 +- .../CloudsListByResourceGroupSamples.java | 23 +- .../scvmm/generated/CloudsListSamples.java | 23 +- .../scvmm/generated/CloudsUpdateSamples.java | 25 +- .../generated/GuestAgentsCreateSamples.java | 23 +- .../generated/GuestAgentsDeleteSamples.java | 23 +- .../generated/GuestAgentsGetSamples.java | 24 +- ...tsListByVirtualMachineInstanceSamples.java | 25 +- .../InventoryItemsCreateSamples.java | 26 +- .../InventoryItemsDeleteSamples.java | 25 +- .../generated/InventoryItemsGetSamples.java | 24 +- .../InventoryItemsListByVmmServerSamples.java | 23 +- .../generated/OperationsListSamples.java | 24 +- ...chineInstancesCreateCheckpointSamples.java | 26 +- ...MachineInstancesCreateOrUpdateSamples.java | 28 +- ...chineInstancesDeleteCheckpointSamples.java | 26 +- .../VirtualMachineInstancesDeleteSamples.java | 23 +- .../VirtualMachineInstancesGetSamples.java | 23 +- .../VirtualMachineInstancesListSamples.java | 23 +- ...VirtualMachineInstancesRestartSamples.java | 23 +- ...hineInstancesRestoreCheckpointSamples.java | 27 +- .../VirtualMachineInstancesStartSamples.java | 23 +- .../VirtualMachineInstancesStopSamples.java | 24 +- .../VirtualMachineInstancesUpdateSamples.java | 24 +- ...MachineTemplatesCreateOrUpdateSamples.java | 30 +- .../VirtualMachineTemplatesDeleteSamples.java | 23 +- ...ineTemplatesGetByResourceGroupSamples.java | 24 +- ...neTemplatesListByResourceGroupSamples.java | 22 +- .../VirtualMachineTemplatesListSamples.java | 22 +- .../VirtualMachineTemplatesUpdateSamples.java | 26 +- .../VirtualNetworksCreateOrUpdateSamples.java | 28 +- .../VirtualNetworksDeleteSamples.java | 23 +- ...tualNetworksGetByResourceGroupSamples.java | 23 +- ...ualNetworksListByResourceGroupSamples.java | 24 +- .../generated/VirtualNetworksListSamples.java | 24 +- .../VirtualNetworksUpdateSamples.java | 26 +- ...anceHybridIdentityMetadatasGetSamples.java | 25 +- ...asListByVirtualMachineInstanceSamples.java | 23 +- .../VmmServersCreateOrUpdateSamples.java | 28 +- .../generated/VmmServersDeleteSamples.java | 23 +- .../VmmServersGetByResourceGroupSamples.java | 24 +- .../VmmServersListByResourceGroupSamples.java | 23 +- .../generated/VmmServersListSamples.java | 23 +- .../generated/VmmServersUpdateSamples.java | 26 +- .../generated/AvailabilitySetInnerTests.java | 37 +- .../AvailabilitySetListItemTests.java | 16 +- .../AvailabilitySetListResultTests.java | 18 +- .../AvailabilitySetPropertiesTests.java | 17 +- .../AvailabilitySetTagsUpdateTests.java | 10 +- ...ailabilitySetsCreateOrUpdateMockTests.java | 32 +- ...tByResourceGroupWithResponseMockTests.java | 22 +- ...ilitySetsListByResourceGroupMockTests.java | 22 +- .../AvailabilitySetsListMockTests.java | 20 +- .../scvmm/generated/CheckpointTests.java | 25 +- .../scvmm/generated/CloudCapacityTests.java | 10 +- .../scvmm/generated/CloudInnerTests.java | 40 +- .../generated/CloudInventoryItemTests.java | 4 +- .../scvmm/generated/CloudListResultTests.java | 20 +- .../scvmm/generated/CloudPropertiesTests.java | 22 +- .../scvmm/generated/CloudTagsUpdateTests.java | 16 +- .../CloudsCreateOrUpdateMockTests.java | 39 +- ...tByResourceGroupWithResponseMockTests.java | 24 +- .../CloudsListByResourceGroupMockTests.java | 25 +- .../scvmm/generated/CloudsListMockTests.java | 22 +- .../generated/ExtendedLocationTests.java | 16 +- .../generated/ExtensionResourceTests.java | 23 + ...uestAgentsDeleteWithResponseMockTests.java | 8 +- .../scvmm/generated/HardwareProfileTests.java | 28 +- .../generated/HardwareProfileUpdateTests.java | 34 +- .../HttpProxyConfigurationTests.java | 10 +- .../generated/InfrastructureProfileTests.java | 58 +- .../InfrastructureProfileUpdateTests.java | 12 +- .../generated/InventoryItemDetailsTests.java | 14 +- .../generated/InventoryItemInnerTests.java | 10 +- .../InventoryItemListResultTests.java | 8 +- .../InventoryItemPropertiesTests.java | 4 +- ...ntoryItemsCreateWithResponseMockTests.java | 16 +- ...ntoryItemsDeleteWithResponseMockTests.java | 8 +- ...nventoryItemsGetWithResponseMockTests.java | 12 +- ...nventoryItemsListByVmmServerMockTests.java | 12 +- .../generated/NetworkInterfaceTests.java | 34 +- .../NetworkInterfaceUpdateTests.java | 28 +- .../scvmm/generated/NetworkProfileTests.java | 64 +- .../generated/NetworkProfileUpdateTests.java | 48 +- .../generated/OperationDisplayTests.java | 12 +- .../scvmm/generated/OperationInnerTests.java | 11 +- .../generated/OperationListResultTests.java | 13 +- .../generated/OperationsListMockTests.java | 15 +- .../StopVirtualMachineOptionsTests.java | 10 +- .../scvmm/generated/StorageProfileTests.java | 94 +- .../generated/StorageProfileUpdateTests.java | 56 +- .../StorageQosPolicyDetailsTests.java | 14 +- .../generated/StorageQosPolicyTests.java | 33 +- .../scvmm/generated/VirtualDiskTests.java | 62 +- .../generated/VirtualDiskUpdateTests.java | 56 +- .../VirtualMachineCreateCheckpointTests.java | 17 +- .../VirtualMachineDeleteCheckpointTests.java | 10 +- ...lMachineInstanceUpdatePropertiesTests.java | 167 +-- .../VirtualMachineInstanceUpdateTests.java | 193 +-- .../VirtualMachineInventoryItemTests.java | 22 +- .../VirtualMachineRestoreCheckpointTests.java | 10 +- .../VirtualMachineTemplateInnerTests.java | 44 +- ...tualMachineTemplateInventoryItemTests.java | 4 +- ...VirtualMachineTemplateListResultTests.java | 20 +- ...VirtualMachineTemplatePropertiesTests.java | 23 +- ...VirtualMachineTemplateTagsUpdateTests.java | 12 +- ...chineTemplatesCreateOrUpdateMockTests.java | 39 +- ...tByResourceGroupWithResponseMockTests.java | 24 +- ...TemplatesListByResourceGroupMockTests.java | 24 +- .../VirtualMachineTemplatesListMockTests.java | 22 +- .../generated/VirtualNetworkInnerTests.java | 44 +- .../VirtualNetworkInventoryItemTests.java | 4 +- .../VirtualNetworkListResultTests.java | 20 +- .../VirtualNetworkPropertiesTests.java | 22 +- .../VirtualNetworkTagsUpdateTests.java | 16 +- ...irtualNetworksCreateOrUpdateMockTests.java | 37 +- ...tByResourceGroupWithResponseMockTests.java | 24 +- ...lNetworksListByResourceGroupMockTests.java | 24 +- .../VirtualNetworksListMockTests.java | 22 +- .../generated/VmmServerTagsUpdateTests.java | 12 +- .../tsp-location.yaml | 4 + 288 files changed, 6857 insertions(+), 8220 deletions(-) rename sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/{ScvmmManager.java => SCVMMManager.java} (91%) rename sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/{ScvmmClient.java => ScVmmClient.java} (93%) rename sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/{ScvmmClientBuilder.java => ScVmmClientBuilder.java} (71%) rename sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/{ScvmmClientImpl.java => ScVmmClientImpl.java} (95%) rename sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/{ => implementation}/models/AvailabilitySetListResult.java (96%) rename sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/{ => implementation}/models/CloudListResult.java (96%) rename sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/{ => implementation}/models/GuestAgentListResult.java (96%) rename sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/{ => implementation}/models/InventoryItemListResult.java (96%) rename sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/{ => implementation}/models/OperationListResult.java (76%) rename sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/{ => implementation}/models/VirtualMachineInstanceListResult.java (96%) rename sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/{ => implementation}/models/VirtualMachineTemplateListResult.java (96%) rename sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/{ => implementation}/models/VirtualNetworkListResult.java (96%) rename sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/{ => implementation}/models/VmInstanceHybridIdentityMetadataListResult.java (97%) rename sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/{ => implementation}/models/VmmServerListResult.java (96%) create mode 100644 sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ExtensionResource.java create mode 100644 sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/ExtensionResourceTests.java create mode 100644 sdk/scvmm/azure-resourcemanager-scvmm/tsp-location.yaml diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/CHANGELOG.md b/sdk/scvmm/azure-resourcemanager-scvmm/CHANGELOG.md index d8d0a6b22065..1d2e6af01df0 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/CHANGELOG.md +++ b/sdk/scvmm/azure-resourcemanager-scvmm/CHANGELOG.md @@ -1,14 +1,83 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2024-06-28) -### Features Added +- Azure Resource Manager SCVMM client library for Java. This package contains Microsoft Azure SDK for SCVMM Management SDK. The Microsoft.ScVmm Rest API spec. 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 +* `ScvmmManager$Configurable` was removed + +* `models.InventoryItemListResult` was removed + +* `models.VmInstanceHybridIdentityMetadataListResult` was removed + +* `models.VirtualMachineTemplateListResult` was removed + +* `models.VirtualNetworkListResult` was removed + +* `models.AvailabilitySetListResult` was removed + +* `models.OperationListResult` was removed + +* `models.VmmServerListResult` was removed + +* `models.CloudListResult` was removed + +* `ScvmmManager` was removed + +* `models.VirtualMachineInstanceListResult` was removed + +* `models.GuestAgentListResult` was removed + +#### `models.Checkpoint` was modified + +* `withName(java.lang.String)` was removed +* `withParentCheckpointId(java.lang.String)` was removed +* `withCheckpointId(java.lang.String)` was removed +* `withDescription(java.lang.String)` was removed + +#### `models.StorageQosPolicy` was modified + +* `withBandwidthLimit(java.lang.Long)` was removed +* `withIopsMaximum(java.lang.Long)` was removed +* `withIopsMinimum(java.lang.Long)` was removed +* `withPolicyId(java.lang.String)` was removed +* `withId(java.lang.String)` was removed +* `withName(java.lang.String)` was removed + +#### `models.VmInstanceHybridIdentityMetadataProperties` was modified + +* `withResourceUid(java.lang.String)` was removed +* `withPublicKey(java.lang.String)` was removed + +### Features Added + +* `implementation.models.VirtualMachineInstanceListResult` was added + +* `implementation.models.VmmServerListResult` was added + +* `SCVMMManager` was added + +* `SCVMMManager$Configurable` was added + +* `implementation.models.VirtualNetworkListResult` was added + +* `implementation.models.InventoryItemListResult` was added + +* `implementation.models.GuestAgentListResult` was added + +* `implementation.models.VirtualMachineTemplateListResult` was added + +* `implementation.models.AvailabilitySetListResult` was added + +* `implementation.models.VmInstanceHybridIdentityMetadataListResult` was added + +* `implementation.models.OperationListResult` was added + +* `implementation.models.CloudListResult` was added -### Other Changes +* `models.ExtensionResource` was added ## 1.0.0 (2024-06-26) diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/README.md b/sdk/scvmm/azure-resourcemanager-scvmm/README.md index d95947c8ea27..3fddba596a20 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/README.md +++ b/sdk/scvmm/azure-resourcemanager-scvmm/README.md @@ -1,8 +1,8 @@ -# Azure Resource Manager Scvmm client library for Java +# Azure Resource Manager SCVMM client library for Java -Azure Resource Manager Scvmm client library for Java. +Azure Resource Manager SCVMM client library for Java. -This package contains Microsoft Azure SDK for Scvmm Management SDK. SCVMM Client. Package tag package-2023-10. 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 SCVMM Management SDK. The Microsoft.ScVmm Rest API spec. 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-scvmm - 1.0.0 + 1.1.0-beta.1 ``` [//]: # ({x-version-update-end}) @@ -45,18 +45,22 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package. +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. -Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. +- `AZURE_CLIENT_ID` for Azure client ID. +- `AZURE_TENANT_ID` for Azure tenant ID. +- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. -Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. + +With above configuration, `azure` client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); -ScvmmManager manager = ScvmmManager +SCVMMManager manager = SCVMMManager .authenticate(credential, profile); ``` @@ -93,7 +97,6 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity -[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/SAMPLE.md b/sdk/scvmm/azure-resourcemanager-scvmm/SAMPLE.md index ee8b2ac27666..8f1b152e0aa5 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/SAMPLE.md +++ b/sdk/scvmm/azure-resourcemanager-scvmm/SAMPLE.md @@ -95,33 +95,15 @@ import java.util.Map; */ public final class AvailabilitySetsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_CreateOrUpdate_MinimumSet_Gen.json - */ - /** - * Sample code: AvailabilitySets_CreateOrUpdate_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void availabilitySetsCreateOrUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.availabilitySets() - .define("_") - .withRegion("jelevilan") - .withExistingResourceGroup("rgscvmm") - .withExtendedLocation(new ExtendedLocation()) - .create(); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/AvailabilitySets_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: AvailabilitySets_CreateOrUpdate_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void availabilitySetsCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void availabilitySetsCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.availabilitySets() .define("-") .withRegion("jelevilan") @@ -160,30 +142,17 @@ import com.azure.resourcemanager.scvmm.models.ForceDelete; */ public final class AvailabilitySetsDeleteSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_Delete_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/AvailabilitySets_Delete_MaximumSet_Gen.json */ /** * Sample code: AvailabilitySets_Delete_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void availabilitySetsDeleteMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void availabilitySetsDeleteMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.availabilitySets().delete("rgscvmm", "_", ForceDelete.TRUE, com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_Delete_MinimumSet_Gen.json - */ - /** - * Sample code: AvailabilitySets_Delete_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void availabilitySetsDeleteMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.availabilitySets().delete("rgscvmm", "6", null, com.azure.core.util.Context.NONE); - } } ``` @@ -195,28 +164,15 @@ public final class AvailabilitySetsDeleteSamples { */ public final class AvailabilitySetsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_Get_MinimumSet_Gen.json - */ - /** - * Sample code: AvailabilitySets_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void availabilitySetsGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.availabilitySets().getByResourceGroupWithResponse("rgscvmm", "V", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_Get_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/AvailabilitySets_Get_MaximumSet_Gen.json */ /** * Sample code: AvailabilitySets_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void availabilitySetsGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void availabilitySetsGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.availabilitySets().getByResourceGroupWithResponse("rgscvmm", "-", com.azure.core.util.Context.NONE); } } @@ -230,30 +186,16 @@ public final class AvailabilitySetsGetByResourceGroupSamples { */ public final class AvailabilitySetsListSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_ListBySubscription_MinimumSet_Gen.json - */ - /** - * Sample code: AvailabilitySets_ListBySubscription_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - availabilitySetsListBySubscriptionMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.availabilitySets().list(com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/AvailabilitySets_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: AvailabilitySets_ListBySubscription_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - availabilitySetsListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + availabilitySetsListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.availabilitySets().list(com.azure.core.util.Context.NONE); } } @@ -267,30 +209,16 @@ public final class AvailabilitySetsListSamples { */ public final class AvailabilitySetsListByResourceGroupSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_ListByResourceGroup_MinimumSet_Gen.json - */ - /** - * Sample code: AvailabilitySets_ListByResourceGroup_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - availabilitySetsListByResourceGroupMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.availabilitySets().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/AvailabilitySets_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: AvailabilitySets_ListByResourceGroup_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - availabilitySetsListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + availabilitySetsListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.availabilitySets().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); } } @@ -308,31 +236,15 @@ import java.util.Map; */ public final class AvailabilitySetsUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_Update_MinimumSet_Gen.json - */ - /** - * Sample code: AvailabilitySets_Update_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void availabilitySetsUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - AvailabilitySet resource = manager.availabilitySets() - .getByResourceGroupWithResponse("rgscvmm", "1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_Update_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/AvailabilitySets_Update_MaximumSet_Gen.json */ /** * Sample code: AvailabilitySets_Update_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void availabilitySetsUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void availabilitySetsUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { AvailabilitySet resource = manager.availabilitySets() .getByResourceGroupWithResponse("rgscvmm", "-", com.azure.core.util.Context.NONE) .getValue(); @@ -366,33 +278,15 @@ import java.util.Map; */ public final class CloudsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * Clouds_CreateOrUpdate_MinimumSet_Gen.json - */ - /** - * Sample code: Clouds_CreateOrUpdate_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void cloudsCreateOrUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.clouds() - .define("-") - .withRegion("khwsdmaxfhmbu") - .withExistingResourceGroup("rgscvmm") - .withExtendedLocation(new ExtendedLocation()) - .create(); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * Clouds_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/Clouds_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: Clouds_CreateOrUpdate_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void cloudsCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void cloudsCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.clouds() .define("2") .withRegion("khwsdmaxfhmbu") @@ -432,30 +326,16 @@ import com.azure.resourcemanager.scvmm.models.ForceDelete; */ public final class CloudsDeleteSamples { /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/Clouds_Delete_MaximumSet_Gen.json */ /** * Sample code: Clouds_Delete_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void cloudsDeleteMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void cloudsDeleteMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.clouds().delete("rgscvmm", "-", ForceDelete.TRUE, com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Delete_MinimumSet_Gen.json - */ - /** - * Sample code: Clouds_Delete_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void cloudsDeleteMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.clouds().delete("rgscvmm", "1", null, com.azure.core.util.Context.NONE); - } } ``` @@ -467,30 +347,16 @@ public final class CloudsDeleteSamples { */ public final class CloudsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/Clouds_Get_MaximumSet_Gen.json */ /** * Sample code: Clouds_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void cloudsGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void cloudsGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.clouds().getByResourceGroupWithResponse("rgscvmm", "_", com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Get_MinimumSet_Gen.json - */ - /** - * Sample code: Clouds_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void cloudsGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.clouds().getByResourceGroupWithResponse("rgscvmm", "i", com.azure.core.util.Context.NONE); - } } ``` @@ -502,28 +368,15 @@ public final class CloudsGetByResourceGroupSamples { */ public final class CloudsListSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * Clouds_ListBySubscription_MinimumSet_Gen.json - */ - /** - * Sample code: Clouds_ListBySubscription_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void cloudsListBySubscriptionMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.clouds().list(com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * Clouds_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/Clouds_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: Clouds_ListBySubscription_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void cloudsListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void cloudsListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.clouds().list(com.azure.core.util.Context.NONE); } } @@ -537,28 +390,15 @@ public final class CloudsListSamples { */ public final class CloudsListByResourceGroupSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * Clouds_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/Clouds_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: Clouds_ListByResourceGroup_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void cloudsListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.clouds().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * Clouds_ListByResourceGroup_MinimumSet_Gen.json - */ - /** - * Sample code: Clouds_ListByResourceGroup_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void cloudsListByResourceGroupMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void cloudsListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.clouds().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); } } @@ -576,31 +416,14 @@ import java.util.Map; */ public final class CloudsUpdateSamples { /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Update_MinimumSet_Gen.json - */ - /** - * Sample code: Clouds_Update_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void cloudsUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - Cloud resource = manager.clouds() - .getByResourceGroupWithResponse("rgscvmm", "_", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/Clouds_Update_MaximumSet_Gen.json */ /** * Sample code: Clouds_Update_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void cloudsUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void cloudsUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { Cloud resource = manager.clouds() .getByResourceGroupWithResponse("rgscvmm", "P", com.azure.core.util.Context.NONE) .getValue(); @@ -636,29 +459,14 @@ import com.azure.resourcemanager.scvmm.models.ProvisioningAction; public final class GuestAgentsCreateSamples { /* * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Create_MinimumSet_Gen - * .json - */ - /** - * Sample code: GuestAgents_Create_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void guestAgentsCreateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.guestAgents().create("gtgclehcbsyave", new GuestAgentInner(), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Create_MaximumSet_Gen - * .json + * specification/scvmm/ScVmm.Management/examples/2023-10-07/GuestAgents_Create_MaximumSet_Gen.json */ /** * Sample code: GuestAgents_Create_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void guestAgentsCreateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void guestAgentsCreateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.guestAgents() .create("gtgclehcbsyave", new GuestAgentInner().withProperties(new GuestAgentProperties() @@ -680,29 +488,14 @@ public final class GuestAgentsCreateSamples { public final class GuestAgentsDeleteSamples { /* * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Delete_MaximumSet_Gen - * .json + * specification/scvmm/ScVmm.Management/examples/2023-10-07/GuestAgents_Delete_MaximumSet_Gen.json */ /** * Sample code: GuestAgents_Delete_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void guestAgentsDeleteMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.guestAgents().deleteWithResponse("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Delete_MinimumSet_Gen - * .json - */ - /** - * Sample code: GuestAgents_Delete_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void guestAgentsDeleteMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void guestAgentsDeleteMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.guestAgents().deleteWithResponse("gtgclehcbsyave", com.azure.core.util.Context.NONE); } } @@ -716,30 +509,14 @@ public final class GuestAgentsDeleteSamples { */ public final class GuestAgentsGetSamples { /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Get_MaximumSet_Gen. - * json + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/GuestAgents_Get_MaximumSet_Gen.json */ /** * Sample code: GuestAgents_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. - */ - public static void guestAgentsGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.guestAgents().getWithResponse("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Get_MinimumSet_Gen. - * json - */ - /** - * Sample code: GuestAgents_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void guestAgentsGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void guestAgentsGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.guestAgents().getWithResponse("gtgclehcbsyave", com.azure.core.util.Context.NONE); } } @@ -753,30 +530,17 @@ public final class GuestAgentsGetSamples { */ public final class GuestAgentsListByVirtualMachineInstanceSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * GuestAgents_ListByVirtualMachineInstance_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/GuestAgents_ListByVirtualMachineInstance_MaximumSet_Gen. + * json */ /** * Sample code: GuestAgents_ListByVirtualMachineInstance_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - guestAgentsListByVirtualMachineInstanceMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.guestAgents().listByVirtualMachineInstance("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * GuestAgents_ListByVirtualMachineInstance_MinimumSet_Gen.json - */ - /** - * Sample code: GuestAgents_ListByVirtualMachineInstance_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - guestAgentsListByVirtualMachineInstanceMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + guestAgentsListByVirtualMachineInstanceMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.guestAgents().listByVirtualMachineInstance("gtgclehcbsyave", com.azure.core.util.Context.NONE); } } @@ -792,31 +556,15 @@ import com.azure.resourcemanager.scvmm.models.InventoryItemProperties; */ public final class InventoryItemsCreateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * InventoryItems_Create_MinimumSet_Gen.json - */ - /** - * Sample code: InventoryItems_Create_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void inventoryItemsCreateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.inventoryItems() - .define("bbFb0cBb-50ce-4bfc-3eeD-bC26AbCC257a") - .withExistingVmmServer("rgscvmm", ".") - .create(); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * InventoryItems_Create_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/InventoryItems_Create_MaximumSet_Gen.json */ /** * Sample code: InventoryItems_Create_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void inventoryItemsCreateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void inventoryItemsCreateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.inventoryItems() .define("1BdDc2Ab-bDd9-Ebd6-bfdb-C0dbbdB5DEDf") .withExistingVmmServer("rgscvmm", "O") @@ -835,34 +583,19 @@ public final class InventoryItemsCreateSamples { */ public final class InventoryItemsDeleteSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * InventoryItems_Delete_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/InventoryItems_Delete_MaximumSet_Gen.json */ /** * Sample code: InventoryItems_Delete_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void inventoryItemsDeleteMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void inventoryItemsDeleteMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.inventoryItems() .deleteWithResponse("rgscvmm", "b", "EcECadfd-Eaaa-e5Ce-ebdA-badeEd3c6af1", com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * InventoryItems_Delete_MinimumSet_Gen.json - */ - /** - * Sample code: InventoryItems_Delete_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void inventoryItemsDeleteMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.inventoryItems() - .deleteWithResponse("rgscvmm", "_", "cDBcbae6-BC3d-52fe-CedC-7eFeaBFabb82", - com.azure.core.util.Context.NONE); - } } ``` @@ -875,30 +608,14 @@ public final class InventoryItemsDeleteSamples { public final class InventoryItemsGetSamples { /* * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Get_MinimumSet_Gen - * .json - */ - /** - * Sample code: InventoryItems_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void inventoryItemsGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.inventoryItems() - .getWithResponse("rgscvmm", "_", "cacb8Ceb-efAC-bebb-ae7C-dec8C5Bb7100", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Get_MaximumSet_Gen - * .json + * specification/scvmm/ScVmm.Management/examples/2023-10-07/InventoryItems_Get_MaximumSet_Gen.json */ /** * Sample code: InventoryItems_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void inventoryItemsGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void inventoryItemsGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.inventoryItems() .getWithResponse("rgscvmm", "1", "2bFBede6-EEf8-becB-dBbd-B96DbBFdB3f3", com.azure.core.util.Context.NONE); } @@ -913,30 +630,17 @@ public final class InventoryItemsGetSamples { */ public final class InventoryItemsListByVmmServerSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * InventoryItems_ListByVmmServer_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/InventoryItems_ListByVmmServer_MaximumSet_Gen.json */ /** * Sample code: InventoryItems_ListByVmmServer_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void inventoryItemsListByVmmServerMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void inventoryItemsListByVmmServerMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.inventoryItems().listByVmmServer("rgscvmm", "X", com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * InventoryItems_ListByVmmServer_MinimumSet_Gen.json - */ - /** - * Sample code: InventoryItems_ListByVmmServer_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void inventoryItemsListByVmmServerMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.inventoryItems().listByVmmServer("rgscvmm", "H", com.azure.core.util.Context.NONE); - } } ``` @@ -948,30 +652,14 @@ public final class InventoryItemsListByVmmServerSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Operations_List_MinimumSet_Gen. - * json - */ - /** - * Sample code: Operations_List_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void operationsListMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Operations_List_MaximumSet_Gen. - * json + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/Operations_List_MaximumSet_Gen.json */ /** * Sample code: Operations_List_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void operationsListMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void operationsListMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } @@ -987,35 +675,21 @@ import com.azure.resourcemanager.scvmm.models.VirtualMachineCreateCheckpoint; */ public final class VirtualMachineInstancesCreateCheckpointSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_CreateCheckpoint_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_CreateCheckpoint_MaximumSet_Gen. + * json */ /** * Sample code: VirtualMachineInstances_CreateCheckpoint_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualMachineInstancesCreateCheckpointMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualMachineInstancesCreateCheckpointMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances() .createCheckpoint("gtgclehcbsyave", new VirtualMachineCreateCheckpoint().withName("ilvltf") .withDescription("zoozhfbepldrgpjqsbhpqebtodrhvy"), com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_CreateCheckpoint_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_CreateCheckpoint_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualMachineInstancesCreateCheckpointMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances() - .createCheckpoint("gtgclehcbsyave", new VirtualMachineCreateCheckpoint(), com.azure.core.util.Context.NONE); - } } ``` @@ -1045,16 +719,17 @@ import java.util.Arrays; */ public final class VirtualMachineInstancesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_CreateOrUpdate_MaximumSet_Gen. + * json */ /** * Sample code: VirtualMachineInstances_CreateOrUpdate_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualMachineInstancesCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualMachineInstancesCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances() .createOrUpdate("gtgclehcbsyave", new VirtualMachineInstanceInner() .withProperties(new VirtualMachineInstanceProperties() @@ -1106,23 +781,6 @@ public final class VirtualMachineInstancesCreateOrUpdateSamples { "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName")), com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_CreateOrUpdate_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_CreateOrUpdate_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualMachineInstancesCreateOrUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances() - .createOrUpdate("gtgclehcbsyave", - new VirtualMachineInstanceInner().withExtendedLocation(new ExtendedLocation()), - com.azure.core.util.Context.NONE); - } } ``` @@ -1137,31 +795,18 @@ import com.azure.resourcemanager.scvmm.models.ForceDelete; */ public final class VirtualMachineInstancesDeleteSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Delete_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_Delete_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineInstances_Delete_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineInstancesDeleteMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineInstancesDeleteMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances() .delete("gtgclehcbsyave", ForceDelete.TRUE, DeleteFromHost.TRUE, com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Delete_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_Delete_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineInstancesDeleteMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances().delete("gtgclehcbsyave", null, null, com.azure.core.util.Context.NONE); - } } ``` @@ -1175,36 +820,22 @@ import com.azure.resourcemanager.scvmm.models.VirtualMachineDeleteCheckpoint; */ public final class VirtualMachineInstancesDeleteCheckpointSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_DeleteCheckpoint_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_DeleteCheckpoint_MaximumSet_Gen. + * json */ /** * Sample code: VirtualMachineInstances_DeleteCheckpoint_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualMachineInstancesDeleteCheckpointMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualMachineInstancesDeleteCheckpointMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances() .deleteCheckpoint("gtgclehcbsyave", new VirtualMachineDeleteCheckpoint().withId("eenfflimcbgqfsebdusophahjpk"), com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_DeleteCheckpoint_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_DeleteCheckpoint_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualMachineInstancesDeleteCheckpointMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances() - .deleteCheckpoint("gtgclehcbsyave", new VirtualMachineDeleteCheckpoint(), com.azure.core.util.Context.NONE); - } } ``` @@ -1216,28 +847,15 @@ public final class VirtualMachineInstancesDeleteCheckpointSamples { */ public final class VirtualMachineInstancesGetSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Get_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineInstancesGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances().getWithResponse("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Get_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_Get_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineInstances_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineInstancesGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineInstancesGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances().getWithResponse("gtgclehcbsyave", com.azure.core.util.Context.NONE); } } @@ -1247,32 +865,19 @@ public final class VirtualMachineInstancesGetSamples { ```java /** - * Samples for VirtualMachineInstances List. - */ -public final class VirtualMachineInstancesListSamples { - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_List_MaximumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_List_MaximumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineInstancesListMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances().list("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - + * Samples for VirtualMachineInstances List. + */ +public final class VirtualMachineInstancesListSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_List_MinimumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_List_MaximumSet_Gen.json */ /** - * Sample code: VirtualMachineInstances_List_MinimumSet. + * Sample code: VirtualMachineInstances_List_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineInstancesListMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineInstancesListMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances().list("gtgclehcbsyave", com.azure.core.util.Context.NONE); } } @@ -1286,28 +891,15 @@ public final class VirtualMachineInstancesListSamples { */ public final class VirtualMachineInstancesRestartSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Restart_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_Restart_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineInstances_Restart_MaximumSet. * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineInstancesRestartMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances().restart("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Restart_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_Restart_MinimumSet. - * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineInstancesRestartMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineInstancesRestartMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances().restart("gtgclehcbsyave", com.azure.core.util.Context.NONE); } } @@ -1323,32 +915,17 @@ import com.azure.resourcemanager.scvmm.models.VirtualMachineRestoreCheckpoint; */ public final class VirtualMachineInstancesRestoreCheckpointSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_RestoreCheckpoint_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_RestoreCheckpoint_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualMachineInstancesRestoreCheckpointMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances() - .restoreCheckpoint("gtgclehcbsyave", new VirtualMachineRestoreCheckpoint(), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_RestoreCheckpoint_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_RestoreCheckpoint_MaximumSet_Gen + * .json */ /** * Sample code: VirtualMachineInstances_RestoreCheckpoint_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualMachineInstancesRestoreCheckpointMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualMachineInstancesRestoreCheckpointMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances() .restoreCheckpoint("gtgclehcbsyave", new VirtualMachineRestoreCheckpoint().withId("rweqduwzsn"), com.azure.core.util.Context.NONE); @@ -1364,28 +941,15 @@ public final class VirtualMachineInstancesRestoreCheckpointSamples { */ public final class VirtualMachineInstancesStartSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Start_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_Start_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineInstancesStartMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances().start("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Start_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_Start_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineInstances_Start_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineInstancesStartMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineInstancesStartMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances().start("gtgclehcbsyave", com.azure.core.util.Context.NONE); } } @@ -1402,33 +966,19 @@ import com.azure.resourcemanager.scvmm.models.StopVirtualMachineOptions; */ public final class VirtualMachineInstancesStopSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Stop_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_Stop_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineInstances_Stop_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineInstancesStopMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineInstancesStopMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances() .stop("gtgclehcbsyave", new StopVirtualMachineOptions().withSkipShutdown(SkipShutdown.TRUE), com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Stop_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_Stop_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineInstancesStopMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances() - .stop("gtgclehcbsyave", new StopVirtualMachineOptions(), com.azure.core.util.Context.NONE); - } } ``` @@ -1455,29 +1005,15 @@ import java.util.Arrays; */ public final class VirtualMachineInstancesUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Update_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_Update_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineInstancesUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances() - .update("gtgclehcbsyave", new VirtualMachineInstanceUpdate(), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Update_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_Update_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineInstances_Update_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineInstancesUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineInstancesUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances() .update("gtgclehcbsyave", new VirtualMachineInstanceUpdate().withProperties(new VirtualMachineInstanceUpdateProperties() @@ -1528,35 +1064,17 @@ import java.util.Map; */ public final class VirtualMachineTemplatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_CreateOrUpdate_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineTemplates_CreateOrUpdate_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualMachineTemplatesCreateOrUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineTemplates() - .define("P") - .withRegion("ayxsyduviotylbojh") - .withExistingResourceGroup("rgscvmm") - .withExtendedLocation(new ExtendedLocation()) - .create(); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineTemplates_CreateOrUpdate_MaximumSet_Gen. + * json */ /** * Sample code: VirtualMachineTemplates_CreateOrUpdate_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualMachineTemplatesCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualMachineTemplatesCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineTemplates() .define("6") .withRegion("ayxsyduviotylbojh") @@ -1596,28 +1114,15 @@ import com.azure.resourcemanager.scvmm.models.ForceDelete; */ public final class VirtualMachineTemplatesDeleteSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_Delete_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineTemplates_Delete_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineTemplatesDeleteMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineTemplates().delete("rgscvmm", "5", null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_Delete_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineTemplates_Delete_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineTemplates_Delete_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineTemplatesDeleteMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineTemplatesDeleteMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineTemplates().delete("rgscvmm", "6", ForceDelete.TRUE, com.azure.core.util.Context.NONE); } } @@ -1631,29 +1136,15 @@ public final class VirtualMachineTemplatesDeleteSamples { */ public final class VirtualMachineTemplatesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_Get_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineTemplates_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineTemplatesGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineTemplates() - .getByResourceGroupWithResponse("rgscvmm", "m", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_Get_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineTemplates_Get_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineTemplates_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineTemplatesGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineTemplatesGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineTemplates() .getByResourceGroupWithResponse("rgscvmm", "4", com.azure.core.util.Context.NONE); } @@ -1668,30 +1159,16 @@ public final class VirtualMachineTemplatesGetByResourceGroupSamples { */ public final class VirtualMachineTemplatesListSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/ * VirtualMachineTemplates_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineTemplates_ListBySubscription_MaximumSet. * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualMachineTemplatesListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineTemplates().list(com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_ListBySubscription_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineTemplates_ListBySubscription_MinimumSet. - * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualMachineTemplatesListBySubscriptionMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualMachineTemplatesListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineTemplates().list(com.azure.core.util.Context.NONE); } } @@ -1705,30 +1182,16 @@ public final class VirtualMachineTemplatesListSamples { */ public final class VirtualMachineTemplatesListByResourceGroupSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_ListByResourceGroup_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineTemplates_ListByResourceGroup_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualMachineTemplatesListByResourceGroupMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineTemplates().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/ * VirtualMachineTemplates_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineTemplates_ListByResourceGroup_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualMachineTemplatesListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualMachineTemplatesListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineTemplates().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); } } @@ -1746,37 +1209,21 @@ import java.util.Map; */ public final class VirtualMachineTemplatesUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_Update_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineTemplates_Update_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineTemplates_Update_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineTemplatesUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineTemplatesUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { VirtualMachineTemplate resource = manager.virtualMachineTemplates() .getByResourceGroupWithResponse("rgscvmm", "g", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("key6634", "fakeTokenPlaceholder")).apply(); } - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_Update_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineTemplates_Update_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineTemplatesUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - VirtualMachineTemplate resource = manager.virtualMachineTemplates() - .getByResourceGroupWithResponse("rgscvmm", "-", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } - // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { @@ -1804,15 +1251,15 @@ import java.util.Map; */ public final class VirtualNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualNetworks_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: VirtualNetworks_CreateOrUpdate_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualNetworksCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualNetworksCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualNetworks() .define("_") .withRegion("fky") @@ -1828,24 +1275,6 @@ public final class VirtualNetworksCreateOrUpdateSamples { .create(); } - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_CreateOrUpdate_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualNetworks_CreateOrUpdate_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualNetworksCreateOrUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualNetworks() - .define("-") - .withRegion("fky") - .withExistingResourceGroup("rgscvmm") - .withExtendedLocation(new ExtendedLocation()) - .create(); - } - // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { @@ -1870,30 +1299,17 @@ import com.azure.resourcemanager.scvmm.models.ForceDelete; */ public final class VirtualNetworksDeleteSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_Delete_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualNetworks_Delete_MaximumSet_Gen.json */ /** * Sample code: VirtualNetworks_Delete_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualNetworksDeleteMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualNetworksDeleteMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualNetworks().delete("rgscvmm", ".", ForceDelete.TRUE, com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_Delete_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualNetworks_Delete_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualNetworksDeleteMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualNetworks().delete("rgscvmm", "1", null, com.azure.core.util.Context.NONE); - } } ``` @@ -1905,30 +1321,17 @@ public final class VirtualNetworksDeleteSamples { */ public final class VirtualNetworksGetByResourceGroupSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_Get_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualNetworks_Get_MaximumSet_Gen.json */ /** * Sample code: VirtualNetworks_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualNetworksGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualNetworksGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualNetworks().getByResourceGroupWithResponse("rgscvmm", "2", com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_Get_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualNetworks_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualNetworksGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualNetworks().getByResourceGroupWithResponse("rgscvmm", "-", com.azure.core.util.Context.NONE); - } } ``` @@ -1940,30 +1343,16 @@ public final class VirtualNetworksGetByResourceGroupSamples { */ public final class VirtualNetworksListSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_ListBySubscription_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualNetworks_ListBySubscription_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualNetworksListBySubscriptionMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualNetworks().list(com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualNetworks_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: VirtualNetworks_ListBySubscription_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualNetworksListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualNetworksListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualNetworks().list(com.azure.core.util.Context.NONE); } } @@ -1977,30 +1366,16 @@ public final class VirtualNetworksListSamples { */ public final class VirtualNetworksListByResourceGroupSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_ListByResourceGroup_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualNetworks_ListByResourceGroup_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualNetworksListByResourceGroupMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualNetworks().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualNetworks_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: VirtualNetworks_ListByResourceGroup_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualNetworksListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualNetworksListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualNetworks().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); } } @@ -2018,31 +1393,15 @@ import java.util.Map; */ public final class VirtualNetworksUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_Update_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualNetworks_Update_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualNetworksUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - VirtualNetwork resource = manager.virtualNetworks() - .getByResourceGroupWithResponse("rgscvmm", "-", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_Update_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualNetworks_Update_MaximumSet_Gen.json */ /** * Sample code: VirtualNetworks_Update_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualNetworksUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualNetworksUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { VirtualNetwork resource = manager.virtualNetworks() .getByResourceGroupWithResponse("rgscvmm", "S", com.azure.core.util.Context.NONE) .getValue(); @@ -2071,30 +1430,17 @@ public final class VirtualNetworksUpdateSamples { */ public final class VmInstanceHybridIdentityMetadatasGetSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmInstanceHybridIdentityMetadatas_Get_MinimumSet_Gen.json - */ - /** - * Sample code: VmInstanceHybridIdentityMetadatas_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - vmInstanceHybridIdentityMetadatasGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.vmInstanceHybridIdentityMetadatas().getWithResponse("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmInstanceHybridIdentityMetadatas_Get_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VmInstanceHybridIdentityMetadatas_Get_MaximumSet_Gen. + * json */ /** * Sample code: VmInstanceHybridIdentityMetadatas_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - vmInstanceHybridIdentityMetadatasGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + vmInstanceHybridIdentityMetadatasGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.vmInstanceHybridIdentityMetadatas().getWithResponse("gtgclehcbsyave", com.azure.core.util.Context.NONE); } } @@ -2108,31 +1454,16 @@ public final class VmInstanceHybridIdentityMetadatasGetSamples { */ public final class VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/ * VmInstanceHybridIdentityMetadatas_ListByVirtualMachineInstance_MaximumSet_Gen.json */ /** * Sample code: VmInstanceHybridIdentityMetadatas_ListByVirtualMachineInstance_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceMaximumSet( - com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.vmInstanceHybridIdentityMetadatas() - .listByVirtualMachineInstance("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmInstanceHybridIdentityMetadatas_ListByVirtualMachineInstance_MinimumSet_Gen.json - */ - /** - * Sample code: VmInstanceHybridIdentityMetadatas_ListByVirtualMachineInstance_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceMinimumSet( - com.azure.resourcemanager.scvmm.ScvmmManager manager) { + com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.vmInstanceHybridIdentityMetadatas() .listByVirtualMachineInstance("gtgclehcbsyave", com.azure.core.util.Context.NONE); } @@ -2153,33 +1484,15 @@ import java.util.Map; */ public final class VmmServersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmmServers_CreateOrUpdate_MinimumSet_Gen.json - */ - /** - * Sample code: VmmServers_CreateOrUpdate_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void vmmServersCreateOrUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.vmmServers() - .define("w") - .withRegion("hslxkyzktvwpqbypvs") - .withExistingResourceGroup("rgscvmm") - .withExtendedLocation(new ExtendedLocation()) - .create(); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmmServers_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VmmServers_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: VmmServers_CreateOrUpdate_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void vmmServersCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void vmmServersCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.vmmServers() .define("-") .withRegion("hslxkyzktvwpqbypvs") @@ -2221,31 +1534,16 @@ import com.azure.resourcemanager.scvmm.models.ForceDelete; public final class VmmServersDeleteSamples { /* * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Delete_MaximumSet_Gen. - * json + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VmmServers_Delete_MaximumSet_Gen.json */ /** * Sample code: VmmServers_Delete_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void vmmServersDeleteMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void vmmServersDeleteMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.vmmServers().delete("rgscvmm", ".", ForceDelete.TRUE, com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Delete_MinimumSet_Gen. - * json - */ - /** - * Sample code: VmmServers_Delete_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void vmmServersDeleteMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.vmmServers().delete("rgscvmm", "8", null, com.azure.core.util.Context.NONE); - } } ``` @@ -2257,30 +1555,14 @@ public final class VmmServersDeleteSamples { */ public final class VmmServersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Get_MinimumSet_Gen. - * json - */ - /** - * Sample code: VmmServers_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void vmmServersGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.vmmServers().getByResourceGroupWithResponse("rgscvmm", "D", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Get_MaximumSet_Gen. - * json + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/VmmServers_Get_MaximumSet_Gen.json */ /** * Sample code: VmmServers_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void vmmServersGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void vmmServersGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.vmmServers().getByResourceGroupWithResponse("rgscvmm", ".", com.azure.core.util.Context.NONE); } } @@ -2294,28 +1576,15 @@ public final class VmmServersGetByResourceGroupSamples { */ public final class VmmServersListSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmmServers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VmmServers_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: VmmServers_ListBySubscription_MaximumSet. * - * @param manager Entry point to ScvmmManager. - */ - public static void vmmServersListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.vmmServers().list(com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmmServers_ListBySubscription_MinimumSet_Gen.json - */ - /** - * Sample code: VmmServers_ListBySubscription_MinimumSet. - * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void vmmServersListBySubscriptionMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void vmmServersListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.vmmServers().list(com.azure.core.util.Context.NONE); } } @@ -2329,28 +1598,15 @@ public final class VmmServersListSamples { */ public final class VmmServersListByResourceGroupSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmmServers_ListByResourceGroup_MinimumSet_Gen.json - */ - /** - * Sample code: VmmServers_ListByResourceGroup_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void vmmServersListByResourceGroupMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.vmmServers().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmmServers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VmmServers_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: VmmServers_ListByResourceGroup_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void vmmServersListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void vmmServersListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.vmmServers().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); } } @@ -2369,32 +1625,14 @@ import java.util.Map; public final class VmmServersUpdateSamples { /* * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Update_MinimumSet_Gen. - * json - */ - /** - * Sample code: VmmServers_Update_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void vmmServersUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - VmmServer resource = manager.vmmServers() - .getByResourceGroupWithResponse("rgscvmm", "_", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Update_MaximumSet_Gen. - * json + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VmmServers_Update_MaximumSet_Gen.json */ /** * Sample code: VmmServers_Update_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void vmmServersUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void vmmServersUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { VmmServer resource = manager.vmmServers() .getByResourceGroupWithResponse("rgscvmm", "Y", com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/pom.xml b/sdk/scvmm/azure-resourcemanager-scvmm/pom.xml index 9488f528b040..b2849258d9fe 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/pom.xml +++ b/sdk/scvmm/azure-resourcemanager-scvmm/pom.xml @@ -1,7 +1,7 @@ 4.0.0 @@ -17,8 +17,8 @@ 1.1.0-beta.1 jar - Microsoft Azure SDK for Scvmm Management - This package contains Microsoft Azure SDK for Scvmm Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. SCVMM Client. Package tag package-2023-10. + Microsoft Azure SDK for SCVMM Management + This package contains Microsoft Azure SDK for SCVMM Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft.ScVmm Rest API spec. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/ScvmmManager.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/SCVMMManager.java similarity index 91% rename from sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/ScvmmManager.java rename to sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/SCVMMManager.java index 11e2df4a9505..c6718612665c 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/ScvmmManager.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/SCVMMManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm; @@ -23,13 +23,13 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.scvmm.fluent.ScvmmClient; +import com.azure.resourcemanager.scvmm.fluent.ScVmmClient; import com.azure.resourcemanager.scvmm.implementation.AvailabilitySetsImpl; import com.azure.resourcemanager.scvmm.implementation.CloudsImpl; import com.azure.resourcemanager.scvmm.implementation.GuestAgentsImpl; import com.azure.resourcemanager.scvmm.implementation.InventoryItemsImpl; import com.azure.resourcemanager.scvmm.implementation.OperationsImpl; -import com.azure.resourcemanager.scvmm.implementation.ScvmmClientBuilder; +import com.azure.resourcemanager.scvmm.implementation.ScVmmClientBuilder; import com.azure.resourcemanager.scvmm.implementation.VirtualMachineInstancesImpl; import com.azure.resourcemanager.scvmm.implementation.VirtualMachineTemplatesImpl; import com.azure.resourcemanager.scvmm.implementation.VirtualNetworksImpl; @@ -53,36 +53,36 @@ import java.util.stream.Collectors; /** - * Entry point to ScvmmManager. - * SCVMM Client. + * Entry point to SCVMMManager. + * The Microsoft.ScVmm Rest API spec. */ -public final class ScvmmManager { - private VirtualMachineInstances virtualMachineInstances; - - private GuestAgents guestAgents; - - private VmInstanceHybridIdentityMetadatas vmInstanceHybridIdentityMetadatas; - +public final class SCVMMManager { private Operations operations; - private AvailabilitySets availabilitySets; + private VmmServers vmmServers; private Clouds clouds; - private VirtualMachineTemplates virtualMachineTemplates; - private VirtualNetworks virtualNetworks; - private VmmServers vmmServers; + private VirtualMachineTemplates virtualMachineTemplates; + + private AvailabilitySets availabilitySets; private InventoryItems inventoryItems; - private final ScvmmClient clientObject; + private VirtualMachineInstances virtualMachineInstances; + + private VmInstanceHybridIdentityMetadatas vmInstanceHybridIdentityMetadatas; + + private GuestAgents guestAgents; + + private final ScVmmClient clientObject; - private ScvmmManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + private SCVMMManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new ScvmmClientBuilder().pipeline(httpPipeline) + this.clientObject = new ScVmmClientBuilder().pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) @@ -90,38 +90,38 @@ private ScvmmManager(HttpPipeline httpPipeline, AzureProfile profile, Duration d } /** - * Creates an instance of Scvmm service API entry point. + * Creates an instance of SCVMM service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the Scvmm service API instance. + * @return the SCVMM service API instance. */ - public static ScvmmManager authenticate(TokenCredential credential, AzureProfile profile) { + public static SCVMMManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); return configure().authenticate(credential, profile); } /** - * Creates an instance of Scvmm service API entry point. + * Creates an instance of SCVMM service API entry point. * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. - * @return the Scvmm service API instance. + * @return the SCVMM service API instance. */ - public static ScvmmManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + public static SCVMMManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - return new ScvmmManager(httpPipeline, profile, null); + return new SCVMMManager(httpPipeline, profile, null); } /** - * Gets a Configurable instance that can be used to create ScvmmManager with optional configuration. + * Gets a Configurable instance that can be used to create SCVMMManager with optional configuration. * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { - return new ScvmmManager.Configurable(); + return new SCVMMManager.Configurable(); } /** @@ -226,13 +226,13 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { } /** - * Creates an instance of Scvmm service API entry point. + * Creates an instance of SCVMM service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the Scvmm service API instance. + * @return the SCVMM service API instance. */ - public ScvmmManager authenticate(TokenCredential credential, AzureProfile profile) { + public SCVMMManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); @@ -241,7 +241,7 @@ public ScvmmManager authenticate(TokenCredential credential, AzureProfile profil .append("-") .append("com.azure.resourcemanager.scvmm") .append("/") - .append("1.0.0"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -283,46 +283,8 @@ public ScvmmManager authenticate(TokenCredential credential, AzureProfile profil HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) .policies(policies.toArray(new HttpPipelinePolicy[0])) .build(); - return new ScvmmManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of VirtualMachineInstances. - * - * @return Resource collection API of VirtualMachineInstances. - */ - public VirtualMachineInstances virtualMachineInstances() { - if (this.virtualMachineInstances == null) { - this.virtualMachineInstances - = new VirtualMachineInstancesImpl(clientObject.getVirtualMachineInstances(), this); - } - return virtualMachineInstances; - } - - /** - * Gets the resource collection API of GuestAgents. - * - * @return Resource collection API of GuestAgents. - */ - public GuestAgents guestAgents() { - if (this.guestAgents == null) { - this.guestAgents = new GuestAgentsImpl(clientObject.getGuestAgents(), this); - } - return guestAgents; - } - - /** - * Gets the resource collection API of VmInstanceHybridIdentityMetadatas. - * - * @return Resource collection API of VmInstanceHybridIdentityMetadatas. - */ - public VmInstanceHybridIdentityMetadatas vmInstanceHybridIdentityMetadatas() { - if (this.vmInstanceHybridIdentityMetadatas == null) { - this.vmInstanceHybridIdentityMetadatas - = new VmInstanceHybridIdentityMetadatasImpl(clientObject.getVmInstanceHybridIdentityMetadatas(), this); + return new SCVMMManager(httpPipeline, profile, defaultPollInterval); } - return vmInstanceHybridIdentityMetadatas; } /** @@ -338,15 +300,15 @@ public Operations operations() { } /** - * Gets the resource collection API of AvailabilitySets. It manages AvailabilitySet. + * Gets the resource collection API of VmmServers. It manages VmmServer. * - * @return Resource collection API of AvailabilitySets. + * @return Resource collection API of VmmServers. */ - public AvailabilitySets availabilitySets() { - if (this.availabilitySets == null) { - this.availabilitySets = new AvailabilitySetsImpl(clientObject.getAvailabilitySets(), this); + public VmmServers vmmServers() { + if (this.vmmServers == null) { + this.vmmServers = new VmmServersImpl(clientObject.getVmmServers(), this); } - return availabilitySets; + return vmmServers; } /** @@ -361,6 +323,18 @@ public Clouds clouds() { return clouds; } + /** + * Gets the resource collection API of VirtualNetworks. It manages VirtualNetwork. + * + * @return Resource collection API of VirtualNetworks. + */ + public VirtualNetworks virtualNetworks() { + if (this.virtualNetworks == null) { + this.virtualNetworks = new VirtualNetworksImpl(clientObject.getVirtualNetworks(), this); + } + return virtualNetworks; + } + /** * Gets the resource collection API of VirtualMachineTemplates. It manages VirtualMachineTemplate. * @@ -375,27 +349,15 @@ public VirtualMachineTemplates virtualMachineTemplates() { } /** - * Gets the resource collection API of VirtualNetworks. It manages VirtualNetwork. - * - * @return Resource collection API of VirtualNetworks. - */ - public VirtualNetworks virtualNetworks() { - if (this.virtualNetworks == null) { - this.virtualNetworks = new VirtualNetworksImpl(clientObject.getVirtualNetworks(), this); - } - return virtualNetworks; - } - - /** - * Gets the resource collection API of VmmServers. It manages VmmServer. + * Gets the resource collection API of AvailabilitySets. It manages AvailabilitySet. * - * @return Resource collection API of VmmServers. + * @return Resource collection API of AvailabilitySets. */ - public VmmServers vmmServers() { - if (this.vmmServers == null) { - this.vmmServers = new VmmServersImpl(clientObject.getVmmServers(), this); + public AvailabilitySets availabilitySets() { + if (this.availabilitySets == null) { + this.availabilitySets = new AvailabilitySetsImpl(clientObject.getAvailabilitySets(), this); } - return vmmServers; + return availabilitySets; } /** @@ -411,12 +373,50 @@ public InventoryItems inventoryItems() { } /** - * Gets wrapped service client ScvmmClient providing direct access to the underlying auto-generated API + * Gets the resource collection API of VirtualMachineInstances. + * + * @return Resource collection API of VirtualMachineInstances. + */ + public VirtualMachineInstances virtualMachineInstances() { + if (this.virtualMachineInstances == null) { + this.virtualMachineInstances + = new VirtualMachineInstancesImpl(clientObject.getVirtualMachineInstances(), this); + } + return virtualMachineInstances; + } + + /** + * Gets the resource collection API of VmInstanceHybridIdentityMetadatas. + * + * @return Resource collection API of VmInstanceHybridIdentityMetadatas. + */ + public VmInstanceHybridIdentityMetadatas vmInstanceHybridIdentityMetadatas() { + if (this.vmInstanceHybridIdentityMetadatas == null) { + this.vmInstanceHybridIdentityMetadatas + = new VmInstanceHybridIdentityMetadatasImpl(clientObject.getVmInstanceHybridIdentityMetadatas(), this); + } + return vmInstanceHybridIdentityMetadatas; + } + + /** + * Gets the resource collection API of GuestAgents. + * + * @return Resource collection API of GuestAgents. + */ + public GuestAgents guestAgents() { + if (this.guestAgents == null) { + this.guestAgents = new GuestAgentsImpl(clientObject.getGuestAgents(), this); + } + return guestAgents; + } + + /** + * Gets wrapped service client ScVmmClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. * - * @return Wrapped service client ScvmmClient. + * @return Wrapped service client ScVmmClient. */ - public ScvmmClient serviceClient() { + public ScVmmClient serviceClient() { return this.clientObject; } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/AvailabilitySetsClient.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/AvailabilitySetsClient.java index 167374ae858c..4b51cacedd5a 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/AvailabilitySetsClient.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/AvailabilitySetsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent; @@ -19,61 +19,6 @@ * An instance of this class provides access to all the operations defined in AvailabilitySetsClient. */ public interface AvailabilitySetsClient { - /** - * Implements GET AvailabilitySets in a subscription. - * - * List of AvailabilitySets in a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Implements GET AvailabilitySets in a subscription. - * - * List of AvailabilitySets in a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Implements GET AvailabilitySets in a resource group. - * - * List of AvailabilitySets in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Implements GET AvailabilitySets in a resource group. - * - * List of AvailabilitySets in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** * Gets an AvailabilitySet. * @@ -308,4 +253,59 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String availabilitySetResourceName, ForceDelete force, Context context); + + /** + * Implements GET AvailabilitySets in a resource group. + * + * List of AvailabilitySets in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Implements GET AvailabilitySets in a resource group. + * + * List of AvailabilitySets in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Implements GET AvailabilitySets in a subscription. + * + * List of AvailabilitySets in a subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Implements GET AvailabilitySets in a subscription. + * + * List of AvailabilitySets in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/CloudsClient.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/CloudsClient.java index 48b89cbdaa71..e83ee028e926 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/CloudsClient.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/CloudsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent; @@ -19,61 +19,6 @@ * An instance of this class provides access to all the operations defined in CloudsClient. */ public interface CloudsClient { - /** - * Implements GET Clouds in a subscription. - * - * List of Clouds in a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cloud list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Implements GET Clouds in a subscription. - * - * List of Clouds in a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cloud list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Implements GET Clouds in a resource group. - * - * List of Clouds in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cloud list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Implements GET Clouds in a resource group. - * - * List of Clouds in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cloud list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** * Gets a Cloud. * @@ -304,4 +249,59 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String cloudResourceName, ForceDelete force, Context context); + + /** + * Implements GET Clouds in a resource group. + * + * List of Clouds in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Cloud list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Implements GET Clouds in a resource group. + * + * List of Clouds in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Cloud list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Implements GET Clouds in a subscription. + * + * List of Clouds in a subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Cloud list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Implements GET Clouds in a subscription. + * + * List of Clouds in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Cloud list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/GuestAgentsClient.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/GuestAgentsClient.java index 2e3c7defa1a9..6dd1b5e803fd 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/GuestAgentsClient.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/GuestAgentsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent; @@ -17,35 +17,6 @@ * An instance of this class provides access to all the operations defined in GuestAgentsClient. */ public interface GuestAgentsClient { - /** - * Implements GET GuestAgent in a vm. - * - * Returns the list of GuestAgent of the given vm. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GuestAgent list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByVirtualMachineInstance(String resourceUri); - - /** - * Implements GET GuestAgent in a vm. - * - * Returns the list of GuestAgent of the given vm. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GuestAgent list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByVirtualMachineInstance(String resourceUri, Context context); - /** * Gets GuestAgent. * @@ -165,4 +136,33 @@ SyncPoller, GuestAgentInner> beginCreate(String reso */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceUri); + + /** + * Implements GET GuestAgent in a vm. + * + * Returns the list of GuestAgent of the given vm. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GuestAgent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVirtualMachineInstance(String resourceUri); + + /** + * Implements GET GuestAgent in a vm. + * + * Returns the list of GuestAgent of the given vm. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GuestAgent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVirtualMachineInstance(String resourceUri, Context context); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/InventoryItemsClient.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/InventoryItemsClient.java index 2cba42113436..d9c119c82dc2 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/InventoryItemsClient.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/InventoryItemsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent; @@ -15,37 +15,6 @@ * An instance of this class provides access to all the operations defined in InventoryItemsClient. */ public interface InventoryItemsClient { - /** - * Implements GET for the list of Inventory Items in the VMMServer. - * - * Returns the list of inventoryItems in the given VmmServer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 InventoryItem list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByVmmServer(String resourceGroupName, String vmmServerName); - - /** - * Implements GET for the list of Inventory Items in the VMMServer. - * - * Returns the list of inventoryItems in the given VmmServer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 InventoryItem list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByVmmServer(String resourceGroupName, String vmmServerName, Context context); - /** * Implements GET InventoryItem method. * @@ -149,4 +118,35 @@ Response deleteWithResponse(String resourceGroupName, String vmmServerName */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String vmmServerName, String inventoryItemResourceName); + + /** + * Implements GET for the list of Inventory Items in the VMMServer. + * + * Returns the list of inventoryItems in the given VmmServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 InventoryItem list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVmmServer(String resourceGroupName, String vmmServerName); + + /** + * Implements GET for the list of Inventory Items in the VMMServer. + * + * Returns the list of inventoryItems in the given VmmServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 InventoryItem list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVmmServer(String resourceGroupName, String vmmServerName, Context context); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/OperationsClient.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/OperationsClient.java index 70b2d088ee3a..38272346cf4d 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/OperationsClient.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/ScvmmClient.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/ScVmmClient.java similarity index 93% rename from sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/ScvmmClient.java rename to sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/ScVmmClient.java index 222d20a1d00e..fb11b0a5d3ae 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/ScvmmClient.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/ScVmmClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent; @@ -8,30 +8,30 @@ import java.time.Duration; /** - * The interface for ScvmmClient class. + * The interface for ScVmmClient class. */ -public interface ScvmmClient { +public interface ScVmmClient { /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Server parameter. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -47,72 +47,72 @@ public interface ScvmmClient { Duration getDefaultPollInterval(); /** - * Gets the VirtualMachineInstancesClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the VirtualMachineInstancesClient object. + * @return the OperationsClient object. */ - VirtualMachineInstancesClient getVirtualMachineInstances(); + OperationsClient getOperations(); /** - * Gets the GuestAgentsClient object to access its operations. + * Gets the VmmServersClient object to access its operations. * - * @return the GuestAgentsClient object. + * @return the VmmServersClient object. */ - GuestAgentsClient getGuestAgents(); + VmmServersClient getVmmServers(); /** - * Gets the VmInstanceHybridIdentityMetadatasClient object to access its operations. + * Gets the CloudsClient object to access its operations. * - * @return the VmInstanceHybridIdentityMetadatasClient object. + * @return the CloudsClient object. */ - VmInstanceHybridIdentityMetadatasClient getVmInstanceHybridIdentityMetadatas(); + CloudsClient getClouds(); /** - * Gets the OperationsClient object to access its operations. + * Gets the VirtualNetworksClient object to access its operations. * - * @return the OperationsClient object. + * @return the VirtualNetworksClient object. */ - OperationsClient getOperations(); + VirtualNetworksClient getVirtualNetworks(); /** - * Gets the AvailabilitySetsClient object to access its operations. + * Gets the VirtualMachineTemplatesClient object to access its operations. * - * @return the AvailabilitySetsClient object. + * @return the VirtualMachineTemplatesClient object. */ - AvailabilitySetsClient getAvailabilitySets(); + VirtualMachineTemplatesClient getVirtualMachineTemplates(); /** - * Gets the CloudsClient object to access its operations. + * Gets the AvailabilitySetsClient object to access its operations. * - * @return the CloudsClient object. + * @return the AvailabilitySetsClient object. */ - CloudsClient getClouds(); + AvailabilitySetsClient getAvailabilitySets(); /** - * Gets the VirtualMachineTemplatesClient object to access its operations. + * Gets the InventoryItemsClient object to access its operations. * - * @return the VirtualMachineTemplatesClient object. + * @return the InventoryItemsClient object. */ - VirtualMachineTemplatesClient getVirtualMachineTemplates(); + InventoryItemsClient getInventoryItems(); /** - * Gets the VirtualNetworksClient object to access its operations. + * Gets the VirtualMachineInstancesClient object to access its operations. * - * @return the VirtualNetworksClient object. + * @return the VirtualMachineInstancesClient object. */ - VirtualNetworksClient getVirtualNetworks(); + VirtualMachineInstancesClient getVirtualMachineInstances(); /** - * Gets the VmmServersClient object to access its operations. + * Gets the VmInstanceHybridIdentityMetadatasClient object to access its operations. * - * @return the VmmServersClient object. + * @return the VmInstanceHybridIdentityMetadatasClient object. */ - VmmServersClient getVmmServers(); + VmInstanceHybridIdentityMetadatasClient getVmInstanceHybridIdentityMetadatas(); /** - * Gets the InventoryItemsClient object to access its operations. + * Gets the GuestAgentsClient object to access its operations. * - * @return the InventoryItemsClient object. + * @return the GuestAgentsClient object. */ - InventoryItemsClient getInventoryItems(); + GuestAgentsClient getGuestAgents(); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VirtualMachineInstancesClient.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VirtualMachineInstancesClient.java index d224a41cfcaf..3adf2cd7c97d 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VirtualMachineInstancesClient.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VirtualMachineInstancesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent; @@ -24,35 +24,6 @@ * An instance of this class provides access to all the operations defined in VirtualMachineInstancesClient. */ public interface VirtualMachineInstancesClient { - /** - * Implements List virtual machine instances. - * - * Lists all of the virtual machine instances within the specified parent resource. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualMachineInstance list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceUri); - - /** - * Implements List virtual machine instances. - * - * Lists all of the virtual machine instances within the specified parent resource. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualMachineInstance list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceUri, Context context); - /** * Gets a virtual machine. * @@ -277,9 +248,38 @@ SyncPoller, Void> beginDelete(String resourceUri, ForceDelete f void delete(String resourceUri, ForceDelete force, DeleteFromHost deleteFromHost, Context context); /** - * Implements the operation to creates a checkpoint in a virtual machine instance. + * Implements List virtual machine instances. * - * Creates a checkpoint in virtual machine instance. + * Lists all of the virtual machine instances within the specified parent resource. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualMachineInstance list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceUri); + + /** + * Implements List virtual machine instances. + * + * Lists all of the virtual machine instances within the specified parent resource. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualMachineInstance list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceUri, Context context); + + /** + * Implements the operation to stop a virtual machine. + * + * The operation to power off (stop) a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -289,12 +289,12 @@ SyncPoller, Void> beginDelete(String resourceUri, ForceDelete f * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCreateCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body); + SyncPoller, Void> beginStop(String resourceUri, StopVirtualMachineOptions body); /** - * Implements the operation to creates a checkpoint in a virtual machine instance. + * Implements the operation to stop a virtual machine. * - * Creates a checkpoint in virtual machine instance. + * The operation to power off (stop) a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -305,13 +305,12 @@ SyncPoller, Void> beginDelete(String resourceUri, ForceDelete f * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCreateCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body, - Context context); + SyncPoller, Void> beginStop(String resourceUri, StopVirtualMachineOptions body, Context context); /** - * Implements the operation to creates a checkpoint in a virtual machine instance. + * Implements the operation to stop a virtual machine. * - * Creates a checkpoint in virtual machine instance. + * The operation to power off (stop) a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -320,12 +319,12 @@ SyncPoller, Void> beginCreateCheckpoint(String resourceUri, Vir * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body); + void stop(String resourceUri, StopVirtualMachineOptions body); /** - * Implements the operation to creates a checkpoint in a virtual machine instance. + * Implements the operation to stop a virtual machine. * - * Creates a checkpoint in virtual machine instance. + * The operation to power off (stop) a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -335,30 +334,28 @@ SyncPoller, Void> beginCreateCheckpoint(String resourceUri, Vir * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body, Context context); + void stop(String resourceUri, StopVirtualMachineOptions body, Context context); /** - * Implements the operation to delete a checkpoint in a virtual machine instance. + * Implements the operation to start a virtual machine. * - * Deletes a checkpoint in virtual machine instance. + * The operation to start a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body); + SyncPoller, Void> beginStart(String resourceUri); /** - * Implements the operation to delete a checkpoint in a virtual machine instance. + * Implements the operation to start a virtual machine. * - * Deletes a checkpoint in virtual machine instance. + * The operation to start a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -366,37 +363,34 @@ SyncPoller, Void> beginCreateCheckpoint(String resourceUri, Vir * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body, - Context context); + SyncPoller, Void> beginStart(String resourceUri, Context context); /** - * Implements the operation to delete a checkpoint in a virtual machine instance. + * Implements the operation to start a virtual machine. * - * Deletes a checkpoint in virtual machine instance. + * The operation to start a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body); + void start(String resourceUri); /** - * Implements the operation to delete a checkpoint in a virtual machine instance. + * Implements the operation to start a virtual machine. * - * Deletes a checkpoint in virtual machine instance. + * The operation to start a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body, Context context); + void start(String resourceUri, Context context); /** * Implements the operation to restart a virtual machine. @@ -455,9 +449,9 @@ SyncPoller, Void> beginDeleteCheckpoint(String resourceUri, Vir void restart(String resourceUri, Context context); /** - * Implements the operation to restores to a checkpoint in a virtual machine instance. + * Implements the operation to creates a checkpoint in a virtual machine instance. * - * Restores to a checkpoint in virtual machine instance. + * Creates a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -467,12 +461,12 @@ SyncPoller, Void> beginDeleteCheckpoint(String resourceUri, Vir * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body); + SyncPoller, Void> beginCreateCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body); /** - * Implements the operation to restores to a checkpoint in a virtual machine instance. + * Implements the operation to creates a checkpoint in a virtual machine instance. * - * Restores to a checkpoint in virtual machine instance. + * Creates a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -483,13 +477,13 @@ SyncPoller, Void> beginDeleteCheckpoint(String resourceUri, Vir * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body, + SyncPoller, Void> beginCreateCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body, Context context); /** - * Implements the operation to restores to a checkpoint in a virtual machine instance. + * Implements the operation to creates a checkpoint in a virtual machine instance. * - * Restores to a checkpoint in virtual machine instance. + * Creates a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -498,12 +492,12 @@ SyncPoller, Void> beginRestoreCheckpoint(String resourceUri, Vi * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body); + void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body); /** - * Implements the operation to restores to a checkpoint in a virtual machine instance. + * Implements the operation to creates a checkpoint in a virtual machine instance. * - * Restores to a checkpoint in virtual machine instance. + * Creates a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -513,28 +507,30 @@ SyncPoller, Void> beginRestoreCheckpoint(String resourceUri, Vi * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body, Context context); + void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body, Context context); /** - * Implements the operation to start a virtual machine. + * Implements the operation to delete a checkpoint in a virtual machine instance. * - * The operation to start a virtual machine instance. + * Deletes a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStart(String resourceUri); + SyncPoller, Void> beginDeleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body); /** - * Implements the operation to start a virtual machine. + * Implements the operation to delete a checkpoint in a virtual machine instance. * - * The operation to start a virtual machine instance. + * Deletes a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -542,39 +538,42 @@ SyncPoller, Void> beginRestoreCheckpoint(String resourceUri, Vi * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStart(String resourceUri, Context context); + SyncPoller, Void> beginDeleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body, + Context context); /** - * Implements the operation to start a virtual machine. + * Implements the operation to delete a checkpoint in a virtual machine instance. * - * The operation to start a virtual machine instance. + * Deletes a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void start(String resourceUri); + void deleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body); /** - * Implements the operation to start a virtual machine. + * Implements the operation to delete a checkpoint in a virtual machine instance. * - * The operation to start a virtual machine instance. + * Deletes a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void start(String resourceUri, Context context); + void deleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body, Context context); /** - * Implements the operation to stop a virtual machine. + * Implements the operation to restores to a checkpoint in a virtual machine instance. * - * The operation to power off (stop) a virtual machine instance. + * Restores to a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -584,12 +583,12 @@ SyncPoller, Void> beginRestoreCheckpoint(String resourceUri, Vi * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStop(String resourceUri, StopVirtualMachineOptions body); + SyncPoller, Void> beginRestoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body); /** - * Implements the operation to stop a virtual machine. + * Implements the operation to restores to a checkpoint in a virtual machine instance. * - * The operation to power off (stop) a virtual machine instance. + * Restores to a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -600,12 +599,13 @@ SyncPoller, Void> beginRestoreCheckpoint(String resourceUri, Vi * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStop(String resourceUri, StopVirtualMachineOptions body, Context context); + SyncPoller, Void> beginRestoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body, + Context context); /** - * Implements the operation to stop a virtual machine. + * Implements the operation to restores to a checkpoint in a virtual machine instance. * - * The operation to power off (stop) a virtual machine instance. + * Restores to a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -614,12 +614,12 @@ SyncPoller, Void> beginRestoreCheckpoint(String resourceUri, Vi * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String resourceUri, StopVirtualMachineOptions body); + void restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body); /** - * Implements the operation to stop a virtual machine. + * Implements the operation to restores to a checkpoint in a virtual machine instance. * - * The operation to power off (stop) a virtual machine instance. + * Restores to a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -629,5 +629,5 @@ SyncPoller, Void> beginRestoreCheckpoint(String resourceUri, Vi * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String resourceUri, StopVirtualMachineOptions body, Context context); + void restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body, Context context); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VirtualMachineTemplatesClient.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VirtualMachineTemplatesClient.java index b252f67d1615..dbf1cd59783d 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VirtualMachineTemplatesClient.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VirtualMachineTemplatesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent; @@ -19,61 +19,6 @@ * An instance of this class provides access to all the operations defined in VirtualMachineTemplatesClient. */ public interface VirtualMachineTemplatesClient { - /** - * Implements GET VirtualMachineTemplates in a subscription. - * - * List of VirtualMachineTemplates in a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Implements GET VirtualMachineTemplates in a subscription. - * - * List of VirtualMachineTemplates in a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Implements GET VirtualMachineTemplates in a resource group. - * - * List of VirtualMachineTemplates in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Implements GET VirtualMachineTemplates in a resource group. - * - * List of VirtualMachineTemplates in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** * Gets a VirtualMachineTemplate. * @@ -310,4 +255,59 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String virtualMachineTemplateName, ForceDelete force, Context context); + + /** + * Implements GET VirtualMachineTemplates in a resource group. + * + * List of VirtualMachineTemplates in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Implements GET VirtualMachineTemplates in a resource group. + * + * List of VirtualMachineTemplates in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Implements GET VirtualMachineTemplates in a subscription. + * + * List of VirtualMachineTemplates in a subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Implements GET VirtualMachineTemplates in a subscription. + * + * List of VirtualMachineTemplates in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VirtualNetworksClient.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VirtualNetworksClient.java index e66b0a46c8e4..4b45cf7f93e7 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VirtualNetworksClient.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VirtualNetworksClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent; @@ -19,61 +19,6 @@ * An instance of this class provides access to all the operations defined in VirtualNetworksClient. */ public interface VirtualNetworksClient { - /** - * Implements GET VirtualNetworks in a subscription. - * - * List of VirtualNetworks in a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Implements GET VirtualNetworks in a subscription. - * - * List of VirtualNetworks in a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Implements GET VirtualNetworks in a resource group. - * - * List of VirtualNetworks in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Implements GET VirtualNetworks in a resource group. - * - * List of VirtualNetworks in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** * Gets a VirtualNetwork. * @@ -308,4 +253,59 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String virtualNetworkName, ForceDelete force, Context context); + + /** + * Implements GET VirtualNetworks in a resource group. + * + * List of VirtualNetworks in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Implements GET VirtualNetworks in a resource group. + * + * List of VirtualNetworks in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Implements GET VirtualNetworks in a subscription. + * + * List of VirtualNetworks in a subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Implements GET VirtualNetworks in a subscription. + * + * List of VirtualNetworks in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VmInstanceHybridIdentityMetadatasClient.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VmInstanceHybridIdentityMetadatasClient.java index f886535bb147..f140f4f39719 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VmInstanceHybridIdentityMetadatasClient.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VmInstanceHybridIdentityMetadatasClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent; @@ -16,63 +16,63 @@ */ public interface VmInstanceHybridIdentityMetadatasClient { /** - * Implements GET HybridIdentityMetadata in a vm. + * Gets HybridIdentityMetadata. * - * Returns the list of HybridIdentityMetadata of the given VM. + * Implements HybridIdentityMetadata GET method. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VmInstanceHybridIdentityMetadata list operation as paginated response with - * {@link PagedIterable}. + * @return defines the HybridIdentityMetadata along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByVirtualMachineInstance(String resourceUri); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceUri, Context context); /** - * Implements GET HybridIdentityMetadata in a vm. + * Gets HybridIdentityMetadata. * - * Returns the list of HybridIdentityMetadata of the given VM. + * Implements HybridIdentityMetadata GET method. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VmInstanceHybridIdentityMetadata list operation as paginated response with - * {@link PagedIterable}. + * @return defines the HybridIdentityMetadata. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByVirtualMachineInstance(String resourceUri, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + VmInstanceHybridIdentityMetadataInner get(String resourceUri); /** - * Gets HybridIdentityMetadata. + * Implements GET HybridIdentityMetadata in a vm. * - * Implements HybridIdentityMetadata GET method. + * Returns the list of HybridIdentityMetadata of the given VM. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata along with {@link Response}. + * @return the response of a VmInstanceHybridIdentityMetadata list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceUri, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVirtualMachineInstance(String resourceUri); /** - * Gets HybridIdentityMetadata. + * Implements GET HybridIdentityMetadata in a vm. * - * Implements HybridIdentityMetadata GET method. + * Returns the list of HybridIdentityMetadata of the given VM. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata. + * @return the response of a VmInstanceHybridIdentityMetadata list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - VmInstanceHybridIdentityMetadataInner get(String resourceUri); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVirtualMachineInstance(String resourceUri, + Context context); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VmmServersClient.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VmmServersClient.java index a559ca804b78..fde51e56a9bd 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VmmServersClient.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/VmmServersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent; @@ -19,61 +19,6 @@ * An instance of this class provides access to all the operations defined in VmmServersClient. */ public interface VmmServersClient { - /** - * Implements GET VmmServers in a subscription. - * - * List of VmmServers in a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VmmServer list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Implements GET VmmServers in a subscription. - * - * List of VmmServers in a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VmmServer list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Implements GET VmmServers in a resource group. - * - * List of VmmServers in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VmmServer list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Implements GET VmmServers in a resource group. - * - * List of VmmServers in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VmmServer list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** * Gets a VMMServer. * @@ -306,4 +251,59 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String vmmServerName, ForceDelete force, Context context); + + /** + * Implements GET VmmServers in a resource group. + * + * List of VmmServers in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VmmServer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Implements GET VmmServers in a resource group. + * + * List of VmmServers in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VmmServer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Implements GET VmmServers in a subscription. + * + * List of VmmServers in a subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VmmServer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Implements GET VmmServers in a subscription. + * + * List of VmmServers in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VmmServer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/AvailabilitySetInner.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/AvailabilitySetInner.java index 8b902f8f5143..8b2f06dc006f 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/AvailabilitySetInner.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/AvailabilitySetInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/CloudInner.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/CloudInner.java index 90cf0eae97b2..fe607860d17d 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/CloudInner.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/CloudInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/GuestAgentInner.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/GuestAgentInner.java index 3193a51c1136..eab87bb3a2ce 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/GuestAgentInner.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/GuestAgentInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/InventoryItemInner.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/InventoryItemInner.java index 9ab0a50b5df5..d94d4f4270e0 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/InventoryItemInner.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/InventoryItemInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/OperationInner.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/OperationInner.java index 4a0db33126a7..1aa979ad5018 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/OperationInner.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/OperationInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent.models; @@ -15,8 +15,6 @@ import java.io.IOException; /** - * REST API Operation - * * Details of a REST API operation, returned from the Resource Provider Operations API. */ @Immutable @@ -28,8 +26,8 @@ public final class OperationInner implements JsonSerializable { private String name; /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for - * ARM/control-plane operations. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure + * Resource Manager/control-plane operations. */ private Boolean isDataAction; @@ -45,7 +43,7 @@ public final class OperationInner implements JsonSerializable { private Origin origin; /* - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ private ActionType actionType; @@ -67,7 +65,7 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ @@ -95,8 +93,8 @@ public Origin origin() { } /** - * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. + * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. * * @return the actionType value. */ @@ -122,6 +120,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("display", this.display); + jsonWriter.writeStringField("actionType", this.actionType == null ? null : this.actionType.toString()); return jsonWriter.writeEndObject(); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VirtualMachineInstanceInner.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VirtualMachineInstanceInner.java index 7e5f5a6d72a0..c1e369a33b92 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VirtualMachineInstanceInner.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VirtualMachineInstanceInner.java @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.scvmm.models.ExtendedLocation; +import com.azure.resourcemanager.scvmm.models.ExtensionResource; import com.azure.resourcemanager.scvmm.models.VirtualMachineInstanceProperties; import java.io.IOException; @@ -19,7 +19,7 @@ * Define the virtualMachineInstance. */ @Fluent -public final class VirtualMachineInstanceInner extends ProxyResource { +public final class VirtualMachineInstanceInner extends ExtensionResource { /* * The resource-specific properties for this resource. */ @@ -30,11 +30,6 @@ public final class VirtualMachineInstanceInner extends ProxyResource { */ private ExtendedLocation extendedLocation; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * Fully qualified resource Id for the resource. */ @@ -50,6 +45,11 @@ public final class VirtualMachineInstanceInner extends ProxyResource { */ private String type; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /** * Creates an instance of VirtualMachineInstanceInner class. */ @@ -96,15 +96,6 @@ public VirtualMachineInstanceInner withExtendedLocation(ExtendedLocation extende 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 id property: Fully qualified resource Id for the resource. * @@ -135,12 +126,24 @@ public String type() { return this.type; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + @Override + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { + super.validate(); if (properties() != null) { properties().validate(); } @@ -188,13 +191,13 @@ public static VirtualMachineInstanceInner fromJson(JsonReader jsonReader) throws deserializedVirtualMachineInstanceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedVirtualMachineInstanceInner.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedVirtualMachineInstanceInner.systemData = SystemData.fromJson(reader); } else if ("extendedLocation".equals(fieldName)) { deserializedVirtualMachineInstanceInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedVirtualMachineInstanceInner.properties = VirtualMachineInstanceProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedVirtualMachineInstanceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VirtualMachineTemplateInner.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VirtualMachineTemplateInner.java index a51ddc0ba56e..a365e5b76b57 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VirtualMachineTemplateInner.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VirtualMachineTemplateInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VirtualNetworkInner.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VirtualNetworkInner.java index 074bfd63c7de..9e801a2ae4d2 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VirtualNetworkInner.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VirtualNetworkInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VmInstanceHybridIdentityMetadataInner.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VmInstanceHybridIdentityMetadataInner.java index dfd9097c7ced..16afee52d779 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VmInstanceHybridIdentityMetadataInner.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VmInstanceHybridIdentityMetadataInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * Defines the HybridIdentityMetadata. */ -@Fluent +@Immutable public final class VmInstanceHybridIdentityMetadataInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -46,7 +46,7 @@ public final class VmInstanceHybridIdentityMetadataInner extends ProxyResource { /** * Creates an instance of VmInstanceHybridIdentityMetadataInner class. */ - public VmInstanceHybridIdentityMetadataInner() { + private VmInstanceHybridIdentityMetadataInner() { } /** @@ -58,17 +58,6 @@ public VmInstanceHybridIdentityMetadataProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the VmInstanceHybridIdentityMetadataInner object itself. - */ - public VmInstanceHybridIdentityMetadataInner withProperties(VmInstanceHybridIdentityMetadataProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VmmServerInner.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VmmServerInner.java index c861dccd3968..4b6e8070f042 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VmmServerInner.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/VmmServerInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.fluent.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/package-info.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/package-info.java index 04a3c49ce47c..301d65605591 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/package-info.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for ScvmmClient. - * SCVMM Client. + * Package containing the inner data models for SCVMM. + * The Microsoft.ScVmm Rest API spec. */ package com.azure.resourcemanager.scvmm.fluent.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/package-info.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/package-info.java index af00da8e8cdc..bb624fc419e3 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/package-info.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for ScvmmClient. - * SCVMM Client. + * Package containing the service clients for SCVMM. + * The Microsoft.ScVmm Rest API spec. */ package com.azure.resourcemanager.scvmm.fluent; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/AvailabilitySetImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/AvailabilitySetImpl.java index a519197c35d6..9f25557db88a 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/AvailabilitySetImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/AvailabilitySetImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -18,7 +18,7 @@ public final class AvailabilitySetImpl implements AvailabilitySet, AvailabilitySet.Definition, AvailabilitySet.Update { private AvailabilitySetInner innerObject; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; public String id() { return this.innerModel().id(); @@ -73,7 +73,7 @@ public AvailabilitySetInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } @@ -102,7 +102,7 @@ public AvailabilitySet create(Context context) { return this; } - AvailabilitySetImpl(String name, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + AvailabilitySetImpl(String name, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerObject = new AvailabilitySetInner(); this.serviceManager = serviceManager; this.availabilitySetResourceName = name; @@ -127,7 +127,7 @@ public AvailabilitySet apply(Context context) { return this; } - AvailabilitySetImpl(AvailabilitySetInner innerObject, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + AvailabilitySetImpl(AvailabilitySetInner innerObject, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/AvailabilitySetsClientImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/AvailabilitySetsClientImpl.java index cf3cbbd44d04..7ff977845848 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/AvailabilitySetsClientImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/AvailabilitySetsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.scvmm.fluent.AvailabilitySetsClient; import com.azure.resourcemanager.scvmm.fluent.models.AvailabilitySetInner; -import com.azure.resourcemanager.scvmm.models.AvailabilitySetListResult; +import com.azure.resourcemanager.scvmm.implementation.models.AvailabilitySetListResult; import com.azure.resourcemanager.scvmm.models.AvailabilitySetTagsUpdate; import com.azure.resourcemanager.scvmm.models.ForceDelete; import java.nio.ByteBuffer; @@ -53,114 +53,118 @@ public final class AvailabilitySetsClientImpl implements AvailabilitySetsClient /** * The service client containing this operation class. */ - private final ScvmmClientImpl client; + private final ScVmmClientImpl client; /** * Initializes an instance of AvailabilitySetsClientImpl. * * @param client the instance of the service client containing this operation class. */ - AvailabilitySetsClientImpl(ScvmmClientImpl client) { + AvailabilitySetsClientImpl(ScVmmClientImpl client) { this.service = RestProxy.create(AvailabilitySetsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ScvmmClientAvailabilitySets to be used by the proxy service to + * The interface defining all the services for ScVmmClientAvailabilitySets to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ScvmmClientAvailabil") + @Host("{endpoint}") + @ServiceInterface(name = "ScVmmClientAvailabil") public interface AvailabilitySetsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/availabilitySets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("availabilitySetResourceName") String availabilitySetResourceName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("availabilitySetResourceName") String availabilitySetResourceName, - @BodyParam("application/json") AvailabilitySetInner resource, @HeaderParam("Accept") String accept, + @HeaderParam("accept") String accept, @BodyParam("application/json") AvailabilitySetInner resource, Context context); @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("availabilitySetResourceName") String availabilitySetResourceName, - @BodyParam("application/json") AvailabilitySetTagsUpdate properties, @HeaderParam("Accept") String accept, + @HeaderParam("accept") String accept, @BodyParam("application/json") AvailabilitySetTagsUpdate properties, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("force") ForceDelete force, @PathParam("availabilitySetResourceName") String availabilitySetResourceName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/availabilitySets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + @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) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** - * Implements GET AvailabilitySets in a subscription. + * Gets an AvailabilitySet. * - * List of AvailabilitySets in a subscription. + * Implements AvailabilitySet GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 AvailabilitySet list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the AvailabilitySets resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String availabilitySetResourceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -169,29 +173,38 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (availabilitySetResourceName == null) { + return Mono.error( + new IllegalArgumentException("Parameter availabilitySetResourceName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, availabilitySetResourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements GET AvailabilitySets in a subscription. + * Gets an AvailabilitySet. * - * List of AvailabilitySets in a subscription. + * Implements AvailabilitySet GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 AvailabilitySet list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the AvailabilitySets resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String availabilitySetResourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -200,91 +213,92 @@ private Mono> listSinglePageAsync(Context co return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (availabilitySetResourceName == null) { + return Mono.error( + new IllegalArgumentException("Parameter availabilitySetResourceName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, availabilitySetResourceName, accept, context); } /** - * Implements GET AvailabilitySets in a subscription. + * Gets an AvailabilitySet. * - * List of AvailabilitySets in a subscription. + * Implements AvailabilitySet GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 AvailabilitySet list operation as paginated response with {@link PagedFlux}. + * @return the AvailabilitySets resource definition on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String availabilitySetResourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, availabilitySetResourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Implements GET AvailabilitySets in a subscription. + * Gets an AvailabilitySet. * - * List of AvailabilitySets in a subscription. + * Implements AvailabilitySet GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 AvailabilitySet list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Implements GET AvailabilitySets in a subscription. - * - * List of AvailabilitySets in a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedIterable}. + * @return the AvailabilitySets resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String availabilitySetResourceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, availabilitySetResourceName, context).block(); } /** - * Implements GET AvailabilitySets in a subscription. + * Gets an AvailabilitySet. * - * List of AvailabilitySets in a subscription. + * Implements AvailabilitySet GET method. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 AvailabilitySet list operation as paginated response with {@link PagedIterable}. + * @return the AvailabilitySets resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public AvailabilitySetInner getByResourceGroup(String resourceGroupName, String availabilitySetResourceName) { + return getByResourceGroupWithResponse(resourceGroupName, availabilitySetResourceName, Context.NONE).getValue(); } /** - * Implements GET AvailabilitySets in a resource group. + * Implements AvailabilitySets PUT method. * - * List of AvailabilitySets in a resource group. + * Onboards the ScVmm availability set as an Azure resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. + * @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 response of a AvailabilitySet list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the AvailabilitySets resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String availabilitySetResourceName, AvailabilitySetInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -297,31 +311,41 @@ private Mono> listByResourceGroupSinglePageA return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (availabilitySetResourceName == null) { + return Mono.error( + new IllegalArgumentException("Parameter availabilitySetResourceName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, availabilitySetResourceName, accept, resource, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements GET AvailabilitySets in a resource group. + * Implements AvailabilitySets PUT method. * - * List of AvailabilitySets in a resource group. + * Onboards the ScVmm availability set as an Azure resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. + * @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 response of a AvailabilitySet list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the AvailabilitySets resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String availabilitySetResourceName, AvailabilitySetInner resource, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -334,224 +358,195 @@ private Mono> listByResourceGroupSinglePageA return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (availabilitySetResourceName == null) { + return Mono.error( + new IllegalArgumentException("Parameter availabilitySetResourceName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, availabilitySetResourceName, accept, resource, context); } /** - * Implements GET AvailabilitySets in a resource group. + * Implements AvailabilitySets PUT method. * - * List of AvailabilitySets in a resource group. + * Onboards the ScVmm availability set as an Azure resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. + * @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 response of a AvailabilitySet list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of the AvailabilitySets resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AvailabilitySetInner> beginCreateOrUpdateAsync( + String resourceGroupName, String availabilitySetResourceName, AvailabilitySetInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, availabilitySetResourceName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AvailabilitySetInner.class, AvailabilitySetInner.class, this.client.getContext()); } /** - * Implements GET AvailabilitySets in a resource group. + * Implements AvailabilitySets PUT method. * - * List of AvailabilitySets in a resource group. + * Onboards the ScVmm availability set as an Azure resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. + * @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 response of a AvailabilitySet list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of the AvailabilitySets resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AvailabilitySetInner> beginCreateOrUpdateAsync( + String resourceGroupName, String availabilitySetResourceName, AvailabilitySetInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, availabilitySetResourceName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AvailabilitySetInner.class, AvailabilitySetInner.class, context); } /** - * Implements GET AvailabilitySets in a resource group. + * Implements AvailabilitySets PUT method. * - * List of AvailabilitySets in a resource group. + * Onboards the ScVmm availability set as an Azure resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. + * @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 response of a AvailabilitySet list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of the AvailabilitySets resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AvailabilitySetInner> beginCreateOrUpdate( + String resourceGroupName, String availabilitySetResourceName, AvailabilitySetInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, availabilitySetResourceName, resource).getSyncPoller(); } /** - * Implements GET AvailabilitySets in a resource group. + * Implements AvailabilitySets PUT method. * - * List of AvailabilitySets in a resource group. + * Onboards the ScVmm availability set as an Azure resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. + * @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 response of a AvailabilitySet list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of the AvailabilitySets resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AvailabilitySetInner> beginCreateOrUpdate( + String resourceGroupName, String availabilitySetResourceName, AvailabilitySetInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, availabilitySetResourceName, resource, context) + .getSyncPoller(); } /** - * Gets an AvailabilitySet. + * Implements AvailabilitySets PUT method. * - * Implements AvailabilitySet GET method. + * Onboards the ScVmm availability set as an Azure resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. + * @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 AvailabilitySets resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the AvailabilitySets resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String availabilitySetResourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (availabilitySetResourceName == null) { - return Mono.error( - new IllegalArgumentException("Parameter availabilitySetResourceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, availabilitySetResourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createOrUpdateAsync(String resourceGroupName, String availabilitySetResourceName, + AvailabilitySetInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, availabilitySetResourceName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets an AvailabilitySet. + * Implements AvailabilitySets PUT method. * - * Implements AvailabilitySet GET method. + * Onboards the ScVmm availability set as an Azure resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. + * @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 AvailabilitySets resource definition along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String availabilitySetResourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (availabilitySetResourceName == null) { - return Mono.error( - new IllegalArgumentException("Parameter availabilitySetResourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, availabilitySetResourceName, accept, context); - } - - /** - * Gets an AvailabilitySet. - * - * Implements AvailabilitySet GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the AvailabilitySets resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String availabilitySetResourceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, availabilitySetResourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, String availabilitySetResourceName, + AvailabilitySetInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, availabilitySetResourceName, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets an AvailabilitySet. + * Implements AvailabilitySets PUT method. * - * Implements AvailabilitySet GET method. + * Onboards the ScVmm availability set as an Azure resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param context The context to associate with this operation. + * @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 AvailabilitySets resource definition along with {@link Response}. + * @return the AvailabilitySets resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String availabilitySetResourceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, availabilitySetResourceName, context).block(); + public AvailabilitySetInner createOrUpdate(String resourceGroupName, String availabilitySetResourceName, + AvailabilitySetInner resource) { + return createOrUpdateAsync(resourceGroupName, availabilitySetResourceName, resource).block(); } /** - * Gets an AvailabilitySet. + * Implements AvailabilitySets PUT method. * - * Implements AvailabilitySet GET method. + * Onboards the ScVmm availability set as an Azure resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. + * @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 AvailabilitySets resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AvailabilitySetInner getByResourceGroup(String resourceGroupName, String availabilitySetResourceName) { - return getByResourceGroupWithResponse(resourceGroupName, availabilitySetResourceName, Context.NONE).getValue(); + public AvailabilitySetInner createOrUpdate(String resourceGroupName, String availabilitySetResourceName, + AvailabilitySetInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, availabilitySetResourceName, resource, context).block(); } /** - * Implements AvailabilitySets PUT method. + * Implements the AvailabilitySets PATCH method. * - * Onboards the ScVmm availability set as an Azure resource. + * Updates the AvailabilitySets resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param resource Resource create parameters. + * @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. @@ -559,8 +554,8 @@ public AvailabilitySetInner getByResourceGroup(String resourceGroupName, String * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String availabilitySetResourceName, AvailabilitySetInner resource) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String availabilitySetResourceName, AvailabilitySetTagsUpdate properties) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -577,27 +572,27 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter availabilitySetResourceName is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); } else { - resource.validate(); + properties.validate(); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, availabilitySetResourceName, resource, accept, + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, availabilitySetResourceName, accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements AvailabilitySets PUT method. + * Implements the AvailabilitySets PATCH method. * - * Onboards the ScVmm availability set as an Azure resource. + * Updates the AvailabilitySets resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param resource Resource create parameters. + * @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. @@ -606,8 +601,8 @@ private Mono>> createOrUpdateWithResponseAsync(String * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String availabilitySetResourceName, AvailabilitySetInner resource, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String availabilitySetResourceName, AvailabilitySetTagsUpdate properties, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -624,47 +619,47 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter availabilitySetResourceName is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); } else { - resource.validate(); + properties.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, availabilitySetResourceName, resource, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, availabilitySetResourceName, accept, properties, context); } /** - * Implements AvailabilitySets PUT method. + * Implements the AvailabilitySets PATCH method. * - * Onboards the ScVmm availability set as an Azure resource. + * Updates the AvailabilitySets resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param resource Resource create parameters. + * @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 the AvailabilitySets resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AvailabilitySetInner> beginCreateOrUpdateAsync( - String resourceGroupName, String availabilitySetResourceName, AvailabilitySetInner resource) { + private PollerFlux, AvailabilitySetInner> beginUpdateAsync( + String resourceGroupName, String availabilitySetResourceName, AvailabilitySetTagsUpdate properties) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, availabilitySetResourceName, resource); + = updateWithResponseAsync(resourceGroupName, availabilitySetResourceName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), AvailabilitySetInner.class, AvailabilitySetInner.class, this.client.getContext()); } /** - * Implements AvailabilitySets PUT method. + * Implements the AvailabilitySets PATCH method. * - * Onboards the ScVmm availability set as an Azure resource. + * Updates the AvailabilitySets resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param resource Resource create parameters. + * @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. @@ -672,42 +667,43 @@ private PollerFlux, AvailabilitySetInner> begin * @return the {@link PollerFlux} for polling of the AvailabilitySets resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AvailabilitySetInner> beginCreateOrUpdateAsync( - String resourceGroupName, String availabilitySetResourceName, AvailabilitySetInner resource, Context context) { + private PollerFlux, AvailabilitySetInner> beginUpdateAsync( + String resourceGroupName, String availabilitySetResourceName, AvailabilitySetTagsUpdate properties, + Context context) { context = this.client.mergeContext(context); Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, availabilitySetResourceName, resource, context); + = updateWithResponseAsync(resourceGroupName, availabilitySetResourceName, properties, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), AvailabilitySetInner.class, AvailabilitySetInner.class, context); } /** - * Implements AvailabilitySets PUT method. + * Implements the AvailabilitySets PATCH method. * - * Onboards the ScVmm availability set as an Azure resource. + * Updates the AvailabilitySets resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param resource Resource create parameters. + * @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 the AvailabilitySets resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AvailabilitySetInner> beginCreateOrUpdate( - String resourceGroupName, String availabilitySetResourceName, AvailabilitySetInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, availabilitySetResourceName, resource).getSyncPoller(); + public SyncPoller, AvailabilitySetInner> beginUpdate(String resourceGroupName, + String availabilitySetResourceName, AvailabilitySetTagsUpdate properties) { + return this.beginUpdateAsync(resourceGroupName, availabilitySetResourceName, properties).getSyncPoller(); } /** - * Implements AvailabilitySets PUT method. + * Implements the AvailabilitySets PATCH method. * - * Onboards the ScVmm availability set as an Azure resource. + * Updates the AvailabilitySets resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param resource Resource create parameters. + * @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. @@ -715,40 +711,40 @@ public SyncPoller, AvailabilitySetInner> beginC * @return the {@link SyncPoller} for polling of the AvailabilitySets resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AvailabilitySetInner> beginCreateOrUpdate( - String resourceGroupName, String availabilitySetResourceName, AvailabilitySetInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, availabilitySetResourceName, resource, context) + public SyncPoller, AvailabilitySetInner> beginUpdate(String resourceGroupName, + String availabilitySetResourceName, AvailabilitySetTagsUpdate properties, Context context) { + return this.beginUpdateAsync(resourceGroupName, availabilitySetResourceName, properties, context) .getSyncPoller(); } /** - * Implements AvailabilitySets PUT method. + * Implements the AvailabilitySets PATCH method. * - * Onboards the ScVmm availability set as an Azure resource. + * Updates the AvailabilitySets resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param resource Resource create parameters. + * @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 AvailabilitySets resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String availabilitySetResourceName, - AvailabilitySetInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, availabilitySetResourceName, resource).last() + private Mono updateAsync(String resourceGroupName, String availabilitySetResourceName, + AvailabilitySetTagsUpdate properties) { + return beginUpdateAsync(resourceGroupName, availabilitySetResourceName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements AvailabilitySets PUT method. + * Implements the AvailabilitySets PATCH method. * - * Onboards the ScVmm availability set as an Azure resource. + * Updates the AvailabilitySets resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param resource Resource create parameters. + * @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. @@ -756,39 +752,39 @@ private Mono createOrUpdateAsync(String resourceGroupName, * @return the AvailabilitySets resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String availabilitySetResourceName, - AvailabilitySetInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, availabilitySetResourceName, resource, context).last() + private Mono updateAsync(String resourceGroupName, String availabilitySetResourceName, + AvailabilitySetTagsUpdate properties, Context context) { + return beginUpdateAsync(resourceGroupName, availabilitySetResourceName, properties, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements AvailabilitySets PUT method. + * Implements the AvailabilitySets PATCH method. * - * Onboards the ScVmm availability set as an Azure resource. + * Updates the AvailabilitySets resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param resource Resource create parameters. + * @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 AvailabilitySets resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AvailabilitySetInner createOrUpdate(String resourceGroupName, String availabilitySetResourceName, - AvailabilitySetInner resource) { - return createOrUpdateAsync(resourceGroupName, availabilitySetResourceName, resource).block(); + public AvailabilitySetInner update(String resourceGroupName, String availabilitySetResourceName, + AvailabilitySetTagsUpdate properties) { + return updateAsync(resourceGroupName, availabilitySetResourceName, properties).block(); } /** - * Implements AvailabilitySets PUT method. + * Implements the AvailabilitySets PATCH method. * - * Onboards the ScVmm availability set as an Azure resource. + * Updates the AvailabilitySets resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param resource Resource create parameters. + * @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. @@ -796,28 +792,27 @@ public AvailabilitySetInner createOrUpdate(String resourceGroupName, String avai * @return the AvailabilitySets resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AvailabilitySetInner createOrUpdate(String resourceGroupName, String availabilitySetResourceName, - AvailabilitySetInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, availabilitySetResourceName, resource, context).block(); + public AvailabilitySetInner update(String resourceGroupName, String availabilitySetResourceName, + AvailabilitySetTagsUpdate properties, Context context) { + return updateAsync(resourceGroupName, availabilitySetResourceName, properties, context).block(); } /** - * Implements the AvailabilitySets PATCH method. + * Implements AvailabilitySet DELETE method. * - * Updates the AvailabilitySets resource. + * Deregisters the ScVmm availability set from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AvailabilitySets resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String availabilitySetResourceName, AvailabilitySetTagsUpdate properties) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String availabilitySetResourceName, ForceDelete force) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -834,37 +829,29 @@ private Mono>> updateWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter availabilitySetResourceName is required and cannot be null.")); } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, availabilitySetResourceName, properties, accept, - context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, force, availabilitySetResourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the AvailabilitySets PATCH method. + * Implements AvailabilitySet DELETE method. * - * Updates the AvailabilitySets resource. + * Deregisters the ScVmm availability set from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AvailabilitySets resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String availabilitySetResourceName, AvailabilitySetTagsUpdate properties, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String availabilitySetResourceName, ForceDelete force, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -881,182 +868,193 @@ private Mono>> updateWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter availabilitySetResourceName is required and cannot be null.")); } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, availabilitySetResourceName, properties, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, force, availabilitySetResourceName, accept, context); } /** - * Implements the AvailabilitySets PATCH method. + * Implements AvailabilitySet DELETE method. * - * Updates the AvailabilitySets resource. + * Deregisters the ScVmm availability set from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the AvailabilitySets resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AvailabilitySetInner> beginUpdateAsync( - String resourceGroupName, String availabilitySetResourceName, AvailabilitySetTagsUpdate properties) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String availabilitySetResourceName, ForceDelete force) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, availabilitySetResourceName, properties); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AvailabilitySetInner.class, AvailabilitySetInner.class, this.client.getContext()); + = deleteWithResponseAsync(resourceGroupName, availabilitySetResourceName, force); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Implements the AvailabilitySets PATCH method. + * Implements AvailabilitySet DELETE method. * - * Updates the AvailabilitySets resource. + * Deregisters the ScVmm availability set from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String availabilitySetResourceName) { + final ForceDelete force = null; + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, availabilitySetResourceName, force); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Implements AvailabilitySet DELETE method. + * + * Deregisters the ScVmm availability set from Azure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the AvailabilitySets resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AvailabilitySetInner> beginUpdateAsync( - String resourceGroupName, String availabilitySetResourceName, AvailabilitySetTagsUpdate properties, - Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String availabilitySetResourceName, ForceDelete force, Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateWithResponseAsync(resourceGroupName, availabilitySetResourceName, properties, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AvailabilitySetInner.class, AvailabilitySetInner.class, context); + = deleteWithResponseAsync(resourceGroupName, availabilitySetResourceName, force, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Implements the AvailabilitySets PATCH method. + * Implements AvailabilitySet DELETE method. * - * Updates the AvailabilitySets resource. + * Deregisters the ScVmm availability set from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @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 the AvailabilitySets resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AvailabilitySetInner> beginUpdate(String resourceGroupName, - String availabilitySetResourceName, AvailabilitySetTagsUpdate properties) { - return this.beginUpdateAsync(resourceGroupName, availabilitySetResourceName, properties).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, + String availabilitySetResourceName) { + final ForceDelete force = null; + return this.beginDeleteAsync(resourceGroupName, availabilitySetResourceName, force).getSyncPoller(); } /** - * Implements the AvailabilitySets PATCH method. + * Implements AvailabilitySet DELETE method. * - * Updates the AvailabilitySets resource. + * Deregisters the ScVmm availability set from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the AvailabilitySets resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AvailabilitySetInner> beginUpdate(String resourceGroupName, - String availabilitySetResourceName, AvailabilitySetTagsUpdate properties, Context context) { - return this.beginUpdateAsync(resourceGroupName, availabilitySetResourceName, properties, context) - .getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String availabilitySetResourceName, + ForceDelete force, Context context) { + return this.beginDeleteAsync(resourceGroupName, availabilitySetResourceName, force, context).getSyncPoller(); } /** - * Implements the AvailabilitySets PATCH method. + * Implements AvailabilitySet DELETE method. * - * Updates the AvailabilitySets resource. + * Deregisters the ScVmm availability set from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AvailabilitySets resource definition on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String availabilitySetResourceName, - AvailabilitySetTagsUpdate properties) { - return beginUpdateAsync(resourceGroupName, availabilitySetResourceName, properties).last() + private Mono deleteAsync(String resourceGroupName, String availabilitySetResourceName, ForceDelete force) { + return beginDeleteAsync(resourceGroupName, availabilitySetResourceName, force).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the AvailabilitySets PATCH method. + * Implements AvailabilitySet DELETE method. * - * Updates the AvailabilitySets resource. + * Deregisters the ScVmm availability set from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @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 AvailabilitySets resource definition on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String availabilitySetResourceName, - AvailabilitySetTagsUpdate properties, Context context) { - return beginUpdateAsync(resourceGroupName, availabilitySetResourceName, properties, context).last() + private Mono deleteAsync(String resourceGroupName, String availabilitySetResourceName) { + final ForceDelete force = null; + return beginDeleteAsync(resourceGroupName, availabilitySetResourceName, force).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the AvailabilitySets PATCH method. + * Implements AvailabilitySet DELETE method. * - * Updates the AvailabilitySets resource. + * Deregisters the ScVmm availability set from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AvailabilitySets resource definition. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AvailabilitySetInner update(String resourceGroupName, String availabilitySetResourceName, - AvailabilitySetTagsUpdate properties) { - return updateAsync(resourceGroupName, availabilitySetResourceName, properties).block(); + private Mono deleteAsync(String resourceGroupName, String availabilitySetResourceName, ForceDelete force, + Context context) { + return beginDeleteAsync(resourceGroupName, availabilitySetResourceName, force, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the AvailabilitySets PATCH method. + * Implements AvailabilitySet DELETE method. * - * Updates the AvailabilitySets resource. + * Deregisters the ScVmm availability set from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. - * @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 AvailabilitySets resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AvailabilitySetInner update(String resourceGroupName, String availabilitySetResourceName, - AvailabilitySetTagsUpdate properties, Context context) { - return updateAsync(resourceGroupName, availabilitySetResourceName, properties, context).block(); + public void delete(String resourceGroupName, String availabilitySetResourceName) { + final ForceDelete force = null; + deleteAsync(resourceGroupName, availabilitySetResourceName, force).block(); } /** @@ -1067,14 +1065,31 @@ public AvailabilitySetInner update(String resourceGroupName, String availability * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param availabilitySetResourceName Name of the AvailabilitySet. * @param force Forces the resource to be deleted. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 availabilitySetResourceName, ForceDelete force) { + public void delete(String resourceGroupName, String availabilitySetResourceName, ForceDelete force, + Context context) { + deleteAsync(resourceGroupName, availabilitySetResourceName, force, context).block(); + } + + /** + * Implements GET AvailabilitySets in a resource group. + * + * List of AvailabilitySets in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AvailabilitySet list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1087,33 +1102,31 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (availabilitySetResourceName == null) { - return Mono.error( - new IllegalArgumentException("Parameter availabilitySetResourceName is required and cannot be null.")); - } final String accept = "application/json"; - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, force, availabilitySetResourceName, accept, context)) + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements AvailabilitySet DELETE method. + * Implements GET AvailabilitySets in a resource group. * - * Deregisters the ScVmm availability set from Azure. + * List of AvailabilitySets in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a AvailabilitySet list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String availabilitySetResourceName, ForceDelete force, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1126,219 +1139,208 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (availabilitySetResourceName == null) { - return Mono.error( - new IllegalArgumentException("Parameter availabilitySetResourceName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, force, availabilitySetResourceName, accept, context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Implements AvailabilitySet DELETE method. + * Implements GET AvailabilitySets in a resource group. * - * Deregisters the ScVmm availability set from Azure. + * List of AvailabilitySets in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String availabilitySetResourceName, ForceDelete force) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, availabilitySetResourceName, force); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Implements AvailabilitySet DELETE method. + * Implements GET AvailabilitySets in a resource group. * - * Deregisters the ScVmm availability set from Azure. + * List of AvailabilitySets in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String availabilitySetResourceName) { - final ForceDelete force = null; - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, availabilitySetResourceName, force); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Implements AvailabilitySet DELETE method. + * Implements GET AvailabilitySets in a resource group. * - * Deregisters the ScVmm availability set from Azure. + * List of AvailabilitySets in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param force Forces the resource to be deleted. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String availabilitySetResourceName, ForceDelete force, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, availabilitySetResourceName, force, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } /** - * Implements AvailabilitySet DELETE method. + * Implements GET AvailabilitySets in a resource group. * - * Deregisters the ScVmm availability set from Azure. + * List of AvailabilitySets in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, - String availabilitySetResourceName) { - final ForceDelete force = null; - return this.beginDeleteAsync(resourceGroupName, availabilitySetResourceName, force).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** - * Implements AvailabilitySet DELETE method. + * Implements GET AvailabilitySets in a subscription. * - * Deregisters the ScVmm availability set from Azure. + * List of AvailabilitySets in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param force Forces the resource to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a AvailabilitySet list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String availabilitySetResourceName, - ForceDelete force, Context context) { - return this.beginDeleteAsync(resourceGroupName, availabilitySetResourceName, force, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements AvailabilitySet DELETE method. + * Implements GET AvailabilitySets in a subscription. * - * Deregisters the ScVmm availability set from Azure. + * List of AvailabilitySets in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param force Forces the resource to be deleted. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a AvailabilitySet list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String availabilitySetResourceName, ForceDelete force) { - return beginDeleteAsync(resourceGroupName, availabilitySetResourceName, force).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Implements AvailabilitySet DELETE method. + * Implements GET AvailabilitySets in a subscription. * - * Deregisters the ScVmm availability set from Azure. + * List of AvailabilitySets in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String availabilitySetResourceName) { - final ForceDelete force = null; - return beginDeleteAsync(resourceGroupName, availabilitySetResourceName, force).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Implements AvailabilitySet DELETE method. + * Implements GET AvailabilitySets in a subscription. * - * Deregisters the ScVmm availability set from Azure. + * List of AvailabilitySets in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String availabilitySetResourceName, ForceDelete force, - Context context) { - return beginDeleteAsync(resourceGroupName, availabilitySetResourceName, force, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** - * Implements AvailabilitySet DELETE method. + * Implements GET AvailabilitySets in a subscription. * - * Deregisters the ScVmm availability set from Azure. + * List of AvailabilitySets in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 AvailabilitySet list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String availabilitySetResourceName) { - final ForceDelete force = null; - deleteAsync(resourceGroupName, availabilitySetResourceName, force).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); } /** - * Implements AvailabilitySet DELETE method. + * Implements GET AvailabilitySets in a subscription. * - * Deregisters the ScVmm availability set from Azure. + * List of AvailabilitySets in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 AvailabilitySet list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String availabilitySetResourceName, ForceDelete force, - Context context) { - deleteAsync(resourceGroupName, availabilitySetResourceName, force, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** + * Implements GET AvailabilitySets in a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1349,7 +1351,7 @@ public void delete(String resourceGroupName, String availabilitySetResourceName, * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1360,13 +1362,15 @@ private Mono> listBySubscriptionNextSinglePa final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * Implements GET AvailabilitySets in a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1378,7 +1382,7 @@ private Mono> listBySubscriptionNextSinglePa * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1389,12 +1393,14 @@ private Mono> listBySubscriptionNextSinglePa } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** + * Implements GET AvailabilitySets in a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1405,7 +1411,7 @@ private Mono> listBySubscriptionNextSinglePa * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1416,13 +1422,15 @@ private Mono> listByResourceGroupNextSingleP final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * Implements GET AvailabilitySets in a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1434,7 +1442,7 @@ private Mono> listByResourceGroupNextSingleP * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1445,7 +1453,7 @@ private Mono> listByResourceGroupNextSingleP } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/AvailabilitySetsImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/AvailabilitySetsImpl.java index 0bc1b36562f1..fdd9990db7cb 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/AvailabilitySetsImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/AvailabilitySetsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -20,35 +20,14 @@ public final class AvailabilitySetsImpl implements AvailabilitySets { private final AvailabilitySetsClient innerClient; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; public AvailabilitySetsImpl(AvailabilitySetsClient innerClient, - com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilitySetImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilitySetImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilitySetImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilitySetImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String availabilitySetResourceName, Context context) { Response inner = this.serviceClient() @@ -80,6 +59,27 @@ public void delete(String resourceGroupName, String availabilitySetResourceName, this.serviceClient().delete(resourceGroupName, availabilitySetResourceName, force, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilitySetImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilitySetImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilitySetImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilitySetImpl(inner1, this.manager())); + } + public AvailabilitySet getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -142,7 +142,7 @@ private AvailabilitySetsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/CloudImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/CloudImpl.java index 2ee123e0c7ea..30a4298a8115 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/CloudImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/CloudImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -18,7 +18,7 @@ public final class CloudImpl implements Cloud, Cloud.Definition, Cloud.Update { private CloudInner innerObject; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; public String id() { return this.innerModel().id(); @@ -73,7 +73,7 @@ public CloudInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } @@ -102,7 +102,7 @@ public Cloud create(Context context) { return this; } - CloudImpl(String name, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + CloudImpl(String name, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerObject = new CloudInner(); this.serviceManager = serviceManager; this.cloudResourceName = name; @@ -127,7 +127,7 @@ public Cloud apply(Context context) { return this; } - CloudImpl(CloudInner innerObject, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + CloudImpl(CloudInner innerObject, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/CloudsClientImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/CloudsClientImpl.java index e4c9a00e3aba..2562b02ab3e9 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/CloudsClientImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/CloudsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.scvmm.fluent.CloudsClient; import com.azure.resourcemanager.scvmm.fluent.models.CloudInner; -import com.azure.resourcemanager.scvmm.models.CloudListResult; +import com.azure.resourcemanager.scvmm.implementation.models.CloudListResult; import com.azure.resourcemanager.scvmm.models.CloudTagsUpdate; import com.azure.resourcemanager.scvmm.models.ForceDelete; import java.nio.ByteBuffer; @@ -53,112 +53,114 @@ public final class CloudsClientImpl implements CloudsClient { /** * The service client containing this operation class. */ - private final ScvmmClientImpl client; + private final ScVmmClientImpl client; /** * Initializes an instance of CloudsClientImpl. * * @param client the instance of the service client containing this operation class. */ - CloudsClientImpl(ScvmmClientImpl client) { + CloudsClientImpl(ScVmmClientImpl client) { this.service = RestProxy.create(CloudsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ScvmmClientClouds to be used by the proxy service to perform REST + * The interface defining all the services for ScVmmClientClouds to be used by the proxy service to perform REST * calls. */ - @Host("{$host}") - @ServiceInterface(name = "ScvmmClientClouds") + @Host("{endpoint}") + @ServiceInterface(name = "ScVmmClientClouds") public interface CloudsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/clouds") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("cloudResourceName") String cloudResourceName, @HeaderParam("Accept") String accept, + @PathParam("cloudResourceName") String cloudResourceName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("cloudResourceName") String cloudResourceName, - @BodyParam("application/json") CloudInner resource, @HeaderParam("Accept") String accept, Context context); + @PathParam("cloudResourceName") String cloudResourceName, @HeaderParam("accept") String accept, + @BodyParam("application/json") CloudInner resource, Context context); @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("cloudResourceName") String cloudResourceName, - @BodyParam("application/json") CloudTagsUpdate properties, @HeaderParam("Accept") String accept, - Context context); + @PathParam("cloudResourceName") String cloudResourceName, @HeaderParam("accept") String accept, + @BodyParam("application/json") CloudTagsUpdate properties, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("force") ForceDelete force, - @PathParam("cloudResourceName") String cloudResourceName, @HeaderParam("Accept") String accept, + @PathParam("cloudResourceName") String cloudResourceName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/clouds") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + @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) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** - * Implements GET Clouds in a subscription. + * Gets a Cloud. * - * List of Clouds in a subscription. + * Implements Cloud GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Cloud list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the Clouds resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String cloudResourceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -167,29 +169,37 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudResourceName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudResourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements GET Clouds in a subscription. + * Gets a Cloud. * - * List of Clouds in a subscription. + * Implements Cloud GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Cloud list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the Clouds resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String cloudResourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -198,91 +208,90 @@ private Mono> listSinglePageAsync(Context context) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudResourceName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudResourceName, accept, context); } /** - * Implements GET Clouds in a subscription. + * Gets a Cloud. * - * List of Clouds in a subscription. + * Implements Cloud GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Cloud list operation as paginated response with {@link PagedFlux}. + * @return the Clouds resource definition on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String cloudResourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, cloudResourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Implements GET Clouds in a subscription. + * Gets a Cloud. * - * List of Clouds in a subscription. + * Implements Cloud GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Cloud list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Implements GET Clouds in a subscription. - * - * List of Clouds in a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cloud list operation as paginated response with {@link PagedIterable}. + * @return the Clouds resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String cloudResourceName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, cloudResourceName, context).block(); } /** - * Implements GET Clouds in a subscription. + * Gets a Cloud. * - * List of Clouds in a subscription. + * Implements Cloud GET method. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Cloud list operation as paginated response with {@link PagedIterable}. + * @return the Clouds resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudInner getByResourceGroup(String resourceGroupName, String cloudResourceName) { + return getByResourceGroupWithResponse(resourceGroupName, cloudResourceName, Context.NONE).getValue(); } /** - * Implements GET Clouds in a resource group. + * Implements Clouds PUT method. * - * List of Clouds in a resource group. + * Onboards the ScVmm fabric cloud as an Azure cloud resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. + * @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 response of a Cloud list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the Clouds resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String cloudResourceName, CloudInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -295,31 +304,39 @@ private Mono> listByResourceGroupSinglePageAsync(Strin return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (cloudResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudResourceName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudResourceName, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements GET Clouds in a resource group. + * Implements Clouds PUT method. * - * List of Clouds in a resource group. + * Onboards the ScVmm fabric cloud as an Azure cloud resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. + * @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 response of a Cloud list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the Clouds resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String cloudResourceName, CloudInner resource, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -332,229 +349,201 @@ private Mono> listByResourceGroupSinglePageAsync(Strin return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (cloudResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudResourceName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudResourceName, accept, resource, context); } /** - * Implements GET Clouds in a resource group. + * Implements Clouds PUT method. * - * List of Clouds in a resource group. + * Onboards the ScVmm fabric cloud as an Azure cloud resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. + * @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 response of a Cloud list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of the Clouds resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudInner> beginCreateOrUpdateAsync(String resourceGroupName, + String cloudResourceName, CloudInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, cloudResourceName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), CloudInner.class, + CloudInner.class, this.client.getContext()); } /** - * Implements GET Clouds in a resource group. + * Implements Clouds PUT method. * - * List of Clouds in a resource group. + * Onboards the ScVmm fabric cloud as an Azure cloud resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. + * @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 response of a Cloud list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of the Clouds resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudInner> beginCreateOrUpdateAsync(String resourceGroupName, + String cloudResourceName, CloudInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, cloudResourceName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), CloudInner.class, + CloudInner.class, context); } /** - * Implements GET Clouds in a resource group. + * Implements Clouds PUT method. * - * List of Clouds in a resource group. + * Onboards the ScVmm fabric cloud as an Azure cloud resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. + * @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 response of a Cloud list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of the Clouds resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudInner> beginCreateOrUpdate(String resourceGroupName, + String cloudResourceName, CloudInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, cloudResourceName, resource).getSyncPoller(); } /** - * Implements GET Clouds in a resource group. + * Implements Clouds PUT method. * - * List of Clouds in a resource group. + * Onboards the ScVmm fabric cloud as an Azure cloud resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. + * @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 response of a Cloud list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of the Clouds resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudInner> beginCreateOrUpdate(String resourceGroupName, + String cloudResourceName, CloudInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, cloudResourceName, resource, context).getSyncPoller(); } /** - * Gets a Cloud. + * Implements Clouds PUT method. * - * Implements Cloud GET method. + * Onboards the ScVmm fabric cloud as an Azure cloud resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. + * @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 Clouds resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the Clouds resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String cloudResourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudResourceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudResourceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudResourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createOrUpdateAsync(String resourceGroupName, String cloudResourceName, + CloudInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, cloudResourceName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Cloud. + * Implements Clouds PUT method. * - * Implements Cloud GET method. + * Onboards the ScVmm fabric cloud as an Azure cloud resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. + * @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 Clouds resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String cloudResourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudResourceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudResourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudResourceName, accept, context); - } - - /** - * Gets a Cloud. - * - * Implements Cloud GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Clouds resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String cloudResourceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, cloudResourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, String cloudResourceName, + CloudInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, cloudResourceName, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Cloud. + * Implements Clouds PUT method. * - * Implements Cloud GET method. + * Onboards the ScVmm fabric cloud as an Azure cloud resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param context The context to associate with this operation. + * @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 Clouds resource definition along with {@link Response}. + * @return the Clouds resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String cloudResourceName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, cloudResourceName, context).block(); + public CloudInner createOrUpdate(String resourceGroupName, String cloudResourceName, CloudInner resource) { + return createOrUpdateAsync(resourceGroupName, cloudResourceName, resource).block(); } /** - * Gets a Cloud. + * Implements Clouds PUT method. * - * Implements Cloud GET method. + * Onboards the ScVmm fabric cloud as an Azure cloud resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. + * @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 Clouds resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudInner getByResourceGroup(String resourceGroupName, String cloudResourceName) { - return getByResourceGroupWithResponse(resourceGroupName, cloudResourceName, Context.NONE).getValue(); + public CloudInner createOrUpdate(String resourceGroupName, String cloudResourceName, CloudInner resource, + Context context) { + return createOrUpdateAsync(resourceGroupName, cloudResourceName, resource, context).block(); } /** - * Implements Clouds PUT method. + * Implements the Clouds PATCH method. * - * Onboards the ScVmm fabric cloud as an Azure cloud resource. + * Updates the Clouds resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param resource Resource create parameters. + * @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 Clouds resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String cloudResourceName, CloudInner resource) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String cloudResourceName, + CloudTagsUpdate properties) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -571,26 +560,26 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter cloudResourceName is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); } else { - resource.validate(); + properties.validate(); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudResourceName, resource, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudResourceName, accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements Clouds PUT method. + * Implements the Clouds PATCH method. * - * Onboards the ScVmm fabric cloud as an Azure cloud resource. + * Updates the Clouds resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param resource Resource create parameters. + * @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. @@ -598,8 +587,8 @@ private Mono>> createOrUpdateWithResponseAsync(String * @return the Clouds resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String cloudResourceName, CloudInner resource, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String cloudResourceName, + CloudTagsUpdate properties, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -616,47 +605,47 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter cloudResourceName is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); } else { - resource.validate(); + properties.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudResourceName, resource, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, cloudResourceName, accept, properties, context); } /** - * Implements Clouds PUT method. + * Implements the Clouds PATCH method. * - * Onboards the ScVmm fabric cloud as an Azure cloud resource. + * Updates the Clouds resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param resource Resource create parameters. + * @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 the Clouds resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudInner> beginCreateOrUpdateAsync(String resourceGroupName, - String cloudResourceName, CloudInner resource) { + private PollerFlux, CloudInner> beginUpdateAsync(String resourceGroupName, + String cloudResourceName, CloudTagsUpdate properties) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, cloudResourceName, resource); + = updateWithResponseAsync(resourceGroupName, cloudResourceName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), CloudInner.class, CloudInner.class, this.client.getContext()); } /** - * Implements Clouds PUT method. + * Implements the Clouds PATCH method. * - * Onboards the ScVmm fabric cloud as an Azure cloud resource. + * Updates the Clouds resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param resource Resource create parameters. + * @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. @@ -664,42 +653,42 @@ private PollerFlux, CloudInner> beginCreateOrUpdateAsync( * @return the {@link PollerFlux} for polling of the Clouds resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudInner> beginCreateOrUpdateAsync(String resourceGroupName, - String cloudResourceName, CloudInner resource, Context context) { + private PollerFlux, CloudInner> beginUpdateAsync(String resourceGroupName, + String cloudResourceName, CloudTagsUpdate properties, Context context) { context = this.client.mergeContext(context); Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, cloudResourceName, resource, context); + = updateWithResponseAsync(resourceGroupName, cloudResourceName, properties, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), CloudInner.class, CloudInner.class, context); } /** - * Implements Clouds PUT method. + * Implements the Clouds PATCH method. * - * Onboards the ScVmm fabric cloud as an Azure cloud resource. + * Updates the Clouds resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param resource Resource create parameters. + * @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 the Clouds resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudInner> beginCreateOrUpdate(String resourceGroupName, - String cloudResourceName, CloudInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, cloudResourceName, resource).getSyncPoller(); + public SyncPoller, CloudInner> beginUpdate(String resourceGroupName, + String cloudResourceName, CloudTagsUpdate properties) { + return this.beginUpdateAsync(resourceGroupName, cloudResourceName, properties).getSyncPoller(); } /** - * Implements Clouds PUT method. + * Implements the Clouds PATCH method. * - * Onboards the ScVmm fabric cloud as an Azure cloud resource. + * Updates the Clouds resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param resource Resource create parameters. + * @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. @@ -707,39 +696,39 @@ public SyncPoller, CloudInner> beginCreateOrUpdate(String * @return the {@link SyncPoller} for polling of the Clouds resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudInner> beginCreateOrUpdate(String resourceGroupName, - String cloudResourceName, CloudInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, cloudResourceName, resource, context).getSyncPoller(); + public SyncPoller, CloudInner> beginUpdate(String resourceGroupName, + String cloudResourceName, CloudTagsUpdate properties, Context context) { + return this.beginUpdateAsync(resourceGroupName, cloudResourceName, properties, context).getSyncPoller(); } /** - * Implements Clouds PUT method. + * Implements the Clouds PATCH method. * - * Onboards the ScVmm fabric cloud as an Azure cloud resource. + * Updates the Clouds resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param resource Resource create parameters. + * @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 Clouds resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String cloudResourceName, - CloudInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, cloudResourceName, resource).last() + private Mono updateAsync(String resourceGroupName, String cloudResourceName, + CloudTagsUpdate properties) { + return beginUpdateAsync(resourceGroupName, cloudResourceName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements Clouds PUT method. + * Implements the Clouds PATCH method. * - * Onboards the ScVmm fabric cloud as an Azure cloud resource. + * Updates the Clouds resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param resource Resource create parameters. + * @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. @@ -747,38 +736,38 @@ private Mono createOrUpdateAsync(String resourceGroupName, String cl * @return the Clouds resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String cloudResourceName, - CloudInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, cloudResourceName, resource, context).last() + private Mono updateAsync(String resourceGroupName, String cloudResourceName, CloudTagsUpdate properties, + Context context) { + return beginUpdateAsync(resourceGroupName, cloudResourceName, properties, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements Clouds PUT method. + * Implements the Clouds PATCH method. * - * Onboards the ScVmm fabric cloud as an Azure cloud resource. + * Updates the Clouds resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param resource Resource create parameters. + * @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 Clouds resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudInner createOrUpdate(String resourceGroupName, String cloudResourceName, CloudInner resource) { - return createOrUpdateAsync(resourceGroupName, cloudResourceName, resource).block(); + public CloudInner update(String resourceGroupName, String cloudResourceName, CloudTagsUpdate properties) { + return updateAsync(resourceGroupName, cloudResourceName, properties).block(); } /** - * Implements Clouds PUT method. + * Implements the Clouds PATCH method. * - * Onboards the ScVmm fabric cloud as an Azure cloud resource. + * Updates the Clouds resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param resource Resource create parameters. + * @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. @@ -786,27 +775,27 @@ public CloudInner createOrUpdate(String resourceGroupName, String cloudResourceN * @return the Clouds resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudInner createOrUpdate(String resourceGroupName, String cloudResourceName, CloudInner resource, + public CloudInner update(String resourceGroupName, String cloudResourceName, CloudTagsUpdate properties, Context context) { - return createOrUpdateAsync(resourceGroupName, cloudResourceName, resource, context).block(); + return updateAsync(resourceGroupName, cloudResourceName, properties, context).block(); } /** - * Implements the Clouds PATCH method. + * Implements Cloud resource DELETE method. * - * Updates the Clouds resource. + * Deregisters the ScVmm fabric cloud from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Clouds resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String cloudResourceName, - CloudTagsUpdate properties) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String cloudResourceName, + ForceDelete force) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -823,35 +812,30 @@ private Mono>> updateWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter cloudResourceName is required and cannot be null.")); } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudResourceName, properties, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, force, cloudResourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the Clouds PATCH method. + * Implements Cloud resource DELETE method. * - * Updates the Clouds resource. + * Deregisters the ScVmm fabric cloud from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Clouds resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String cloudResourceName, - CloudTagsUpdate properties, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String cloudResourceName, + ForceDelete force, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -868,179 +852,189 @@ private Mono>> updateWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter cloudResourceName is required and cannot be null.")); } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, cloudResourceName, properties, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, force, cloudResourceName, accept, context); } /** - * Implements the Clouds PATCH method. + * Implements Cloud resource DELETE method. * - * Updates the Clouds resource. + * Deregisters the ScVmm fabric cloud from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Clouds resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudInner> beginUpdateAsync(String resourceGroupName, - String cloudResourceName, CloudTagsUpdate properties) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, cloudResourceName, properties); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), CloudInner.class, - CloudInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudResourceName, + ForceDelete force) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, cloudResourceName, force); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Implements the Clouds PATCH method. + * Implements Cloud resource DELETE method. * - * Updates the Clouds resource. + * Deregisters the ScVmm fabric cloud from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudResourceName) { + final ForceDelete force = null; + Mono>> mono = deleteWithResponseAsync(resourceGroupName, cloudResourceName, force); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Implements Cloud resource DELETE method. + * + * Deregisters the ScVmm fabric cloud from Azure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Clouds resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudInner> beginUpdateAsync(String resourceGroupName, - String cloudResourceName, CloudTagsUpdate properties, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudResourceName, + ForceDelete force, Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateWithResponseAsync(resourceGroupName, cloudResourceName, properties, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), CloudInner.class, - CloudInner.class, context); + = deleteWithResponseAsync(resourceGroupName, cloudResourceName, force, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Implements the Clouds PATCH method. + * Implements Cloud resource DELETE method. * - * Updates the Clouds resource. + * Deregisters the ScVmm fabric cloud from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @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 the Clouds resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudInner> beginUpdate(String resourceGroupName, - String cloudResourceName, CloudTagsUpdate properties) { - return this.beginUpdateAsync(resourceGroupName, cloudResourceName, properties).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudResourceName) { + final ForceDelete force = null; + return this.beginDeleteAsync(resourceGroupName, cloudResourceName, force).getSyncPoller(); } /** - * Implements the Clouds PATCH method. + * Implements Cloud resource DELETE method. * - * Updates the Clouds resource. + * Deregisters the ScVmm fabric cloud from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Clouds resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudInner> beginUpdate(String resourceGroupName, - String cloudResourceName, CloudTagsUpdate properties, Context context) { - return this.beginUpdateAsync(resourceGroupName, cloudResourceName, properties, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudResourceName, + ForceDelete force, Context context) { + return this.beginDeleteAsync(resourceGroupName, cloudResourceName, force, context).getSyncPoller(); } /** - * Implements the Clouds PATCH method. + * Implements Cloud resource DELETE method. * - * Updates the Clouds resource. + * Deregisters the ScVmm fabric cloud from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Clouds resource definition on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String cloudResourceName, - CloudTagsUpdate properties) { - return beginUpdateAsync(resourceGroupName, cloudResourceName, properties).last() + private Mono deleteAsync(String resourceGroupName, String cloudResourceName, ForceDelete force) { + return beginDeleteAsync(resourceGroupName, cloudResourceName, force).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the Clouds PATCH method. + * Implements Cloud resource DELETE method. * - * Updates the Clouds resource. + * Deregisters the ScVmm fabric cloud from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @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 Clouds resource definition on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String cloudResourceName, CloudTagsUpdate properties, - Context context) { - return beginUpdateAsync(resourceGroupName, cloudResourceName, properties, context).last() + private Mono deleteAsync(String resourceGroupName, String cloudResourceName) { + final ForceDelete force = null; + return beginDeleteAsync(resourceGroupName, cloudResourceName, force).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the Clouds PATCH method. + * Implements Cloud resource DELETE method. * - * Updates the Clouds resource. + * Deregisters the ScVmm fabric cloud from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Clouds resource definition. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudInner update(String resourceGroupName, String cloudResourceName, CloudTagsUpdate properties) { - return updateAsync(resourceGroupName, cloudResourceName, properties).block(); + private Mono deleteAsync(String resourceGroupName, String cloudResourceName, ForceDelete force, + Context context) { + return beginDeleteAsync(resourceGroupName, cloudResourceName, force, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the Clouds PATCH method. + * Implements Cloud resource DELETE method. * - * Updates the Clouds resource. + * Deregisters the ScVmm fabric cloud from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. - * @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 Clouds resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudInner update(String resourceGroupName, String cloudResourceName, CloudTagsUpdate properties, - Context context) { - return updateAsync(resourceGroupName, cloudResourceName, properties, context).block(); + public void delete(String resourceGroupName, String cloudResourceName) { + final ForceDelete force = null; + deleteAsync(resourceGroupName, cloudResourceName, force).block(); } /** @@ -1051,14 +1045,30 @@ public CloudInner update(String resourceGroupName, String cloudResourceName, Clo * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudResourceName Name of the Cloud. * @param force Forces the resource to be deleted. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 cloudResourceName, - ForceDelete force) { + public void delete(String resourceGroupName, String cloudResourceName, ForceDelete force, Context context) { + deleteAsync(resourceGroupName, cloudResourceName, force, context).block(); + } + + /** + * Implements GET Clouds in a resource group. + * + * List of Clouds in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Cloud list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1067,38 +1077,35 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudResourceName == null) { + if (resourceGroupName == null) { return Mono - .error(new IllegalArgumentException("Parameter cloudResourceName is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, force, cloudResourceName, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements Cloud resource DELETE method. + * Implements GET Clouds in a resource group. * - * Deregisters the ScVmm fabric cloud from Azure. + * List of Clouds in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a Cloud list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String cloudResourceName, - ForceDelete force, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1111,214 +1118,208 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (cloudResourceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudResourceName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, force, cloudResourceName, accept, context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Implements Cloud resource DELETE method. + * Implements GET Clouds in a resource group. * - * Deregisters the ScVmm fabric cloud from Azure. + * List of Clouds in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a Cloud list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudResourceName, - ForceDelete force) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, cloudResourceName, force); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Implements Cloud resource DELETE method. + * Implements GET Clouds in a resource group. * - * Deregisters the ScVmm fabric cloud from Azure. + * List of Clouds in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a Cloud list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudResourceName) { - final ForceDelete force = null; - Mono>> mono = deleteWithResponseAsync(resourceGroupName, cloudResourceName, force); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Implements Cloud resource DELETE method. + * Implements GET Clouds in a resource group. * - * Deregisters the ScVmm fabric cloud from Azure. + * List of Clouds in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param force Forces the resource to be deleted. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a Cloud list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudResourceName, - ForceDelete force, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, cloudResourceName, force, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } /** - * Implements Cloud resource DELETE method. + * Implements GET Clouds in a resource group. * - * Deregisters the ScVmm fabric cloud from Azure. + * List of Clouds in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a Cloud list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudResourceName) { - final ForceDelete force = null; - return this.beginDeleteAsync(resourceGroupName, cloudResourceName, force).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** - * Implements Cloud resource DELETE method. + * Implements GET Clouds in a subscription. * - * Deregisters the ScVmm fabric cloud from Azure. + * List of Clouds in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param force Forces the resource to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a Cloud list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudResourceName, - ForceDelete force, Context context) { - return this.beginDeleteAsync(resourceGroupName, cloudResourceName, force, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements Cloud resource DELETE method. + * Implements GET Clouds in a subscription. * - * Deregisters the ScVmm fabric cloud from Azure. + * List of Clouds in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param force Forces the resource to be deleted. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a Cloud list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String cloudResourceName, ForceDelete force) { - return beginDeleteAsync(resourceGroupName, cloudResourceName, force).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Implements Cloud resource DELETE method. + * Implements GET Clouds in a subscription. * - * Deregisters the ScVmm fabric cloud from Azure. + * List of Clouds in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a Cloud list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String cloudResourceName) { - final ForceDelete force = null; - return beginDeleteAsync(resourceGroupName, cloudResourceName, force).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Implements Cloud resource DELETE method. + * Implements GET Clouds in a subscription. * - * Deregisters the ScVmm fabric cloud from Azure. + * List of Clouds in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a Cloud list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String cloudResourceName, ForceDelete force, - Context context) { - return beginDeleteAsync(resourceGroupName, cloudResourceName, force, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** - * Implements Cloud resource DELETE method. + * Implements GET Clouds in a subscription. * - * Deregisters the ScVmm fabric cloud from Azure. + * List of Clouds in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Cloud list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String cloudResourceName) { - final ForceDelete force = null; - deleteAsync(resourceGroupName, cloudResourceName, force).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); } /** - * Implements Cloud resource DELETE method. + * Implements GET Clouds in a subscription. * - * Deregisters the ScVmm fabric cloud from Azure. + * List of Clouds in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Cloud list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String cloudResourceName, ForceDelete force, Context context) { - deleteAsync(resourceGroupName, cloudResourceName, force, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** + * Implements GET Clouds in a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1329,7 +1330,7 @@ public void delete(String resourceGroupName, String cloudResourceName, ForceDele * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1340,13 +1341,15 @@ private Mono> listBySubscriptionNextSinglePageAsync(St final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * Implements GET Clouds in a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1358,7 +1361,7 @@ private Mono> listBySubscriptionNextSinglePageAsync(St * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1368,12 +1371,14 @@ private Mono> listBySubscriptionNextSinglePageAsync(St } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** + * Implements GET Clouds in a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1384,7 +1389,7 @@ private Mono> listBySubscriptionNextSinglePageAsync(St * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1395,13 +1400,15 @@ private Mono> listByResourceGroupNextSinglePageAsync(S final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * Implements GET Clouds in a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1413,7 +1420,7 @@ private Mono> listByResourceGroupNextSinglePageAsync(S * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1423,7 +1430,7 @@ private Mono> listByResourceGroupNextSinglePageAsync(S } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/CloudsImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/CloudsImpl.java index 0e7057540dd8..87195f92cdfb 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/CloudsImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/CloudsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -20,33 +20,13 @@ public final class CloudsImpl implements Clouds { private final CloudsClient innerClient; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; - public CloudsImpl(CloudsClient innerClient, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + public CloudsImpl(CloudsClient innerClient, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String cloudResourceName, Context context) { Response inner @@ -76,6 +56,26 @@ public void delete(String resourceGroupName, String cloudResourceName, ForceDele this.serviceClient().delete(resourceGroupName, cloudResourceName, force, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudImpl(inner1, this.manager())); + } + public Cloud getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -137,7 +137,7 @@ private CloudsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/GuestAgentImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/GuestAgentImpl.java index 111b8a591f40..e58b983630ca 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/GuestAgentImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/GuestAgentImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -12,9 +12,9 @@ public final class GuestAgentImpl implements GuestAgent { private GuestAgentInner innerObject; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; - GuestAgentImpl(GuestAgentInner innerObject, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + GuestAgentImpl(GuestAgentInner innerObject, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -43,7 +43,7 @@ public GuestAgentInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/GuestAgentsClientImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/GuestAgentsClientImpl.java index 8c49153c7c71..6a009529f85e 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/GuestAgentsClientImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/GuestAgentsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.scvmm.fluent.GuestAgentsClient; import com.azure.resourcemanager.scvmm.fluent.models.GuestAgentInner; -import com.azure.resourcemanager.scvmm.models.GuestAgentListResult; +import com.azure.resourcemanager.scvmm.implementation.models.GuestAgentListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -50,199 +50,66 @@ public final class GuestAgentsClientImpl implements GuestAgentsClient { /** * The service client containing this operation class. */ - private final ScvmmClientImpl client; + private final ScVmmClientImpl client; /** * Initializes an instance of GuestAgentsClientImpl. * * @param client the instance of the service client containing this operation class. */ - GuestAgentsClientImpl(ScvmmClientImpl client) { + GuestAgentsClientImpl(ScVmmClientImpl client) { this.service = RestProxy.create(GuestAgentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ScvmmClientGuestAgents to be used by the proxy service to perform + * The interface defining all the services for ScVmmClientGuestAgents to be used by the proxy service to perform * REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ScvmmClientGuestAgen") + @Host("{endpoint}") + @ServiceInterface(name = "ScVmmClientGuestAgen") public interface GuestAgentsService { - @Headers({ "Content-Type: application/json" }) - @Get("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByVirtualMachineInstance(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, - Context context); - @Headers({ "Content-Type: application/json" }) @Get("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceUri") String resourceUri, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @BodyParam("application/json") GuestAgentInner resource, @HeaderParam("Accept") String accept, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceUri") String resourceUri, + @HeaderParam("accept") String accept, @BodyParam("application/json") GuestAgentInner resource, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, - Context context); + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceUri") String resourceUri, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByVirtualMachineInstance(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceUri") String resourceUri, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByVirtualMachineInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Implements GET GuestAgent in a vm. - * - * Returns the list of GuestAgent of the given vm. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GuestAgent list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVirtualMachineInstanceSinglePageAsync(String resourceUri) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByVirtualMachineInstance(this.client.getEndpoint(), - this.client.getApiVersion(), resourceUri, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Implements GET GuestAgent in a vm. - * - * Returns the list of GuestAgent of the given vm. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GuestAgent list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVirtualMachineInstanceSinglePageAsync(String resourceUri, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByVirtualMachineInstance(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Implements GET GuestAgent in a vm. - * - * Returns the list of GuestAgent of the given vm. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GuestAgent list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByVirtualMachineInstanceAsync(String resourceUri) { - return new PagedFlux<>(() -> listByVirtualMachineInstanceSinglePageAsync(resourceUri), - nextLink -> listByVirtualMachineInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Implements GET GuestAgent in a vm. - * - * Returns the list of GuestAgent of the given vm. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GuestAgent list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByVirtualMachineInstanceAsync(String resourceUri, Context context) { - return new PagedFlux<>(() -> listByVirtualMachineInstanceSinglePageAsync(resourceUri, context), - nextLink -> listByVirtualMachineInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Implements GET GuestAgent in a vm. - * - * Returns the list of GuestAgent of the given vm. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GuestAgent list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByVirtualMachineInstance(String resourceUri) { - return new PagedIterable<>(listByVirtualMachineInstanceAsync(resourceUri)); - } - - /** - * Implements GET GuestAgent in a vm. - * - * Returns the list of GuestAgent of the given vm. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GuestAgent list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByVirtualMachineInstance(String resourceUri, Context context) { - return new PagedIterable<>(listByVirtualMachineInstanceAsync(resourceUri, context)); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** @@ -376,7 +243,7 @@ private Mono>> createWithResponseAsync(String resource final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, - resource, accept, context)) + accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -410,7 +277,7 @@ private Mono>> createWithResponseAsync(String resource } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, resource, accept, + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, resource, context); } @@ -665,6 +532,138 @@ public void delete(String resourceUri) { } /** + * Implements GET GuestAgent in a vm. + * + * Returns the list of GuestAgent of the given vm. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GuestAgent list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVirtualMachineInstanceSinglePageAsync(String resourceUri) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByVirtualMachineInstance(this.client.getEndpoint(), + this.client.getApiVersion(), resourceUri, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Implements GET GuestAgent in a vm. + * + * Returns the list of GuestAgent of the given vm. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GuestAgent list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVirtualMachineInstanceSinglePageAsync(String resourceUri, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByVirtualMachineInstance(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Implements GET GuestAgent in a vm. + * + * Returns the list of GuestAgent of the given vm. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GuestAgent list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVirtualMachineInstanceAsync(String resourceUri) { + return new PagedFlux<>(() -> listByVirtualMachineInstanceSinglePageAsync(resourceUri), + nextLink -> listByVirtualMachineInstanceNextSinglePageAsync(nextLink)); + } + + /** + * Implements GET GuestAgent in a vm. + * + * Returns the list of GuestAgent of the given vm. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GuestAgent list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVirtualMachineInstanceAsync(String resourceUri, Context context) { + return new PagedFlux<>(() -> listByVirtualMachineInstanceSinglePageAsync(resourceUri, context), + nextLink -> listByVirtualMachineInstanceNextSinglePageAsync(nextLink, context)); + } + + /** + * Implements GET GuestAgent in a vm. + * + * Returns the list of GuestAgent of the given vm. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GuestAgent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVirtualMachineInstance(String resourceUri) { + return new PagedIterable<>(listByVirtualMachineInstanceAsync(resourceUri)); + } + + /** + * Implements GET GuestAgent in a vm. + * + * Returns the list of GuestAgent of the given vm. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GuestAgent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVirtualMachineInstance(String resourceUri, Context context) { + return new PagedIterable<>(listByVirtualMachineInstanceAsync(resourceUri, context)); + } + + /** + * Implements GET GuestAgent in a vm. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -692,6 +691,8 @@ private Mono> listByVirtualMachineInstanceNextSin } /** + * Implements GET GuestAgent in a vm. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/GuestAgentsImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/GuestAgentsImpl.java index 9a56424f12ec..275922772d1f 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/GuestAgentsImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/GuestAgentsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -19,23 +19,13 @@ public final class GuestAgentsImpl implements GuestAgents { private final GuestAgentsClient innerClient; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; - public GuestAgentsImpl(GuestAgentsClient innerClient, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + public GuestAgentsImpl(GuestAgentsClient innerClient, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable listByVirtualMachineInstance(String resourceUri) { - PagedIterable inner = this.serviceClient().listByVirtualMachineInstance(resourceUri); - return ResourceManagerUtils.mapPage(inner, inner1 -> new GuestAgentImpl(inner1, this.manager())); - } - - public PagedIterable listByVirtualMachineInstance(String resourceUri, Context context) { - PagedIterable inner = this.serviceClient().listByVirtualMachineInstance(resourceUri, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new GuestAgentImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceUri, Context context) { Response inner = this.serviceClient().getWithResponse(resourceUri, context); if (inner != null) { @@ -81,11 +71,21 @@ public void delete(String resourceUri) { this.serviceClient().delete(resourceUri); } + public PagedIterable listByVirtualMachineInstance(String resourceUri) { + PagedIterable inner = this.serviceClient().listByVirtualMachineInstance(resourceUri); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GuestAgentImpl(inner1, this.manager())); + } + + public PagedIterable listByVirtualMachineInstance(String resourceUri, Context context) { + PagedIterable inner = this.serviceClient().listByVirtualMachineInstance(resourceUri, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GuestAgentImpl(inner1, this.manager())); + } + private GuestAgentsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/InventoryItemImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/InventoryItemImpl.java index 06d55e5d85b3..213972fe2927 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/InventoryItemImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/InventoryItemImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -13,9 +13,9 @@ public final class InventoryItemImpl implements InventoryItem, InventoryItem.Definition { private InventoryItemInner innerObject; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; - InventoryItemImpl(InventoryItemInner innerObject, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + InventoryItemImpl(InventoryItemInner innerObject, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -48,7 +48,7 @@ public InventoryItemInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } @@ -81,7 +81,7 @@ public InventoryItem create(Context context) { return this; } - InventoryItemImpl(String name, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + InventoryItemImpl(String name, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerObject = new InventoryItemInner(); this.serviceManager = serviceManager; this.inventoryItemResourceName = name; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/InventoryItemsClientImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/InventoryItemsClientImpl.java index b4f811208dcb..1f54eb0828c7 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/InventoryItemsClientImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/InventoryItemsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.scvmm.fluent.InventoryItemsClient; import com.azure.resourcemanager.scvmm.fluent.models.InventoryItemInner; -import com.azure.resourcemanager.scvmm.models.InventoryItemListResult; +import com.azure.resourcemanager.scvmm.implementation.models.InventoryItemListResult; import reactor.core.publisher.Mono; /** @@ -45,228 +45,73 @@ public final class InventoryItemsClientImpl implements InventoryItemsClient { /** * The service client containing this operation class. */ - private final ScvmmClientImpl client; + private final ScVmmClientImpl client; /** * Initializes an instance of InventoryItemsClientImpl. * * @param client the instance of the service client containing this operation class. */ - InventoryItemsClientImpl(ScvmmClientImpl client) { + InventoryItemsClientImpl(ScVmmClientImpl client) { this.service = RestProxy.create(InventoryItemsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ScvmmClientInventoryItems to be used by the proxy service to perform + * The interface defining all the services for ScVmmClientInventoryItems to be used by the proxy service to perform * REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ScvmmClientInventory") + @Host("{endpoint}") + @ServiceInterface(name = "ScVmmClientInventory") public interface InventoryItemsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByVmmServer(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vmmServerName") String vmmServerName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vmmServerName") String vmmServerName, @PathParam("inventoryItemResourceName") String inventoryItemResourceName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, + Mono> create(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vmmServerName") String vmmServerName, @PathParam("inventoryItemResourceName") String inventoryItemResourceName, - @BodyParam("application/json") InventoryItemInner resource, @HeaderParam("Accept") String accept, + @HeaderParam("accept") String accept, @BodyParam("application/json") InventoryItemInner resource, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vmmServerName") String vmmServerName, @PathParam("inventoryItemResourceName") String inventoryItemResourceName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByVmmServer(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vmmServerName") String vmmServerName, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByVmmServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Implements GET for the list of Inventory Items in the VMMServer. - * - * Returns the list of inventoryItems in the given VmmServer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 InventoryItem list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVmmServerSinglePageAsync(String resourceGroupName, - String vmmServerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmmServerName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmmServerName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByVmmServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, vmmServerName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Implements GET for the list of Inventory Items in the VMMServer. - * - * Returns the list of inventoryItems in the given VmmServer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 InventoryItem list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVmmServerSinglePageAsync(String resourceGroupName, - String vmmServerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmmServerName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmmServerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByVmmServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, vmmServerName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Implements GET for the list of Inventory Items in the VMMServer. - * - * Returns the list of inventoryItems in the given VmmServer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 InventoryItem list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByVmmServerAsync(String resourceGroupName, String vmmServerName) { - return new PagedFlux<>(() -> listByVmmServerSinglePageAsync(resourceGroupName, vmmServerName), - nextLink -> listByVmmServerNextSinglePageAsync(nextLink)); - } - - /** - * Implements GET for the list of Inventory Items in the VMMServer. - * - * Returns the list of inventoryItems in the given VmmServer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 InventoryItem list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByVmmServerAsync(String resourceGroupName, String vmmServerName, - Context context) { - return new PagedFlux<>(() -> listByVmmServerSinglePageAsync(resourceGroupName, vmmServerName, context), - nextLink -> listByVmmServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Implements GET for the list of Inventory Items in the VMMServer. - * - * Returns the list of inventoryItems in the given VmmServer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 InventoryItem list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByVmmServer(String resourceGroupName, String vmmServerName) { - return new PagedIterable<>(listByVmmServerAsync(resourceGroupName, vmmServerName)); - } - - /** - * Implements GET for the list of Inventory Items in the VMMServer. - * - * Returns the list of inventoryItems in the given VmmServer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 InventoryItem list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByVmmServer(String resourceGroupName, String vmmServerName, - Context context) { - return new PagedIterable<>(listByVmmServerAsync(resourceGroupName, vmmServerName, context)); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** @@ -456,8 +301,8 @@ private Mono> createWithResponseAsync(String resour final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, vmmServerName, inventoryItemResourceName, resource, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, vmmServerName, inventoryItemResourceName, accept, + resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -506,7 +351,7 @@ private Mono> createWithResponseAsync(String resour final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, vmmServerName, inventoryItemResourceName, resource, accept, context); + resourceGroupName, vmmServerName, inventoryItemResourceName, accept, resource, context); } /** @@ -715,6 +560,163 @@ public void delete(String resourceGroupName, String vmmServerName, String invent } /** + * Implements GET for the list of Inventory Items in the VMMServer. + * + * Returns the list of inventoryItems in the given VmmServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InventoryItem list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVmmServerSinglePageAsync(String resourceGroupName, + String vmmServerName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vmmServerName == null) { + return Mono.error(new IllegalArgumentException("Parameter vmmServerName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByVmmServer(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vmmServerName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Implements GET for the list of Inventory Items in the VMMServer. + * + * Returns the list of inventoryItems in the given VmmServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InventoryItem list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVmmServerSinglePageAsync(String resourceGroupName, + String vmmServerName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vmmServerName == null) { + return Mono.error(new IllegalArgumentException("Parameter vmmServerName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByVmmServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vmmServerName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Implements GET for the list of Inventory Items in the VMMServer. + * + * Returns the list of inventoryItems in the given VmmServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InventoryItem list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVmmServerAsync(String resourceGroupName, String vmmServerName) { + return new PagedFlux<>(() -> listByVmmServerSinglePageAsync(resourceGroupName, vmmServerName), + nextLink -> listByVmmServerNextSinglePageAsync(nextLink)); + } + + /** + * Implements GET for the list of Inventory Items in the VMMServer. + * + * Returns the list of inventoryItems in the given VmmServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InventoryItem list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVmmServerAsync(String resourceGroupName, String vmmServerName, + Context context) { + return new PagedFlux<>(() -> listByVmmServerSinglePageAsync(resourceGroupName, vmmServerName, context), + nextLink -> listByVmmServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Implements GET for the list of Inventory Items in the VMMServer. + * + * Returns the list of inventoryItems in the given VmmServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InventoryItem list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVmmServer(String resourceGroupName, String vmmServerName) { + return new PagedIterable<>(listByVmmServerAsync(resourceGroupName, vmmServerName)); + } + + /** + * Implements GET for the list of Inventory Items in the VMMServer. + * + * Returns the list of inventoryItems in the given VmmServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InventoryItem list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVmmServer(String resourceGroupName, String vmmServerName, + Context context) { + return new PagedIterable<>(listByVmmServerAsync(resourceGroupName, vmmServerName, context)); + } + + /** + * Implements GET for the list of Inventory Items in the VMMServer. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -742,6 +744,8 @@ private Mono> listByVmmServerNextSinglePageAsy } /** + * Implements GET for the list of Inventory Items in the VMMServer. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/InventoryItemsImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/InventoryItemsImpl.java index 5292a8b4c78e..3e074188c4d4 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/InventoryItemsImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/InventoryItemsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -19,27 +19,14 @@ public final class InventoryItemsImpl implements InventoryItems { private final InventoryItemsClient innerClient; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; public InventoryItemsImpl(InventoryItemsClient innerClient, - com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable listByVmmServer(String resourceGroupName, String vmmServerName) { - PagedIterable inner - = this.serviceClient().listByVmmServer(resourceGroupName, vmmServerName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new InventoryItemImpl(inner1, this.manager())); - } - - public PagedIterable listByVmmServer(String resourceGroupName, String vmmServerName, - Context context) { - PagedIterable inner - = this.serviceClient().listByVmmServer(resourceGroupName, vmmServerName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new InventoryItemImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String vmmServerName, String inventoryItemResourceName, Context context) { Response inner = this.serviceClient() @@ -72,6 +59,19 @@ public void delete(String resourceGroupName, String vmmServerName, String invent this.serviceClient().delete(resourceGroupName, vmmServerName, inventoryItemResourceName); } + public PagedIterable listByVmmServer(String resourceGroupName, String vmmServerName) { + PagedIterable inner + = this.serviceClient().listByVmmServer(resourceGroupName, vmmServerName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new InventoryItemImpl(inner1, this.manager())); + } + + public PagedIterable listByVmmServer(String resourceGroupName, String vmmServerName, + Context context) { + PagedIterable inner + = this.serviceClient().listByVmmServer(resourceGroupName, vmmServerName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new InventoryItemImpl(inner1, this.manager())); + } + public InventoryItem getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -153,7 +153,7 @@ private InventoryItemsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/OperationImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/OperationImpl.java index 803e4943d792..4355b84044ee 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/OperationImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/OperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -13,9 +13,9 @@ public final class OperationImpl implements Operation { private OperationInner innerObject; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; - OperationImpl(OperationInner innerObject, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + OperationImpl(OperationInner innerObject, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -44,7 +44,7 @@ public OperationInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/OperationsClientImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/OperationsClientImpl.java index 484671dcab6b..f6224c1012a4 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/OperationsClientImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.scvmm.fluent.OperationsClient; import com.azure.resourcemanager.scvmm.fluent.models.OperationInner; -import com.azure.resourcemanager.scvmm.models.OperationListResult; +import com.azure.resourcemanager.scvmm.implementation.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -42,39 +42,39 @@ public final class OperationsClientImpl implements OperationsClient { /** * The service client containing this operation class. */ - private final ScvmmClientImpl client; + private final ScVmmClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(ScvmmClientImpl client) { + OperationsClientImpl(ScVmmClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ScvmmClientOperations to be used by the proxy service to perform REST + * The interface defining all the services for ScVmmClientOperations to be used by the proxy service to perform REST * calls. */ - @Host("{$host}") - @ServiceInterface(name = "ScvmmClientOperation") + @Host("{endpoint}") + @ServiceInterface(name = "ScVmmClientOperation") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.ScVmm/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } /** diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/OperationsImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/OperationsImpl.java index 5d3bdc741a00..9a761c36d486 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/OperationsImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -17,9 +17,9 @@ public final class OperationsImpl implements Operations { private final OperationsClient innerClient; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; - public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -38,7 +38,7 @@ private OperationsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/ResourceManagerUtils.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/ResourceManagerUtils.java index 0d560b270549..68d74539f913 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/ResourceManagerUtils.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/ScvmmClientBuilder.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/ScVmmClientBuilder.java similarity index 71% rename from sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/ScvmmClientBuilder.java rename to sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/ScVmmClientBuilder.java index 051c34ca6b1c..0ad2949e6bed 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/ScvmmClientBuilder.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/ScVmmClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -15,39 +15,39 @@ import java.time.Duration; /** - * A builder for creating a new instance of the ScvmmClientImpl type. + * A builder for creating a new instance of the ScVmmClientImpl type. */ -@ServiceClientBuilder(serviceClients = { ScvmmClientImpl.class }) -public final class ScvmmClientBuilder { +@ServiceClientBuilder(serviceClients = { ScVmmClientImpl.class }) +public final class ScVmmClientBuilder { /* - * The ID of the target subscription. The value must be an UUID. + * Server parameter */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets Server parameter. * - * @param subscriptionId the subscriptionId value. - * @return the ScvmmClientBuilder. + * @param endpoint the endpoint value. + * @return the ScVmmClientBuilder. */ - public ScvmmClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public ScVmmClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. - * @return the ScvmmClientBuilder. + * @param subscriptionId the subscriptionId value. + * @return the ScVmmClientBuilder. */ - public ScvmmClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public ScVmmClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -60,9 +60,9 @@ public ScvmmClientBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the ScvmmClientBuilder. + * @return the ScVmmClientBuilder. */ - public ScvmmClientBuilder environment(AzureEnvironment environment) { + public ScVmmClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public ScvmmClientBuilder environment(AzureEnvironment environment) { * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the ScvmmClientBuilder. + * @return the ScVmmClientBuilder. */ - public ScvmmClientBuilder pipeline(HttpPipeline pipeline) { + public ScVmmClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -92,9 +92,9 @@ public ScvmmClientBuilder pipeline(HttpPipeline pipeline) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the ScvmmClientBuilder. + * @return the ScVmmClientBuilder. */ - public ScvmmClientBuilder defaultPollInterval(Duration defaultPollInterval) { + public ScVmmClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -108,20 +108,19 @@ public ScvmmClientBuilder defaultPollInterval(Duration defaultPollInterval) { * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the ScvmmClientBuilder. + * @return the ScVmmClientBuilder. */ - public ScvmmClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public ScVmmClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of ScvmmClientImpl with the provided parameters. + * Builds an instance of ScVmmClientImpl with the provided parameters. * - * @return an instance of ScvmmClientImpl. + * @return an instance of ScVmmClientImpl. */ - public ScvmmClientImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + public ScVmmClientImpl buildClient() { AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) ? pipeline @@ -131,8 +130,8 @@ public ScvmmClientImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - ScvmmClientImpl client = new ScvmmClientImpl(localPipeline, localSerializerAdapter, localDefaultPollInterval, - localEnvironment, this.subscriptionId, localEndpoint); + ScVmmClientImpl client = new ScVmmClientImpl(localPipeline, localSerializerAdapter, localDefaultPollInterval, + localEnvironment, this.endpoint, this.subscriptionId); return client; } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/ScvmmClientImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/ScVmmClientImpl.java similarity index 95% rename from sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/ScvmmClientImpl.java rename to sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/ScVmmClientImpl.java index 1c3d59949962..cde00b245631 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/ScvmmClientImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/ScVmmClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -28,7 +28,7 @@ import com.azure.resourcemanager.scvmm.fluent.GuestAgentsClient; import com.azure.resourcemanager.scvmm.fluent.InventoryItemsClient; import com.azure.resourcemanager.scvmm.fluent.OperationsClient; -import com.azure.resourcemanager.scvmm.fluent.ScvmmClient; +import com.azure.resourcemanager.scvmm.fluent.ScVmmClient; import com.azure.resourcemanager.scvmm.fluent.VirtualMachineInstancesClient; import com.azure.resourcemanager.scvmm.fluent.VirtualMachineTemplatesClient; import com.azure.resourcemanager.scvmm.fluent.VirtualNetworksClient; @@ -44,31 +44,17 @@ import reactor.core.publisher.Mono; /** - * Initializes a new instance of the ScvmmClientImpl type. + * Initializes a new instance of the ScVmmClientImpl type. */ -@ServiceClient(builder = ScvmmClientBuilder.class) -public final class ScvmmClientImpl implements ScvmmClient { +@ServiceClient(builder = ScVmmClientBuilder.class) +public final class ScVmmClientImpl implements ScVmmClient { /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Server parameter. */ private final String endpoint; /** - * Gets server parameter. + * Gets Server parameter. * * @return the endpoint value. */ @@ -77,12 +63,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -90,6 +76,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -133,173 +133,173 @@ public Duration getDefaultPollInterval() { } /** - * The VirtualMachineInstancesClient object to access its operations. + * The OperationsClient object to access its operations. */ - private final VirtualMachineInstancesClient virtualMachineInstances; + private final OperationsClient operations; /** - * Gets the VirtualMachineInstancesClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the VirtualMachineInstancesClient object. + * @return the OperationsClient object. */ - public VirtualMachineInstancesClient getVirtualMachineInstances() { - return this.virtualMachineInstances; + public OperationsClient getOperations() { + return this.operations; } /** - * The GuestAgentsClient object to access its operations. + * The VmmServersClient object to access its operations. */ - private final GuestAgentsClient guestAgents; + private final VmmServersClient vmmServers; /** - * Gets the GuestAgentsClient object to access its operations. + * Gets the VmmServersClient object to access its operations. * - * @return the GuestAgentsClient object. + * @return the VmmServersClient object. */ - public GuestAgentsClient getGuestAgents() { - return this.guestAgents; + public VmmServersClient getVmmServers() { + return this.vmmServers; } /** - * The VmInstanceHybridIdentityMetadatasClient object to access its operations. + * The CloudsClient object to access its operations. */ - private final VmInstanceHybridIdentityMetadatasClient vmInstanceHybridIdentityMetadatas; + private final CloudsClient clouds; /** - * Gets the VmInstanceHybridIdentityMetadatasClient object to access its operations. + * Gets the CloudsClient object to access its operations. * - * @return the VmInstanceHybridIdentityMetadatasClient object. + * @return the CloudsClient object. */ - public VmInstanceHybridIdentityMetadatasClient getVmInstanceHybridIdentityMetadatas() { - return this.vmInstanceHybridIdentityMetadatas; + public CloudsClient getClouds() { + return this.clouds; } /** - * The OperationsClient object to access its operations. + * The VirtualNetworksClient object to access its operations. */ - private final OperationsClient operations; + private final VirtualNetworksClient virtualNetworks; /** - * Gets the OperationsClient object to access its operations. + * Gets the VirtualNetworksClient object to access its operations. * - * @return the OperationsClient object. + * @return the VirtualNetworksClient object. */ - public OperationsClient getOperations() { - return this.operations; + public VirtualNetworksClient getVirtualNetworks() { + return this.virtualNetworks; } /** - * The AvailabilitySetsClient object to access its operations. + * The VirtualMachineTemplatesClient object to access its operations. */ - private final AvailabilitySetsClient availabilitySets; + private final VirtualMachineTemplatesClient virtualMachineTemplates; /** - * Gets the AvailabilitySetsClient object to access its operations. + * Gets the VirtualMachineTemplatesClient object to access its operations. * - * @return the AvailabilitySetsClient object. + * @return the VirtualMachineTemplatesClient object. */ - public AvailabilitySetsClient getAvailabilitySets() { - return this.availabilitySets; + public VirtualMachineTemplatesClient getVirtualMachineTemplates() { + return this.virtualMachineTemplates; } /** - * The CloudsClient object to access its operations. + * The AvailabilitySetsClient object to access its operations. */ - private final CloudsClient clouds; + private final AvailabilitySetsClient availabilitySets; /** - * Gets the CloudsClient object to access its operations. + * Gets the AvailabilitySetsClient object to access its operations. * - * @return the CloudsClient object. + * @return the AvailabilitySetsClient object. */ - public CloudsClient getClouds() { - return this.clouds; + public AvailabilitySetsClient getAvailabilitySets() { + return this.availabilitySets; } /** - * The VirtualMachineTemplatesClient object to access its operations. + * The InventoryItemsClient object to access its operations. */ - private final VirtualMachineTemplatesClient virtualMachineTemplates; + private final InventoryItemsClient inventoryItems; /** - * Gets the VirtualMachineTemplatesClient object to access its operations. + * Gets the InventoryItemsClient object to access its operations. * - * @return the VirtualMachineTemplatesClient object. + * @return the InventoryItemsClient object. */ - public VirtualMachineTemplatesClient getVirtualMachineTemplates() { - return this.virtualMachineTemplates; + public InventoryItemsClient getInventoryItems() { + return this.inventoryItems; } /** - * The VirtualNetworksClient object to access its operations. + * The VirtualMachineInstancesClient object to access its operations. */ - private final VirtualNetworksClient virtualNetworks; + private final VirtualMachineInstancesClient virtualMachineInstances; /** - * Gets the VirtualNetworksClient object to access its operations. + * Gets the VirtualMachineInstancesClient object to access its operations. * - * @return the VirtualNetworksClient object. + * @return the VirtualMachineInstancesClient object. */ - public VirtualNetworksClient getVirtualNetworks() { - return this.virtualNetworks; + public VirtualMachineInstancesClient getVirtualMachineInstances() { + return this.virtualMachineInstances; } /** - * The VmmServersClient object to access its operations. + * The VmInstanceHybridIdentityMetadatasClient object to access its operations. */ - private final VmmServersClient vmmServers; + private final VmInstanceHybridIdentityMetadatasClient vmInstanceHybridIdentityMetadatas; /** - * Gets the VmmServersClient object to access its operations. + * Gets the VmInstanceHybridIdentityMetadatasClient object to access its operations. * - * @return the VmmServersClient object. + * @return the VmInstanceHybridIdentityMetadatasClient object. */ - public VmmServersClient getVmmServers() { - return this.vmmServers; + public VmInstanceHybridIdentityMetadatasClient getVmInstanceHybridIdentityMetadatas() { + return this.vmInstanceHybridIdentityMetadatas; } /** - * The InventoryItemsClient object to access its operations. + * The GuestAgentsClient object to access its operations. */ - private final InventoryItemsClient inventoryItems; + private final GuestAgentsClient guestAgents; /** - * Gets the InventoryItemsClient object to access its operations. + * Gets the GuestAgentsClient object to access its operations. * - * @return the InventoryItemsClient object. + * @return the GuestAgentsClient object. */ - public InventoryItemsClient getInventoryItems() { - return this.inventoryItems; + public GuestAgentsClient getGuestAgents() { + return this.guestAgents; } /** - * Initializes an instance of ScvmmClient client. + * Initializes an instance of ScVmmClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. + * @param endpoint Server parameter. * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param endpoint server parameter. */ - ScvmmClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, - AzureEnvironment environment, String subscriptionId, String endpoint) { + ScVmmClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, + AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; + this.subscriptionId = subscriptionId; this.apiVersion = "2023-10-07"; - this.virtualMachineInstances = new VirtualMachineInstancesClientImpl(this); - this.guestAgents = new GuestAgentsClientImpl(this); - this.vmInstanceHybridIdentityMetadatas = new VmInstanceHybridIdentityMetadatasClientImpl(this); this.operations = new OperationsClientImpl(this); - this.availabilitySets = new AvailabilitySetsClientImpl(this); + this.vmmServers = new VmmServersClientImpl(this); this.clouds = new CloudsClientImpl(this); - this.virtualMachineTemplates = new VirtualMachineTemplatesClientImpl(this); this.virtualNetworks = new VirtualNetworksClientImpl(this); - this.vmmServers = new VmmServersClientImpl(this); + this.virtualMachineTemplates = new VirtualMachineTemplatesClientImpl(this); + this.availabilitySets = new AvailabilitySetsClientImpl(this); this.inventoryItems = new InventoryItemsClientImpl(this); + this.virtualMachineInstances = new VirtualMachineInstancesClientImpl(this); + this.vmInstanceHybridIdentityMetadatas = new VmInstanceHybridIdentityMetadatasClientImpl(this); + this.guestAgents = new GuestAgentsClientImpl(this); } /** @@ -428,5 +428,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(ScvmmClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ScVmmClientImpl.class); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineInstanceImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineInstanceImpl.java index 6a901cf73f14..5191e884372a 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineInstanceImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineInstanceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -13,10 +13,10 @@ public final class VirtualMachineInstanceImpl implements VirtualMachineInstance { private VirtualMachineInstanceInner innerObject; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; VirtualMachineInstanceImpl(VirtualMachineInstanceInner innerObject, - com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -33,6 +33,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public VirtualMachineInstanceProperties properties() { return this.innerModel().properties(); } @@ -41,15 +45,11 @@ public ExtendedLocation extendedLocation() { return this.innerModel().extendedLocation(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - public VirtualMachineInstanceInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineInstancesClientImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineInstancesClientImpl.java index 1cf7281e2821..57018dfc274b 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineInstancesClientImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineInstancesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -35,12 +35,12 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.scvmm.fluent.VirtualMachineInstancesClient; import com.azure.resourcemanager.scvmm.fluent.models.VirtualMachineInstanceInner; +import com.azure.resourcemanager.scvmm.implementation.models.VirtualMachineInstanceListResult; import com.azure.resourcemanager.scvmm.models.DeleteFromHost; import com.azure.resourcemanager.scvmm.models.ForceDelete; import com.azure.resourcemanager.scvmm.models.StopVirtualMachineOptions; import com.azure.resourcemanager.scvmm.models.VirtualMachineCreateCheckpoint; import com.azure.resourcemanager.scvmm.models.VirtualMachineDeleteCheckpoint; -import com.azure.resourcemanager.scvmm.models.VirtualMachineInstanceListResult; import com.azure.resourcemanager.scvmm.models.VirtualMachineInstanceUpdate; import com.azure.resourcemanager.scvmm.models.VirtualMachineRestoreCheckpoint; import java.nio.ByteBuffer; @@ -59,130 +59,119 @@ public final class VirtualMachineInstancesClientImpl implements VirtualMachineIn /** * The service client containing this operation class. */ - private final ScvmmClientImpl client; + private final ScVmmClientImpl client; /** * Initializes an instance of VirtualMachineInstancesClientImpl. * * @param client the instance of the service client containing this operation class. */ - VirtualMachineInstancesClientImpl(ScvmmClientImpl client) { + VirtualMachineInstancesClientImpl(ScVmmClientImpl client) { this.service = RestProxy.create(VirtualMachineInstancesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ScvmmClientVirtualMachineInstances to be used by the proxy service to + * The interface defining all the services for ScVmmClientVirtualMachineInstances to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ScvmmClientVirtualMa") + @Host("{endpoint}") + @ServiceInterface(name = "ScVmmClientVirtualMa") public interface VirtualMachineInstancesService { - @Headers({ "Content-Type: application/json" }) - @Get("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, - Context context); - @Headers({ "Content-Type: application/json" }) @Get("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceUri") String resourceUri, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @BodyParam("application/json") VirtualMachineInstanceInner resource, @HeaderParam("Accept") String accept, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceUri") String resourceUri, + @HeaderParam("accept") String accept, @BodyParam("application/json") VirtualMachineInstanceInner resource, Context context); @Headers({ "Content-Type: application/json" }) @Patch("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @BodyParam("application/json") VirtualMachineInstanceUpdate properties, - @HeaderParam("Accept") String accept, Context context); + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceUri") String resourceUri, + @HeaderParam("accept") String accept, + @BodyParam("application/json") VirtualMachineInstanceUpdate properties, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceUri") String resourceUri, @QueryParam("force") ForceDelete force, @QueryParam("deleteFromHost") DeleteFromHost deleteFromHost, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/createCheckpoint") + @Get("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceUri") String resourceUri, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/stop") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createCheckpoint(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @BodyParam("application/json") VirtualMachineCreateCheckpoint body, @HeaderParam("Accept") String accept, + Mono>> stop(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceUri") String resourceUri, + @HeaderParam("accept") String accept, @BodyParam("application/json") StopVirtualMachineOptions body, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/deleteCheckpoint") + @Post("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/start") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteCheckpoint(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @BodyParam("application/json") VirtualMachineDeleteCheckpoint body, @HeaderParam("Accept") String accept, - Context context); + Mono>> start(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceUri") String resourceUri, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restart") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restart(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, - Context context); + Mono>> restart(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceUri") String resourceUri, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restoreCheckpoint") + @Post("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/createCheckpoint") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restoreCheckpoint(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @BodyParam("application/json") VirtualMachineRestoreCheckpoint body, @HeaderParam("Accept") String accept, + Mono>> createCheckpoint(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceUri") String resourceUri, + @HeaderParam("accept") String accept, @BodyParam("application/json") VirtualMachineCreateCheckpoint body, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/start") + @Post("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/deleteCheckpoint") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, + Mono>> deleteCheckpoint(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceUri") String resourceUri, + @HeaderParam("accept") String accept, @BodyParam("application/json") VirtualMachineDeleteCheckpoint body, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/stop") + @Post("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restoreCheckpoint") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @BodyParam("application/json") StopVirtualMachineOptions body, @HeaderParam("Accept") String accept, + Mono>> restoreCheckpoint(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceUri") String resourceUri, + @HeaderParam("accept") String accept, @BodyParam("application/json") VirtualMachineRestoreCheckpoint body, Context context); @Headers({ "Content-Type: application/json" }) @@ -190,134 +179,8 @@ Mono>> stop(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Implements List virtual machine instances. - * - * Lists all of the virtual machine instances within the specified parent resource. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualMachineInstance list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceUri) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Implements List virtual machine instances. - * - * Lists all of the virtual machine instances within the specified parent resource. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualMachineInstance list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceUri, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Implements List virtual machine instances. - * - * Lists all of the virtual machine instances within the specified parent resource. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualMachineInstance list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceUri) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceUri), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Implements List virtual machine instances. - * - * Lists all of the virtual machine instances within the specified parent resource. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualMachineInstance list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceUri, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Implements List virtual machine instances. - * - * Lists all of the virtual machine instances within the specified parent resource. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualMachineInstance list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceUri) { - return new PagedIterable<>(listAsync(resourceUri)); - } - - /** - * Implements List virtual machine instances. - * - * Lists all of the virtual machine instances within the specified parent resource. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualMachineInstance list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceUri, Context context) { - return new PagedIterable<>(listAsync(resourceUri, context)); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** @@ -453,7 +316,7 @@ private Mono>> createOrUpdateWithResponseAsync(String final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - resourceUri, resource, accept, context)) + resourceUri, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -488,8 +351,8 @@ private Mono>> createOrUpdateWithResponseAsync(String } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, resource, - accept, context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, + resource, context); } /** @@ -685,7 +548,7 @@ private Mono>> updateWithResponseAsync(String resource final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, - properties, accept, context)) + accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -719,7 +582,7 @@ private Mono>> updateWithResponseAsync(String resource } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, properties, accept, + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, properties, context); } @@ -1133,20 +996,19 @@ public void delete(String resourceUri, ForceDelete force, DeleteFromHost deleteF } /** - * Implements the operation to creates a checkpoint in a virtual machine instance. + * Implements List virtual machine instances. * - * Creates a checkpoint in virtual machine instance. + * Lists all of the virtual machine instances within the specified parent resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response of a VirtualMachineInstance list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createCheckpointWithResponseAsync(String resourceUri, - VirtualMachineCreateCheckpoint body) { + private Mono> listSinglePageAsync(String resourceUri) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1154,34 +1016,30 @@ private Mono>> createCheckpointWithResponseAsync(Strin if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createCheckpoint(this.client.getEndpoint(), this.client.getApiVersion(), - resourceUri, body, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to creates a checkpoint in a virtual machine instance. + * Implements List virtual machine instances. * - * Creates a checkpoint in virtual machine instance. + * Lists all of the virtual machine instances within the specified parent resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response of a VirtualMachineInstance list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createCheckpointWithResponseAsync(String resourceUri, - VirtualMachineCreateCheckpoint body, Context context) { + private Mono> listSinglePageAsync(String resourceUri, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1189,100 +1047,227 @@ private Mono>> createCheckpointWithResponseAsync(Strin if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createCheckpoint(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, body, - accept, context); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Implements the operation to creates a checkpoint in a virtual machine instance. + * Implements List virtual machine instances. * - * Creates a checkpoint in virtual machine instance. + * Lists all of the virtual machine instances within the specified parent resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response of a VirtualMachineInstance list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCreateCheckpointAsync(String resourceUri, - VirtualMachineCreateCheckpoint body) { - Mono>> mono = createCheckpointWithResponseAsync(resourceUri, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceUri) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceUri), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Implements the operation to creates a checkpoint in a virtual machine instance. + * Implements List virtual machine instances. * - * Creates a checkpoint in virtual machine instance. + * Lists all of the virtual machine instances within the specified parent resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response of a VirtualMachineInstance list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCreateCheckpointAsync(String resourceUri, - VirtualMachineCreateCheckpoint body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createCheckpointWithResponseAsync(resourceUri, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceUri, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Implements the operation to creates a checkpoint in a virtual machine instance. + * Implements List virtual machine instances. * - * Creates a checkpoint in virtual machine instance. + * Lists all of the virtual machine instances within the specified parent resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the response of a VirtualMachineInstance list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCreateCheckpoint(String resourceUri, - VirtualMachineCreateCheckpoint body) { - return this.beginCreateCheckpointAsync(resourceUri, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceUri) { + return new PagedIterable<>(listAsync(resourceUri)); } /** - * Implements the operation to creates a checkpoint in a virtual machine instance. + * Implements List virtual machine instances. * - * Creates a checkpoint in virtual machine instance. + * Lists all of the virtual machine instances within the specified parent resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the response of a VirtualMachineInstance list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCreateCheckpoint(String resourceUri, - VirtualMachineCreateCheckpoint body, Context context) { - return this.beginCreateCheckpointAsync(resourceUri, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceUri, Context context) { + return new PagedIterable<>(listAsync(resourceUri, context)); } /** - * Implements the operation to creates a checkpoint in a virtual machine instance. + * Implements the operation to stop a virtual machine. * - * Creates a checkpoint in virtual machine instance. + * The operation to power off (stop) a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopWithResponseAsync(String resourceUri, StopVirtualMachineOptions body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Implements the operation to stop a virtual machine. + * + * The operation to power off (stop) a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopWithResponseAsync(String resourceUri, StopVirtualMachineOptions body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.stop(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, body, context); + } + + /** + * Implements the operation to stop a virtual machine. + * + * The operation to power off (stop) a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStopAsync(String resourceUri, StopVirtualMachineOptions body) { + Mono>> mono = stopWithResponseAsync(resourceUri, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Implements the operation to stop a virtual machine. + * + * The operation to power off (stop) a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStopAsync(String resourceUri, StopVirtualMachineOptions body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = stopWithResponseAsync(resourceUri, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Implements the operation to stop a virtual machine. + * + * The operation to power off (stop) a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStop(String resourceUri, StopVirtualMachineOptions body) { + return this.beginStopAsync(resourceUri, body).getSyncPoller(); + } + + /** + * Implements the operation to stop a virtual machine. + * + * The operation to power off (stop) a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStop(String resourceUri, StopVirtualMachineOptions body, + Context context) { + return this.beginStopAsync(resourceUri, body, context).getSyncPoller(); + } + + /** + * Implements the operation to stop a virtual machine. + * + * The operation to power off (stop) a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -1292,14 +1277,14 @@ public SyncPoller, Void> beginCreateCheckpoint(String resourceU * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createCheckpointAsync(String resourceUri, VirtualMachineCreateCheckpoint body) { - return beginCreateCheckpointAsync(resourceUri, body).last().flatMap(this.client::getLroFinalResultOrError); + private Mono stopAsync(String resourceUri, StopVirtualMachineOptions body) { + return beginStopAsync(resourceUri, body).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to creates a checkpoint in a virtual machine instance. + * Implements the operation to stop a virtual machine. * - * Creates a checkpoint in virtual machine instance. + * The operation to power off (stop) a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -1310,15 +1295,14 @@ private Mono createCheckpointAsync(String resourceUri, VirtualMachineCreat * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createCheckpointAsync(String resourceUri, VirtualMachineCreateCheckpoint body, Context context) { - return beginCreateCheckpointAsync(resourceUri, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono stopAsync(String resourceUri, StopVirtualMachineOptions body, Context context) { + return beginStopAsync(resourceUri, body, context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to creates a checkpoint in a virtual machine instance. + * Implements the operation to stop a virtual machine. * - * Creates a checkpoint in virtual machine instance. + * The operation to power off (stop) a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -1327,14 +1311,14 @@ private Mono createCheckpointAsync(String resourceUri, VirtualMachineCreat * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body) { - createCheckpointAsync(resourceUri, body).block(); + public void stop(String resourceUri, StopVirtualMachineOptions body) { + stopAsync(resourceUri, body).block(); } /** - * Implements the operation to creates a checkpoint in a virtual machine instance. + * Implements the operation to stop a virtual machine. * - * Creates a checkpoint in virtual machine instance. + * The operation to power off (stop) a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -1344,25 +1328,23 @@ public void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body, Context context) { - createCheckpointAsync(resourceUri, body, context).block(); + public void stop(String resourceUri, StopVirtualMachineOptions body, Context context) { + stopAsync(resourceUri, body, context).block(); } /** - * Implements the operation to delete a checkpoint in a virtual machine instance. + * Implements the operation to start a virtual machine. * - * Deletes a checkpoint in virtual machine instance. + * The operation to start a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteCheckpointWithResponseAsync(String resourceUri, - VirtualMachineDeleteCheckpoint body) { + private Mono>> startWithResponseAsync(String resourceUri) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1370,25 +1352,19 @@ private Mono>> deleteCheckpointWithResponseAsync(Strin if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.deleteCheckpoint(this.client.getEndpoint(), this.client.getApiVersion(), - resourceUri, body, accept, context)) + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to delete a checkpoint in a virtual machine instance. + * Implements the operation to start a virtual machine. * - * Deletes a checkpoint in virtual machine instance. + * The operation to start a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1396,8 +1372,7 @@ private Mono>> deleteCheckpointWithResponseAsync(Strin * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteCheckpointWithResponseAsync(String resourceUri, - VirtualMachineDeleteCheckpoint body, Context context) { + private Mono>> startWithResponseAsync(String resourceUri, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1405,44 +1380,35 @@ private Mono>> deleteCheckpointWithResponseAsync(Strin if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.deleteCheckpoint(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, body, - accept, context); + return service.start(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, context); } /** - * Implements the operation to delete a checkpoint in a virtual machine instance. + * Implements the operation to start a virtual machine. * - * Deletes a checkpoint in virtual machine instance. + * The operation to start a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteCheckpointAsync(String resourceUri, - VirtualMachineDeleteCheckpoint body) { - Mono>> mono = deleteCheckpointWithResponseAsync(resourceUri, body); + private PollerFlux, Void> beginStartAsync(String resourceUri) { + Mono>> mono = startWithResponseAsync(resourceUri); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Implements the operation to delete a checkpoint in a virtual machine instance. + * Implements the operation to start a virtual machine. * - * Deletes a checkpoint in virtual machine instance. + * The operation to start a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1450,39 +1416,35 @@ private PollerFlux, Void> beginDeleteCheckpointAsync(String res * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteCheckpointAsync(String resourceUri, - VirtualMachineDeleteCheckpoint body, Context context) { + private PollerFlux, Void> beginStartAsync(String resourceUri, Context context) { context = this.client.mergeContext(context); - Mono>> mono = deleteCheckpointWithResponseAsync(resourceUri, body, context); + Mono>> mono = startWithResponseAsync(resourceUri, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Implements the operation to delete a checkpoint in a virtual machine instance. + * Implements the operation to start a virtual machine. * - * Deletes a checkpoint in virtual machine instance. + * The operation to start a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteCheckpoint(String resourceUri, - VirtualMachineDeleteCheckpoint body) { - return this.beginDeleteCheckpointAsync(resourceUri, body).getSyncPoller(); + public SyncPoller, Void> beginStart(String resourceUri) { + return this.beginStartAsync(resourceUri).getSyncPoller(); } /** - * Implements the operation to delete a checkpoint in a virtual machine instance. + * Implements the operation to start a virtual machine. * - * Deletes a checkpoint in virtual machine instance. + * The operation to start a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1490,35 +1452,32 @@ public SyncPoller, Void> beginDeleteCheckpoint(String resourceU * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteCheckpoint(String resourceUri, - VirtualMachineDeleteCheckpoint body, Context context) { - return this.beginDeleteCheckpointAsync(resourceUri, body, context).getSyncPoller(); + public SyncPoller, Void> beginStart(String resourceUri, Context context) { + return this.beginStartAsync(resourceUri, context).getSyncPoller(); } /** - * Implements the operation to delete a checkpoint in a virtual machine instance. + * Implements the operation to start a virtual machine. * - * Deletes a checkpoint in virtual machine instance. + * The operation to start a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteCheckpointAsync(String resourceUri, VirtualMachineDeleteCheckpoint body) { - return beginDeleteCheckpointAsync(resourceUri, body).last().flatMap(this.client::getLroFinalResultOrError); + private Mono startAsync(String resourceUri) { + return beginStartAsync(resourceUri).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to delete a checkpoint in a virtual machine instance. + * Implements the operation to start a virtual machine. * - * Deletes a checkpoint in virtual machine instance. + * The operation to start a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1526,42 +1485,39 @@ private Mono deleteCheckpointAsync(String resourceUri, VirtualMachineDelet * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteCheckpointAsync(String resourceUri, VirtualMachineDeleteCheckpoint body, Context context) { - return beginDeleteCheckpointAsync(resourceUri, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono startAsync(String resourceUri, Context context) { + return beginStartAsync(resourceUri, context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to delete a checkpoint in a virtual machine instance. + * Implements the operation to start a virtual machine. * - * Deletes a checkpoint in virtual machine instance. + * The operation to start a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body) { - deleteCheckpointAsync(resourceUri, body).block(); + public void start(String resourceUri) { + startAsync(resourceUri).block(); } /** - * Implements the operation to delete a checkpoint in a virtual machine instance. + * Implements the operation to start a virtual machine. * - * Deletes a checkpoint in virtual machine instance. + * The operation to start a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body, Context context) { - deleteCheckpointAsync(resourceUri, body, context).block(); + public void start(String resourceUri, Context context) { + startAsync(resourceUri, context).block(); } /** @@ -1753,9 +1709,9 @@ public void restart(String resourceUri, Context context) { } /** - * Implements the operation to restores to a checkpoint in a virtual machine instance. + * Implements the operation to creates a checkpoint in a virtual machine instance. * - * Restores to a checkpoint in virtual machine instance. + * Creates a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -1765,8 +1721,8 @@ public void restart(String resourceUri, Context context) { * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restoreCheckpointWithResponseAsync(String resourceUri, - VirtualMachineRestoreCheckpoint body) { + private Mono>> createCheckpointWithResponseAsync(String resourceUri, + VirtualMachineCreateCheckpoint body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1781,15 +1737,15 @@ private Mono>> restoreCheckpointWithResponseAsync(Stri } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.restoreCheckpoint(this.client.getEndpoint(), this.client.getApiVersion(), - resourceUri, body, accept, context)) + .withContext(context -> service.createCheckpoint(this.client.getEndpoint(), this.client.getApiVersion(), + resourceUri, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to restores to a checkpoint in a virtual machine instance. + * Implements the operation to creates a checkpoint in a virtual machine instance. * - * Restores to a checkpoint in virtual machine instance. + * Creates a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -1800,8 +1756,8 @@ private Mono>> restoreCheckpointWithResponseAsync(Stri * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restoreCheckpointWithResponseAsync(String resourceUri, - VirtualMachineRestoreCheckpoint body, Context context) { + private Mono>> createCheckpointWithResponseAsync(String resourceUri, + VirtualMachineCreateCheckpoint body, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1816,14 +1772,14 @@ private Mono>> restoreCheckpointWithResponseAsync(Stri } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.restoreCheckpoint(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, body, - accept, context); + return service.createCheckpoint(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, + body, context); } /** - * Implements the operation to restores to a checkpoint in a virtual machine instance. + * Implements the operation to creates a checkpoint in a virtual machine instance. * - * Restores to a checkpoint in virtual machine instance. + * Creates a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -1833,17 +1789,17 @@ private Mono>> restoreCheckpointWithResponseAsync(Stri * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestoreCheckpointAsync(String resourceUri, - VirtualMachineRestoreCheckpoint body) { - Mono>> mono = restoreCheckpointWithResponseAsync(resourceUri, body); + private PollerFlux, Void> beginCreateCheckpointAsync(String resourceUri, + VirtualMachineCreateCheckpoint body) { + Mono>> mono = createCheckpointWithResponseAsync(resourceUri, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Implements the operation to restores to a checkpoint in a virtual machine instance. + * Implements the operation to creates a checkpoint in a virtual machine instance. * - * Restores to a checkpoint in virtual machine instance. + * Creates a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -1854,18 +1810,18 @@ private PollerFlux, Void> beginRestoreCheckpointAsync(String re * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestoreCheckpointAsync(String resourceUri, - VirtualMachineRestoreCheckpoint body, Context context) { + private PollerFlux, Void> beginCreateCheckpointAsync(String resourceUri, + VirtualMachineCreateCheckpoint body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = restoreCheckpointWithResponseAsync(resourceUri, body, context); + Mono>> mono = createCheckpointWithResponseAsync(resourceUri, body, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Implements the operation to restores to a checkpoint in a virtual machine instance. + * Implements the operation to creates a checkpoint in a virtual machine instance. * - * Restores to a checkpoint in virtual machine instance. + * Creates a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -1875,15 +1831,15 @@ private PollerFlux, Void> beginRestoreCheckpointAsync(String re * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestoreCheckpoint(String resourceUri, - VirtualMachineRestoreCheckpoint body) { - return this.beginRestoreCheckpointAsync(resourceUri, body).getSyncPoller(); + public SyncPoller, Void> beginCreateCheckpoint(String resourceUri, + VirtualMachineCreateCheckpoint body) { + return this.beginCreateCheckpointAsync(resourceUri, body).getSyncPoller(); } /** - * Implements the operation to restores to a checkpoint in a virtual machine instance. + * Implements the operation to creates a checkpoint in a virtual machine instance. * - * Restores to a checkpoint in virtual machine instance. + * Creates a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -1894,15 +1850,15 @@ public SyncPoller, Void> beginRestoreCheckpoint(String resource * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestoreCheckpoint(String resourceUri, - VirtualMachineRestoreCheckpoint body, Context context) { - return this.beginRestoreCheckpointAsync(resourceUri, body, context).getSyncPoller(); + public SyncPoller, Void> beginCreateCheckpoint(String resourceUri, + VirtualMachineCreateCheckpoint body, Context context) { + return this.beginCreateCheckpointAsync(resourceUri, body, context).getSyncPoller(); } /** - * Implements the operation to restores to a checkpoint in a virtual machine instance. + * Implements the operation to creates a checkpoint in a virtual machine instance. * - * Restores to a checkpoint in virtual machine instance. + * Creates a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -1912,14 +1868,14 @@ public SyncPoller, Void> beginRestoreCheckpoint(String resource * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restoreCheckpointAsync(String resourceUri, VirtualMachineRestoreCheckpoint body) { - return beginRestoreCheckpointAsync(resourceUri, body).last().flatMap(this.client::getLroFinalResultOrError); + private Mono createCheckpointAsync(String resourceUri, VirtualMachineCreateCheckpoint body) { + return beginCreateCheckpointAsync(resourceUri, body).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to restores to a checkpoint in a virtual machine instance. + * Implements the operation to creates a checkpoint in a virtual machine instance. * - * Restores to a checkpoint in virtual machine instance. + * Creates a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -1930,16 +1886,15 @@ private Mono restoreCheckpointAsync(String resourceUri, VirtualMachineRest * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restoreCheckpointAsync(String resourceUri, VirtualMachineRestoreCheckpoint body, - Context context) { - return beginRestoreCheckpointAsync(resourceUri, body, context).last() + private Mono createCheckpointAsync(String resourceUri, VirtualMachineCreateCheckpoint body, Context context) { + return beginCreateCheckpointAsync(resourceUri, body, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to restores to a checkpoint in a virtual machine instance. + * Implements the operation to creates a checkpoint in a virtual machine instance. * - * Restores to a checkpoint in virtual machine instance. + * Creates a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -1948,14 +1903,14 @@ private Mono restoreCheckpointAsync(String resourceUri, VirtualMachineRest * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body) { - restoreCheckpointAsync(resourceUri, body).block(); + public void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body) { + createCheckpointAsync(resourceUri, body).block(); } /** - * Implements the operation to restores to a checkpoint in a virtual machine instance. + * Implements the operation to creates a checkpoint in a virtual machine instance. * - * Restores to a checkpoint in virtual machine instance. + * Creates a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -1965,23 +1920,25 @@ public void restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoin * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body, Context context) { - restoreCheckpointAsync(resourceUri, body, context).block(); + public void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body, Context context) { + createCheckpointAsync(resourceUri, body, context).block(); } /** - * Implements the operation to start a virtual machine. + * Implements the operation to delete a checkpoint in a virtual machine instance. * - * The operation to start a virtual machine instance. + * Deletes a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String resourceUri) { + private Mono>> deleteCheckpointWithResponseAsync(String resourceUri, + VirtualMachineDeleteCheckpoint body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1989,19 +1946,25 @@ private Mono>> startWithResponseAsync(String resourceU if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, - accept, context)) + .withContext(context -> service.deleteCheckpoint(this.client.getEndpoint(), this.client.getApiVersion(), + resourceUri, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to start a virtual machine. + * Implements the operation to delete a checkpoint in a virtual machine instance. * - * The operation to start a virtual machine instance. + * Deletes a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2009,7 +1972,8 @@ private Mono>> startWithResponseAsync(String resourceU * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String resourceUri, Context context) { + private Mono>> deleteCheckpointWithResponseAsync(String resourceUri, + VirtualMachineDeleteCheckpoint body, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2017,35 +1981,44 @@ private Mono>> startWithResponseAsync(String resourceU if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.start(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, context); + return service.deleteCheckpoint(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, + body, context); } /** - * Implements the operation to start a virtual machine. + * Implements the operation to delete a checkpoint in a virtual machine instance. * - * The operation to start a virtual machine instance. + * Deletes a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStartAsync(String resourceUri) { - Mono>> mono = startWithResponseAsync(resourceUri); + private PollerFlux, Void> beginDeleteCheckpointAsync(String resourceUri, + VirtualMachineDeleteCheckpoint body) { + Mono>> mono = deleteCheckpointWithResponseAsync(resourceUri, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Implements the operation to start a virtual machine. + * Implements the operation to delete a checkpoint in a virtual machine instance. * - * The operation to start a virtual machine instance. + * Deletes a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2053,35 +2026,39 @@ private PollerFlux, Void> beginStartAsync(String resourceUri) { * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStartAsync(String resourceUri, Context context) { + private PollerFlux, Void> beginDeleteCheckpointAsync(String resourceUri, + VirtualMachineDeleteCheckpoint body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = startWithResponseAsync(resourceUri, context); + Mono>> mono = deleteCheckpointWithResponseAsync(resourceUri, body, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Implements the operation to start a virtual machine. + * Implements the operation to delete a checkpoint in a virtual machine instance. * - * The operation to start a virtual machine instance. + * Deletes a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart(String resourceUri) { - return this.beginStartAsync(resourceUri).getSyncPoller(); + public SyncPoller, Void> beginDeleteCheckpoint(String resourceUri, + VirtualMachineDeleteCheckpoint body) { + return this.beginDeleteCheckpointAsync(resourceUri, body).getSyncPoller(); } /** - * Implements the operation to start a virtual machine. + * Implements the operation to delete a checkpoint in a virtual machine instance. * - * The operation to start a virtual machine instance. + * Deletes a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2089,32 +2066,35 @@ public SyncPoller, Void> beginStart(String resourceUri) { * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart(String resourceUri, Context context) { - return this.beginStartAsync(resourceUri, context).getSyncPoller(); + public SyncPoller, Void> beginDeleteCheckpoint(String resourceUri, + VirtualMachineDeleteCheckpoint body, Context context) { + return this.beginDeleteCheckpointAsync(resourceUri, body, context).getSyncPoller(); } /** - * Implements the operation to start a virtual machine. + * Implements the operation to delete a checkpoint in a virtual machine instance. * - * The operation to start a virtual machine instance. + * Deletes a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceUri) { - return beginStartAsync(resourceUri).last().flatMap(this.client::getLroFinalResultOrError); + private Mono deleteCheckpointAsync(String resourceUri, VirtualMachineDeleteCheckpoint body) { + return beginDeleteCheckpointAsync(resourceUri, body).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to start a virtual machine. + * Implements the operation to delete a checkpoint in a virtual machine instance. * - * The operation to start a virtual machine instance. + * Deletes a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2122,45 +2102,48 @@ private Mono startAsync(String resourceUri) { * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceUri, Context context) { - return beginStartAsync(resourceUri, context).last().flatMap(this.client::getLroFinalResultOrError); + private Mono deleteCheckpointAsync(String resourceUri, VirtualMachineDeleteCheckpoint body, Context context) { + return beginDeleteCheckpointAsync(resourceUri, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to start a virtual machine. + * Implements the operation to delete a checkpoint in a virtual machine instance. * - * The operation to start a virtual machine instance. + * Deletes a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String resourceUri) { - startAsync(resourceUri).block(); + public void deleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body) { + deleteCheckpointAsync(resourceUri, body).block(); } /** - * Implements the operation to start a virtual machine. + * Implements the operation to delete a checkpoint in a virtual machine instance. * - * The operation to start a virtual machine instance. + * Deletes a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String resourceUri, Context context) { - startAsync(resourceUri, context).block(); + public void deleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body, Context context) { + deleteCheckpointAsync(resourceUri, body, context).block(); } /** - * Implements the operation to stop a virtual machine. + * Implements the operation to restores to a checkpoint in a virtual machine instance. * - * The operation to power off (stop) a virtual machine instance. + * Restores to a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -2170,7 +2153,8 @@ public void start(String resourceUri, Context context) { * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync(String resourceUri, StopVirtualMachineOptions body) { + private Mono>> restoreCheckpointWithResponseAsync(String resourceUri, + VirtualMachineRestoreCheckpoint body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2185,15 +2169,15 @@ private Mono>> stopWithResponseAsync(String resourceUr } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, - body, accept, context)) + .withContext(context -> service.restoreCheckpoint(this.client.getEndpoint(), this.client.getApiVersion(), + resourceUri, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to stop a virtual machine. + * Implements the operation to restores to a checkpoint in a virtual machine instance. * - * The operation to power off (stop) a virtual machine instance. + * Restores to a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -2204,8 +2188,8 @@ private Mono>> stopWithResponseAsync(String resourceUr * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync(String resourceUri, StopVirtualMachineOptions body, - Context context) { + private Mono>> restoreCheckpointWithResponseAsync(String resourceUri, + VirtualMachineRestoreCheckpoint body, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2220,13 +2204,14 @@ private Mono>> stopWithResponseAsync(String resourceUr } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.stop(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, body, accept, context); + return service.restoreCheckpoint(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, + body, context); } /** - * Implements the operation to stop a virtual machine. + * Implements the operation to restores to a checkpoint in a virtual machine instance. * - * The operation to power off (stop) a virtual machine instance. + * Restores to a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -2236,16 +2221,17 @@ private Mono>> stopWithResponseAsync(String resourceUr * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStopAsync(String resourceUri, StopVirtualMachineOptions body) { - Mono>> mono = stopWithResponseAsync(resourceUri, body); + private PollerFlux, Void> beginRestoreCheckpointAsync(String resourceUri, + VirtualMachineRestoreCheckpoint body) { + Mono>> mono = restoreCheckpointWithResponseAsync(resourceUri, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Implements the operation to stop a virtual machine. + * Implements the operation to restores to a checkpoint in a virtual machine instance. * - * The operation to power off (stop) a virtual machine instance. + * Restores to a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -2256,18 +2242,18 @@ private PollerFlux, Void> beginStopAsync(String resourceUri, St * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStopAsync(String resourceUri, StopVirtualMachineOptions body, - Context context) { + private PollerFlux, Void> beginRestoreCheckpointAsync(String resourceUri, + VirtualMachineRestoreCheckpoint body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = stopWithResponseAsync(resourceUri, body, context); + Mono>> mono = restoreCheckpointWithResponseAsync(resourceUri, body, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Implements the operation to stop a virtual machine. + * Implements the operation to restores to a checkpoint in a virtual machine instance. * - * The operation to power off (stop) a virtual machine instance. + * Restores to a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -2277,14 +2263,15 @@ private PollerFlux, Void> beginStopAsync(String resourceUri, St * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStop(String resourceUri, StopVirtualMachineOptions body) { - return this.beginStopAsync(resourceUri, body).getSyncPoller(); + public SyncPoller, Void> beginRestoreCheckpoint(String resourceUri, + VirtualMachineRestoreCheckpoint body) { + return this.beginRestoreCheckpointAsync(resourceUri, body).getSyncPoller(); } /** - * Implements the operation to stop a virtual machine. + * Implements the operation to restores to a checkpoint in a virtual machine instance. * - * The operation to power off (stop) a virtual machine instance. + * Restores to a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -2295,15 +2282,15 @@ public SyncPoller, Void> beginStop(String resourceUri, StopVirt * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStop(String resourceUri, StopVirtualMachineOptions body, - Context context) { - return this.beginStopAsync(resourceUri, body, context).getSyncPoller(); + public SyncPoller, Void> beginRestoreCheckpoint(String resourceUri, + VirtualMachineRestoreCheckpoint body, Context context) { + return this.beginRestoreCheckpointAsync(resourceUri, body, context).getSyncPoller(); } /** - * Implements the operation to stop a virtual machine. + * Implements the operation to restores to a checkpoint in a virtual machine instance. * - * The operation to power off (stop) a virtual machine instance. + * Restores to a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -2313,14 +2300,14 @@ public SyncPoller, Void> beginStop(String resourceUri, StopVirt * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceUri, StopVirtualMachineOptions body) { - return beginStopAsync(resourceUri, body).last().flatMap(this.client::getLroFinalResultOrError); + private Mono restoreCheckpointAsync(String resourceUri, VirtualMachineRestoreCheckpoint body) { + return beginRestoreCheckpointAsync(resourceUri, body).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to stop a virtual machine. + * Implements the operation to restores to a checkpoint in a virtual machine instance. * - * The operation to power off (stop) a virtual machine instance. + * Restores to a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -2331,14 +2318,16 @@ private Mono stopAsync(String resourceUri, StopVirtualMachineOptions body) * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceUri, StopVirtualMachineOptions body, Context context) { - return beginStopAsync(resourceUri, body, context).last().flatMap(this.client::getLroFinalResultOrError); + private Mono restoreCheckpointAsync(String resourceUri, VirtualMachineRestoreCheckpoint body, + Context context) { + return beginRestoreCheckpointAsync(resourceUri, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to stop a virtual machine. + * Implements the operation to restores to a checkpoint in a virtual machine instance. * - * The operation to power off (stop) a virtual machine instance. + * Restores to a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -2347,14 +2336,14 @@ private Mono stopAsync(String resourceUri, StopVirtualMachineOptions body, * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceUri, StopVirtualMachineOptions body) { - stopAsync(resourceUri, body).block(); + public void restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body) { + restoreCheckpointAsync(resourceUri, body).block(); } /** - * Implements the operation to stop a virtual machine. + * Implements the operation to restores to a checkpoint in a virtual machine instance. * - * The operation to power off (stop) a virtual machine instance. + * Restores to a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -2364,11 +2353,13 @@ public void stop(String resourceUri, StopVirtualMachineOptions body) { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceUri, StopVirtualMachineOptions body, Context context) { - stopAsync(resourceUri, body, context).block(); + public void restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body, Context context) { + restoreCheckpointAsync(resourceUri, body, context).block(); } /** + * Implements List virtual machine instances. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2395,6 +2386,8 @@ private Mono> listNextSinglePageAsync } /** + * Implements List virtual machine instances. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineInstancesImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineInstancesImpl.java index 96283c542def..b31ccb712db6 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineInstancesImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineInstancesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -26,24 +26,14 @@ public final class VirtualMachineInstancesImpl implements VirtualMachineInstance private final VirtualMachineInstancesClient innerClient; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; public VirtualMachineInstancesImpl(VirtualMachineInstancesClient innerClient, - com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list(String resourceUri) { - PagedIterable inner = this.serviceClient().list(resourceUri); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineInstanceImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceUri, Context context) { - PagedIterable inner = this.serviceClient().list(resourceUri, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineInstanceImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceUri, Context context) { Response inner = this.serviceClient().getWithResponse(resourceUri, context); if (inner != null) { @@ -108,20 +98,30 @@ public void delete(String resourceUri, ForceDelete force, DeleteFromHost deleteF this.serviceClient().delete(resourceUri, force, deleteFromHost, context); } - public void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body) { - this.serviceClient().createCheckpoint(resourceUri, body); + public PagedIterable list(String resourceUri) { + PagedIterable inner = this.serviceClient().list(resourceUri); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineInstanceImpl(inner1, this.manager())); } - public void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body, Context context) { - this.serviceClient().createCheckpoint(resourceUri, body, context); + public PagedIterable list(String resourceUri, Context context) { + PagedIterable inner = this.serviceClient().list(resourceUri, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineInstanceImpl(inner1, this.manager())); } - public void deleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body) { - this.serviceClient().deleteCheckpoint(resourceUri, body); + public void stop(String resourceUri, StopVirtualMachineOptions body) { + this.serviceClient().stop(resourceUri, body); } - public void deleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body, Context context) { - this.serviceClient().deleteCheckpoint(resourceUri, body, context); + public void stop(String resourceUri, StopVirtualMachineOptions body, Context context) { + this.serviceClient().stop(resourceUri, body, context); + } + + public void start(String resourceUri) { + this.serviceClient().start(resourceUri); + } + + public void start(String resourceUri, Context context) { + this.serviceClient().start(resourceUri, context); } public void restart(String resourceUri) { @@ -132,35 +132,35 @@ public void restart(String resourceUri, Context context) { this.serviceClient().restart(resourceUri, context); } - public void restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body) { - this.serviceClient().restoreCheckpoint(resourceUri, body); + public void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body) { + this.serviceClient().createCheckpoint(resourceUri, body); } - public void restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body, Context context) { - this.serviceClient().restoreCheckpoint(resourceUri, body, context); + public void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body, Context context) { + this.serviceClient().createCheckpoint(resourceUri, body, context); } - public void start(String resourceUri) { - this.serviceClient().start(resourceUri); + public void deleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body) { + this.serviceClient().deleteCheckpoint(resourceUri, body); } - public void start(String resourceUri, Context context) { - this.serviceClient().start(resourceUri, context); + public void deleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body, Context context) { + this.serviceClient().deleteCheckpoint(resourceUri, body, context); } - public void stop(String resourceUri, StopVirtualMachineOptions body) { - this.serviceClient().stop(resourceUri, body); + public void restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body) { + this.serviceClient().restoreCheckpoint(resourceUri, body); } - public void stop(String resourceUri, StopVirtualMachineOptions body, Context context) { - this.serviceClient().stop(resourceUri, body, context); + public void restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body, Context context) { + this.serviceClient().restoreCheckpoint(resourceUri, body, context); } private VirtualMachineInstancesClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineTemplateImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineTemplateImpl.java index dd0ece932db1..f389c4ab2f28 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineTemplateImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineTemplateImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -19,7 +19,7 @@ public final class VirtualMachineTemplateImpl implements VirtualMachineTemplate, VirtualMachineTemplate.Definition, VirtualMachineTemplate.Update { private VirtualMachineTemplateInner innerObject; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; public String id() { return this.innerModel().id(); @@ -74,7 +74,7 @@ public VirtualMachineTemplateInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } @@ -103,7 +103,7 @@ public VirtualMachineTemplate create(Context context) { return this; } - VirtualMachineTemplateImpl(String name, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + VirtualMachineTemplateImpl(String name, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerObject = new VirtualMachineTemplateInner(); this.serviceManager = serviceManager; this.virtualMachineTemplateName = name; @@ -129,7 +129,7 @@ public VirtualMachineTemplate apply(Context context) { } VirtualMachineTemplateImpl(VirtualMachineTemplateInner innerObject, - com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineTemplatesClientImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineTemplatesClientImpl.java index 98d606fc0a31..351cce0b7e15 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineTemplatesClientImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineTemplatesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -34,8 +34,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.scvmm.fluent.VirtualMachineTemplatesClient; import com.azure.resourcemanager.scvmm.fluent.models.VirtualMachineTemplateInner; +import com.azure.resourcemanager.scvmm.implementation.models.VirtualMachineTemplateListResult; import com.azure.resourcemanager.scvmm.models.ForceDelete; -import com.azure.resourcemanager.scvmm.models.VirtualMachineTemplateListResult; import com.azure.resourcemanager.scvmm.models.VirtualMachineTemplateTagsUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -53,114 +53,118 @@ public final class VirtualMachineTemplatesClientImpl implements VirtualMachineTe /** * The service client containing this operation class. */ - private final ScvmmClientImpl client; + private final ScVmmClientImpl client; /** * Initializes an instance of VirtualMachineTemplatesClientImpl. * * @param client the instance of the service client containing this operation class. */ - VirtualMachineTemplatesClientImpl(ScvmmClientImpl client) { + VirtualMachineTemplatesClientImpl(ScVmmClientImpl client) { this.service = RestProxy.create(VirtualMachineTemplatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ScvmmClientVirtualMachineTemplates to be used by the proxy service to + * The interface defining all the services for ScVmmClientVirtualMachineTemplates to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ScvmmClientVirtualMa") + @Host("{endpoint}") + @ServiceInterface(name = "ScVmmClientVirtualMa") public interface VirtualMachineTemplatesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualMachineTemplates") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineTemplateName") String virtualMachineTemplateName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineTemplateName") String virtualMachineTemplateName, - @BodyParam("application/json") VirtualMachineTemplateInner resource, @HeaderParam("Accept") String accept, + @HeaderParam("accept") String accept, @BodyParam("application/json") VirtualMachineTemplateInner resource, Context context); @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualMachineTemplateName") String virtualMachineTemplateName, - @BodyParam("application/json") VirtualMachineTemplateTagsUpdate properties, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("accept") String accept, + @BodyParam("application/json") VirtualMachineTemplateTagsUpdate properties, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("force") ForceDelete force, @PathParam("virtualMachineTemplateName") String virtualMachineTemplateName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualMachineTemplates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + @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) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** - * Implements GET VirtualMachineTemplates in a subscription. + * Gets a VirtualMachineTemplate. * - * List of VirtualMachineTemplates in a subscription. + * Implements VirtualMachineTemplate GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VirtualMachineTemplate list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the VirtualMachineTemplates resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String virtualMachineTemplateName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -169,29 +173,38 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (virtualMachineTemplateName == null) { + return Mono.error( + new IllegalArgumentException("Parameter virtualMachineTemplateName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualMachineTemplateName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements GET VirtualMachineTemplates in a subscription. + * Gets a VirtualMachineTemplate. * - * List of VirtualMachineTemplates in a subscription. + * Implements VirtualMachineTemplate GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VirtualMachineTemplate list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the VirtualMachineTemplates resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String virtualMachineTemplateName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -200,92 +213,92 @@ private Mono> listSinglePageAsync(Con return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (virtualMachineTemplateName == null) { + return Mono.error( + new IllegalArgumentException("Parameter virtualMachineTemplateName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualMachineTemplateName, accept, context); } /** - * Implements GET VirtualMachineTemplates in a subscription. + * Gets a VirtualMachineTemplate. * - * List of VirtualMachineTemplates in a subscription. + * Implements VirtualMachineTemplate GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VirtualMachineTemplate list operation as paginated response with {@link PagedFlux}. + * @return the VirtualMachineTemplates resource definition on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String virtualMachineTemplateName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, virtualMachineTemplateName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Implements GET VirtualMachineTemplates in a subscription. + * Gets a VirtualMachineTemplate. * - * List of VirtualMachineTemplates in a subscription. + * Implements VirtualMachineTemplate GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VirtualMachineTemplate list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Implements GET VirtualMachineTemplates in a subscription. - * - * List of VirtualMachineTemplates in a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. + * @return the VirtualMachineTemplates resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String virtualMachineTemplateName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, virtualMachineTemplateName, context).block(); } /** - * Implements GET VirtualMachineTemplates in a subscription. + * Gets a VirtualMachineTemplate. * - * List of VirtualMachineTemplates in a subscription. + * Implements VirtualMachineTemplate GET method. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. + * @return the VirtualMachineTemplates resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualMachineTemplateInner getByResourceGroup(String resourceGroupName, String virtualMachineTemplateName) { + return getByResourceGroupWithResponse(resourceGroupName, virtualMachineTemplateName, Context.NONE).getValue(); } /** - * Implements GET VirtualMachineTemplates in a resource group. + * Implements VirtualMachineTemplates PUT method. * - * List of VirtualMachineTemplates in a resource group. + * Onboards the ScVmm VM Template as an Azure VM Template resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @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 response of a VirtualMachineTemplate list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the VirtualMachineTemplates resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String virtualMachineTemplateName, VirtualMachineTemplateInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -298,31 +311,41 @@ public PagedIterable list(Context context) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (virtualMachineTemplateName == null) { + return Mono.error( + new IllegalArgumentException("Parameter virtualMachineTemplateName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualMachineTemplateName, accept, resource, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements GET VirtualMachineTemplates in a resource group. + * Implements VirtualMachineTemplates PUT method. * - * List of VirtualMachineTemplates in a resource group. + * Onboards the ScVmm VM Template as an Azure VM Template resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @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 response of a VirtualMachineTemplate list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the VirtualMachineTemplates resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String virtualMachineTemplateName, VirtualMachineTemplateInner resource, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -335,224 +358,199 @@ public PagedIterable list(Context context) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (virtualMachineTemplateName == null) { + return Mono.error( + new IllegalArgumentException("Parameter virtualMachineTemplateName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualMachineTemplateName, accept, resource, context); } /** - * Implements GET VirtualMachineTemplates in a resource group. + * Implements VirtualMachineTemplates PUT method. * - * List of VirtualMachineTemplates in a resource group. + * Onboards the ScVmm VM Template as an Azure VM Template resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @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 response of a VirtualMachineTemplate list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of the VirtualMachineTemplates resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VirtualMachineTemplateInner> beginCreateOrUpdateAsync( + String resourceGroupName, String virtualMachineTemplateName, VirtualMachineTemplateInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, virtualMachineTemplateName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualMachineTemplateInner.class, VirtualMachineTemplateInner.class, + this.client.getContext()); } /** - * Implements GET VirtualMachineTemplates in a resource group. + * Implements VirtualMachineTemplates PUT method. * - * List of VirtualMachineTemplates in a resource group. + * Onboards the ScVmm VM Template as an Azure VM Template resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @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 response of a VirtualMachineTemplate list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of the VirtualMachineTemplates resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VirtualMachineTemplateInner> beginCreateOrUpdateAsync( + String resourceGroupName, String virtualMachineTemplateName, VirtualMachineTemplateInner resource, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, virtualMachineTemplateName, resource, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualMachineTemplateInner.class, VirtualMachineTemplateInner.class, + context); } /** - * Implements GET VirtualMachineTemplates in a resource group. + * Implements VirtualMachineTemplates PUT method. * - * List of VirtualMachineTemplates in a resource group. + * Onboards the ScVmm VM Template as an Azure VM Template resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @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 response of a VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of the VirtualMachineTemplates resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualMachineTemplateInner> beginCreateOrUpdate( + String resourceGroupName, String virtualMachineTemplateName, VirtualMachineTemplateInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, virtualMachineTemplateName, resource).getSyncPoller(); } /** - * Implements GET VirtualMachineTemplates in a resource group. + * Implements VirtualMachineTemplates PUT method. * - * List of VirtualMachineTemplates in a resource group. + * Onboards the ScVmm VM Template as an Azure VM Template resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @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 response of a VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of the VirtualMachineTemplates resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualMachineTemplateInner> beginCreateOrUpdate( + String resourceGroupName, String virtualMachineTemplateName, VirtualMachineTemplateInner resource, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, virtualMachineTemplateName, resource, context) + .getSyncPoller(); } /** - * Gets a VirtualMachineTemplate. + * Implements VirtualMachineTemplates PUT method. * - * Implements VirtualMachineTemplate GET method. + * Onboards the ScVmm VM Template as an Azure VM Template resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @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 VirtualMachineTemplates resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the VirtualMachineTemplates resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String virtualMachineTemplateName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineTemplateName == null) { - return Mono.error( - new IllegalArgumentException("Parameter virtualMachineTemplateName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineTemplateName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createOrUpdateAsync(String resourceGroupName, + String virtualMachineTemplateName, VirtualMachineTemplateInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, virtualMachineTemplateName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a VirtualMachineTemplate. + * Implements VirtualMachineTemplates PUT method. * - * Implements VirtualMachineTemplate GET method. + * Onboards the ScVmm VM Template as an Azure VM Template resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @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 VirtualMachineTemplates resource definition along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String virtualMachineTemplateName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualMachineTemplateName == null) { - return Mono.error( - new IllegalArgumentException("Parameter virtualMachineTemplateName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineTemplateName, accept, context); - } - - /** - * Gets a VirtualMachineTemplate. - * - * Implements VirtualMachineTemplate GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the VirtualMachineTemplates resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String virtualMachineTemplateName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, virtualMachineTemplateName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, + String virtualMachineTemplateName, VirtualMachineTemplateInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, virtualMachineTemplateName, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a VirtualMachineTemplate. + * Implements VirtualMachineTemplates PUT method. * - * Implements VirtualMachineTemplate GET method. + * Onboards the ScVmm VM Template as an Azure VM Template resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param context The context to associate with this operation. + * @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 VirtualMachineTemplates resource definition along with {@link Response}. + * @return the VirtualMachineTemplates resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String virtualMachineTemplateName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, virtualMachineTemplateName, context).block(); + public VirtualMachineTemplateInner createOrUpdate(String resourceGroupName, String virtualMachineTemplateName, + VirtualMachineTemplateInner resource) { + return createOrUpdateAsync(resourceGroupName, virtualMachineTemplateName, resource).block(); } /** - * Gets a VirtualMachineTemplate. + * Implements VirtualMachineTemplates PUT method. * - * Implements VirtualMachineTemplate GET method. + * Onboards the ScVmm VM Template as an Azure VM Template resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @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 VirtualMachineTemplates resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineTemplateInner getByResourceGroup(String resourceGroupName, String virtualMachineTemplateName) { - return getByResourceGroupWithResponse(resourceGroupName, virtualMachineTemplateName, Context.NONE).getValue(); + public VirtualMachineTemplateInner createOrUpdate(String resourceGroupName, String virtualMachineTemplateName, + VirtualMachineTemplateInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, virtualMachineTemplateName, resource, context).block(); } /** - * Implements VirtualMachineTemplates PUT method. + * Implements the VirtualMachineTemplate PATCH method. * - * Onboards the ScVmm VM Template as an Azure VM Template resource. + * Updates the VirtualMachineTemplate resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param resource Resource create parameters. + * @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. @@ -560,8 +558,8 @@ public VirtualMachineTemplateInner getByResourceGroup(String resourceGroupName, * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String virtualMachineTemplateName, VirtualMachineTemplateInner resource) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String virtualMachineTemplateName, VirtualMachineTemplateTagsUpdate properties) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -578,27 +576,27 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter virtualMachineTemplateName is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); } else { - resource.validate(); + properties.validate(); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineTemplateName, resource, accept, + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualMachineTemplateName, accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements VirtualMachineTemplates PUT method. + * Implements the VirtualMachineTemplate PATCH method. * - * Onboards the ScVmm VM Template as an Azure VM Template resource. + * Updates the VirtualMachineTemplate resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param resource Resource create parameters. + * @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. @@ -607,8 +605,8 @@ private Mono>> createOrUpdateWithResponseAsync(String * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String virtualMachineTemplateName, VirtualMachineTemplateInner resource, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String virtualMachineTemplateName, VirtualMachineTemplateTagsUpdate properties, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -625,48 +623,48 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter virtualMachineTemplateName is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); } else { - resource.validate(); + properties.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineTemplateName, resource, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, virtualMachineTemplateName, accept, properties, context); } /** - * Implements VirtualMachineTemplates PUT method. + * Implements the VirtualMachineTemplate PATCH method. * - * Onboards the ScVmm VM Template as an Azure VM Template resource. + * Updates the VirtualMachineTemplate resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param resource Resource create parameters. + * @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 the VirtualMachineTemplates resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualMachineTemplateInner> beginCreateOrUpdateAsync( - String resourceGroupName, String virtualMachineTemplateName, VirtualMachineTemplateInner resource) { + private PollerFlux, VirtualMachineTemplateInner> beginUpdateAsync( + String resourceGroupName, String virtualMachineTemplateName, VirtualMachineTemplateTagsUpdate properties) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, virtualMachineTemplateName, resource); + = updateWithResponseAsync(resourceGroupName, virtualMachineTemplateName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), VirtualMachineTemplateInner.class, VirtualMachineTemplateInner.class, this.client.getContext()); } /** - * Implements VirtualMachineTemplates PUT method. + * Implements the VirtualMachineTemplate PATCH method. * - * Onboards the ScVmm VM Template as an Azure VM Template resource. + * Updates the VirtualMachineTemplate resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param resource Resource create parameters. + * @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. @@ -674,44 +672,44 @@ private PollerFlux, VirtualMachineTempla * @return the {@link PollerFlux} for polling of the VirtualMachineTemplates resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualMachineTemplateInner> beginCreateOrUpdateAsync( - String resourceGroupName, String virtualMachineTemplateName, VirtualMachineTemplateInner resource, + private PollerFlux, VirtualMachineTemplateInner> beginUpdateAsync( + String resourceGroupName, String virtualMachineTemplateName, VirtualMachineTemplateTagsUpdate properties, Context context) { context = this.client.mergeContext(context); Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, virtualMachineTemplateName, resource, context); + = updateWithResponseAsync(resourceGroupName, virtualMachineTemplateName, properties, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), VirtualMachineTemplateInner.class, VirtualMachineTemplateInner.class, context); } /** - * Implements VirtualMachineTemplates PUT method. + * Implements the VirtualMachineTemplate PATCH method. * - * Onboards the ScVmm VM Template as an Azure VM Template resource. + * Updates the VirtualMachineTemplate resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param resource Resource create parameters. + * @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 the VirtualMachineTemplates resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineTemplateInner> beginCreateOrUpdate( - String resourceGroupName, String virtualMachineTemplateName, VirtualMachineTemplateInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, virtualMachineTemplateName, resource).getSyncPoller(); + public SyncPoller, VirtualMachineTemplateInner> beginUpdate( + String resourceGroupName, String virtualMachineTemplateName, VirtualMachineTemplateTagsUpdate properties) { + return this.beginUpdateAsync(resourceGroupName, virtualMachineTemplateName, properties).getSyncPoller(); } /** - * Implements VirtualMachineTemplates PUT method. + * Implements the VirtualMachineTemplate PATCH method. * - * Onboards the ScVmm VM Template as an Azure VM Template resource. + * Updates the VirtualMachineTemplate resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param resource Resource create parameters. + * @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. @@ -719,41 +717,41 @@ public SyncPoller, VirtualMachineTemplat * @return the {@link SyncPoller} for polling of the VirtualMachineTemplates resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineTemplateInner> beginCreateOrUpdate( - String resourceGroupName, String virtualMachineTemplateName, VirtualMachineTemplateInner resource, + public SyncPoller, VirtualMachineTemplateInner> beginUpdate( + String resourceGroupName, String virtualMachineTemplateName, VirtualMachineTemplateTagsUpdate properties, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, virtualMachineTemplateName, resource, context) + return this.beginUpdateAsync(resourceGroupName, virtualMachineTemplateName, properties, context) .getSyncPoller(); } /** - * Implements VirtualMachineTemplates PUT method. + * Implements the VirtualMachineTemplate PATCH method. * - * Onboards the ScVmm VM Template as an Azure VM Template resource. + * Updates the VirtualMachineTemplate resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param resource Resource create parameters. + * @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 VirtualMachineTemplates resource definition on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String virtualMachineTemplateName, VirtualMachineTemplateInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, virtualMachineTemplateName, resource).last() + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String virtualMachineTemplateName, + VirtualMachineTemplateTagsUpdate properties) { + return beginUpdateAsync(resourceGroupName, virtualMachineTemplateName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements VirtualMachineTemplates PUT method. + * Implements the VirtualMachineTemplate PATCH method. * - * Onboards the ScVmm VM Template as an Azure VM Template resource. + * Updates the VirtualMachineTemplate resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param resource Resource create parameters. + * @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. @@ -761,39 +759,39 @@ private Mono createOrUpdateAsync(String resourceGro * @return the VirtualMachineTemplates resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String virtualMachineTemplateName, VirtualMachineTemplateInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, virtualMachineTemplateName, resource, context).last() + private Mono updateAsync(String resourceGroupName, String virtualMachineTemplateName, + VirtualMachineTemplateTagsUpdate properties, Context context) { + return beginUpdateAsync(resourceGroupName, virtualMachineTemplateName, properties, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements VirtualMachineTemplates PUT method. + * Implements the VirtualMachineTemplate PATCH method. * - * Onboards the ScVmm VM Template as an Azure VM Template resource. + * Updates the VirtualMachineTemplate resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param resource Resource create parameters. + * @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 VirtualMachineTemplates resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineTemplateInner createOrUpdate(String resourceGroupName, String virtualMachineTemplateName, - VirtualMachineTemplateInner resource) { - return createOrUpdateAsync(resourceGroupName, virtualMachineTemplateName, resource).block(); + public VirtualMachineTemplateInner update(String resourceGroupName, String virtualMachineTemplateName, + VirtualMachineTemplateTagsUpdate properties) { + return updateAsync(resourceGroupName, virtualMachineTemplateName, properties).block(); } /** - * Implements VirtualMachineTemplates PUT method. + * Implements the VirtualMachineTemplate PATCH method. * - * Onboards the ScVmm VM Template as an Azure VM Template resource. + * Updates the VirtualMachineTemplate resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param resource Resource create parameters. + * @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. @@ -801,28 +799,27 @@ public VirtualMachineTemplateInner createOrUpdate(String resourceGroupName, Stri * @return the VirtualMachineTemplates resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineTemplateInner createOrUpdate(String resourceGroupName, String virtualMachineTemplateName, - VirtualMachineTemplateInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, virtualMachineTemplateName, resource, context).block(); + public VirtualMachineTemplateInner update(String resourceGroupName, String virtualMachineTemplateName, + VirtualMachineTemplateTagsUpdate properties, Context context) { + return updateAsync(resourceGroupName, virtualMachineTemplateName, properties, context).block(); } /** - * Implements the VirtualMachineTemplate PATCH method. + * Implements VirtualMachineTemplate DELETE method. * - * Updates the VirtualMachineTemplate resource. + * Deregisters the ScVmm VM Template from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VirtualMachineTemplates resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String virtualMachineTemplateName, VirtualMachineTemplateTagsUpdate properties) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String virtualMachineTemplateName, ForceDelete force) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -839,37 +836,30 @@ private Mono>> updateWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter virtualMachineTemplateName is required and cannot be null.")); } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualMachineTemplateName, properties, accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, force, virtualMachineTemplateName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the VirtualMachineTemplate PATCH method. + * Implements VirtualMachineTemplate DELETE method. * - * Updates the VirtualMachineTemplate resource. + * Deregisters the ScVmm VM Template from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VirtualMachineTemplates resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String virtualMachineTemplateName, VirtualMachineTemplateTagsUpdate properties, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String virtualMachineTemplateName, ForceDelete force, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -886,185 +876,192 @@ private Mono>> updateWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter virtualMachineTemplateName is required and cannot be null.")); } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, virtualMachineTemplateName, properties, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, force, virtualMachineTemplateName, accept, context); } /** - * Implements the VirtualMachineTemplate PATCH method. + * Implements VirtualMachineTemplate DELETE method. * - * Updates the VirtualMachineTemplate resource. + * Deregisters the ScVmm VM Template from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the VirtualMachineTemplates resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualMachineTemplateInner> beginUpdateAsync( - String resourceGroupName, String virtualMachineTemplateName, VirtualMachineTemplateTagsUpdate properties) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String virtualMachineTemplateName, ForceDelete force) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, virtualMachineTemplateName, properties); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), VirtualMachineTemplateInner.class, VirtualMachineTemplateInner.class, + = deleteWithResponseAsync(resourceGroupName, virtualMachineTemplateName, force); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Implements the VirtualMachineTemplate PATCH method. + * Implements VirtualMachineTemplate DELETE method. * - * Updates the VirtualMachineTemplate resource. + * Deregisters the ScVmm VM Template from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String virtualMachineTemplateName) { + final ForceDelete force = null; + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, virtualMachineTemplateName, force); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Implements VirtualMachineTemplate DELETE method. + * + * Deregisters the ScVmm VM Template from Azure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the VirtualMachineTemplates resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualMachineTemplateInner> beginUpdateAsync( - String resourceGroupName, String virtualMachineTemplateName, VirtualMachineTemplateTagsUpdate properties, - Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String virtualMachineTemplateName, ForceDelete force, Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateWithResponseAsync(resourceGroupName, virtualMachineTemplateName, properties, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), VirtualMachineTemplateInner.class, VirtualMachineTemplateInner.class, + = deleteWithResponseAsync(resourceGroupName, virtualMachineTemplateName, force, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Implements the VirtualMachineTemplate PATCH method. + * Implements VirtualMachineTemplate DELETE method. * - * Updates the VirtualMachineTemplate resource. + * Deregisters the ScVmm VM Template from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @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 the VirtualMachineTemplates resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineTemplateInner> beginUpdate( - String resourceGroupName, String virtualMachineTemplateName, VirtualMachineTemplateTagsUpdate properties) { - return this.beginUpdateAsync(resourceGroupName, virtualMachineTemplateName, properties).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualMachineTemplateName) { + final ForceDelete force = null; + return this.beginDeleteAsync(resourceGroupName, virtualMachineTemplateName, force).getSyncPoller(); } /** - * Implements the VirtualMachineTemplate PATCH method. + * Implements VirtualMachineTemplate DELETE method. * - * Updates the VirtualMachineTemplate resource. + * Deregisters the ScVmm VM Template from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the VirtualMachineTemplates resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineTemplateInner> beginUpdate( - String resourceGroupName, String virtualMachineTemplateName, VirtualMachineTemplateTagsUpdate properties, - Context context) { - return this.beginUpdateAsync(resourceGroupName, virtualMachineTemplateName, properties, context) - .getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualMachineTemplateName, + ForceDelete force, Context context) { + return this.beginDeleteAsync(resourceGroupName, virtualMachineTemplateName, force, context).getSyncPoller(); } /** - * Implements the VirtualMachineTemplate PATCH method. + * Implements VirtualMachineTemplate DELETE method. * - * Updates the VirtualMachineTemplate resource. + * Deregisters the ScVmm VM Template from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VirtualMachineTemplates resource definition on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String virtualMachineTemplateName, - VirtualMachineTemplateTagsUpdate properties) { - return beginUpdateAsync(resourceGroupName, virtualMachineTemplateName, properties).last() + private Mono deleteAsync(String resourceGroupName, String virtualMachineTemplateName, ForceDelete force) { + return beginDeleteAsync(resourceGroupName, virtualMachineTemplateName, force).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the VirtualMachineTemplate PATCH method. + * Implements VirtualMachineTemplate DELETE method. * - * Updates the VirtualMachineTemplate resource. + * Deregisters the ScVmm VM Template from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @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 VirtualMachineTemplates resource definition on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String virtualMachineTemplateName, - VirtualMachineTemplateTagsUpdate properties, Context context) { - return beginUpdateAsync(resourceGroupName, virtualMachineTemplateName, properties, context).last() + private Mono deleteAsync(String resourceGroupName, String virtualMachineTemplateName) { + final ForceDelete force = null; + return beginDeleteAsync(resourceGroupName, virtualMachineTemplateName, force).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the VirtualMachineTemplate PATCH method. + * Implements VirtualMachineTemplate DELETE method. * - * Updates the VirtualMachineTemplate resource. + * Deregisters the ScVmm VM Template from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VirtualMachineTemplates resource definition. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineTemplateInner update(String resourceGroupName, String virtualMachineTemplateName, - VirtualMachineTemplateTagsUpdate properties) { - return updateAsync(resourceGroupName, virtualMachineTemplateName, properties).block(); + private Mono deleteAsync(String resourceGroupName, String virtualMachineTemplateName, ForceDelete force, + Context context) { + return beginDeleteAsync(resourceGroupName, virtualMachineTemplateName, force, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the VirtualMachineTemplate PATCH method. + * Implements VirtualMachineTemplate DELETE method. * - * Updates the VirtualMachineTemplate resource. + * Deregisters the ScVmm VM Template from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @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 VirtualMachineTemplates resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineTemplateInner update(String resourceGroupName, String virtualMachineTemplateName, - VirtualMachineTemplateTagsUpdate properties, Context context) { - return updateAsync(resourceGroupName, virtualMachineTemplateName, properties, context).block(); + public void delete(String resourceGroupName, String virtualMachineTemplateName) { + final ForceDelete force = null; + deleteAsync(resourceGroupName, virtualMachineTemplateName, force).block(); } /** @@ -1075,14 +1072,32 @@ public VirtualMachineTemplateInner update(String resourceGroupName, String virtu * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @param force Forces the resource to be deleted. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 virtualMachineTemplateName, ForceDelete force) { + public void delete(String resourceGroupName, String virtualMachineTemplateName, ForceDelete force, + Context context) { + deleteAsync(resourceGroupName, virtualMachineTemplateName, force, context).block(); + } + + /** + * Implements GET VirtualMachineTemplates in a resource group. + * + * List of VirtualMachineTemplates in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualMachineTemplate list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1095,34 +1110,31 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (virtualMachineTemplateName == null) { - return Mono.error( - new IllegalArgumentException("Parameter virtualMachineTemplateName is required and cannot be null.")); - } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, force, virtualMachineTemplateName, accept, context)) + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements VirtualMachineTemplate DELETE method. + * Implements GET VirtualMachineTemplates in a resource group. * - * Deregisters the ScVmm VM Template from Azure. + * List of VirtualMachineTemplates in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a VirtualMachineTemplate list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String virtualMachineTemplateName, ForceDelete force, Context context) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1135,218 +1147,208 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (virtualMachineTemplateName == null) { - return Mono.error( - new IllegalArgumentException("Parameter virtualMachineTemplateName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, force, virtualMachineTemplateName, accept, context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Implements VirtualMachineTemplate DELETE method. + * Implements GET VirtualMachineTemplates in a resource group. * - * Deregisters the ScVmm VM Template from Azure. + * List of VirtualMachineTemplates in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String virtualMachineTemplateName, ForceDelete force) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, virtualMachineTemplateName, force); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Implements VirtualMachineTemplate DELETE method. + * Implements GET VirtualMachineTemplates in a resource group. * - * Deregisters the ScVmm VM Template from Azure. + * List of VirtualMachineTemplates in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String virtualMachineTemplateName) { - final ForceDelete force = null; - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, virtualMachineTemplateName, force); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Implements VirtualMachineTemplate DELETE method. + * Implements GET VirtualMachineTemplates in a resource group. * - * Deregisters the ScVmm VM Template from Azure. + * List of VirtualMachineTemplates in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param force Forces the resource to be deleted. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String virtualMachineTemplateName, ForceDelete force, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, virtualMachineTemplateName, force, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } /** - * Implements VirtualMachineTemplate DELETE method. + * Implements GET VirtualMachineTemplates in a resource group. * - * Deregisters the ScVmm VM Template from Azure. + * List of VirtualMachineTemplates in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualMachineTemplateName) { - final ForceDelete force = null; - return this.beginDeleteAsync(resourceGroupName, virtualMachineTemplateName, force).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** - * Implements VirtualMachineTemplate DELETE method. + * Implements GET VirtualMachineTemplates in a subscription. * - * Deregisters the ScVmm VM Template from Azure. + * List of VirtualMachineTemplates in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param force Forces the resource to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a VirtualMachineTemplate list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualMachineTemplateName, - ForceDelete force, Context context) { - return this.beginDeleteAsync(resourceGroupName, virtualMachineTemplateName, force, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements VirtualMachineTemplate DELETE method. + * Implements GET VirtualMachineTemplates in a subscription. * - * Deregisters the ScVmm VM Template from Azure. + * List of VirtualMachineTemplates in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param force Forces the resource to be deleted. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a VirtualMachineTemplate list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String virtualMachineTemplateName, ForceDelete force) { - return beginDeleteAsync(resourceGroupName, virtualMachineTemplateName, force).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Implements VirtualMachineTemplate DELETE method. + * Implements GET VirtualMachineTemplates in a subscription. * - * Deregisters the ScVmm VM Template from Azure. + * List of VirtualMachineTemplates in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String virtualMachineTemplateName) { - final ForceDelete force = null; - return beginDeleteAsync(resourceGroupName, virtualMachineTemplateName, force).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Implements VirtualMachineTemplate DELETE method. + * Implements GET VirtualMachineTemplates in a subscription. * - * Deregisters the ScVmm VM Template from Azure. + * List of VirtualMachineTemplates in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String virtualMachineTemplateName, ForceDelete force, - Context context) { - return beginDeleteAsync(resourceGroupName, virtualMachineTemplateName, force, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** - * Implements VirtualMachineTemplate DELETE method. + * Implements GET VirtualMachineTemplates in a subscription. * - * Deregisters the ScVmm VM Template from Azure. + * List of VirtualMachineTemplates in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String virtualMachineTemplateName) { - final ForceDelete force = null; - deleteAsync(resourceGroupName, virtualMachineTemplateName, force).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); } /** - * Implements VirtualMachineTemplate DELETE method. + * Implements GET VirtualMachineTemplates in a subscription. * - * Deregisters the ScVmm VM Template from Azure. + * List of VirtualMachineTemplates in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String virtualMachineTemplateName, ForceDelete force, - Context context) { - deleteAsync(resourceGroupName, virtualMachineTemplateName, force, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** + * Implements GET VirtualMachineTemplates in a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1357,7 +1359,7 @@ public void delete(String resourceGroupName, String virtualMachineTemplateName, * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1368,13 +1370,15 @@ private Mono> listBySubscriptionNextS final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * Implements GET VirtualMachineTemplates in a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1386,7 +1390,7 @@ private Mono> listBySubscriptionNextS * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1397,12 +1401,14 @@ private Mono> listBySubscriptionNextS } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** + * Implements GET VirtualMachineTemplates in a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1413,7 +1419,7 @@ private Mono> listBySubscriptionNextS * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1424,13 +1430,15 @@ private Mono> listByResourceGroupNext final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * Implements GET VirtualMachineTemplates in a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1442,7 +1450,7 @@ private Mono> listByResourceGroupNext * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1453,7 +1461,7 @@ private Mono> listByResourceGroupNext } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineTemplatesImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineTemplatesImpl.java index ff6d086faa3b..d539902d7c64 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineTemplatesImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualMachineTemplatesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -20,35 +20,14 @@ public final class VirtualMachineTemplatesImpl implements VirtualMachineTemplate private final VirtualMachineTemplatesClient innerClient; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; public VirtualMachineTemplatesImpl(VirtualMachineTemplatesClient innerClient, - com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineTemplateImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineTemplateImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineTemplateImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineTemplateImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String virtualMachineTemplateName, Context context) { Response inner = this.serviceClient() @@ -80,6 +59,27 @@ public void delete(String resourceGroupName, String virtualMachineTemplateName, this.serviceClient().delete(resourceGroupName, virtualMachineTemplateName, force, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineTemplateImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineTemplateImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineTemplateImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineTemplateImpl(inner1, this.manager())); + } + public VirtualMachineTemplate getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -142,7 +142,7 @@ private VirtualMachineTemplatesClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualNetworkImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualNetworkImpl.java index 510bc1a76ed7..a8f96cf283f2 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualNetworkImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualNetworkImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -18,7 +18,7 @@ public final class VirtualNetworkImpl implements VirtualNetwork, VirtualNetwork.Definition, VirtualNetwork.Update { private VirtualNetworkInner innerObject; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; public String id() { return this.innerModel().id(); @@ -73,7 +73,7 @@ public VirtualNetworkInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } @@ -102,7 +102,7 @@ public VirtualNetwork create(Context context) { return this; } - VirtualNetworkImpl(String name, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + VirtualNetworkImpl(String name, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerObject = new VirtualNetworkInner(); this.serviceManager = serviceManager; this.virtualNetworkName = name; @@ -127,7 +127,7 @@ public VirtualNetwork apply(Context context) { return this; } - VirtualNetworkImpl(VirtualNetworkInner innerObject, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + VirtualNetworkImpl(VirtualNetworkInner innerObject, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualNetworksClientImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualNetworksClientImpl.java index 2b3f9278993f..84ca83f5ef34 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualNetworksClientImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualNetworksClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -34,8 +34,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.scvmm.fluent.VirtualNetworksClient; import com.azure.resourcemanager.scvmm.fluent.models.VirtualNetworkInner; +import com.azure.resourcemanager.scvmm.implementation.models.VirtualNetworkListResult; import com.azure.resourcemanager.scvmm.models.ForceDelete; -import com.azure.resourcemanager.scvmm.models.VirtualNetworkListResult; import com.azure.resourcemanager.scvmm.models.VirtualNetworkTagsUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -53,114 +53,116 @@ public final class VirtualNetworksClientImpl implements VirtualNetworksClient { /** * The service client containing this operation class. */ - private final ScvmmClientImpl client; + private final ScVmmClientImpl client; /** * Initializes an instance of VirtualNetworksClientImpl. * * @param client the instance of the service client containing this operation class. */ - VirtualNetworksClientImpl(ScvmmClientImpl client) { + VirtualNetworksClientImpl(ScVmmClientImpl client) { this.service = RestProxy.create(VirtualNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ScvmmClientVirtualNetworks to be used by the proxy service to perform + * The interface defining all the services for ScVmmClientVirtualNetworks to be used by the proxy service to perform * REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ScvmmClientVirtualNe") + @Host("{endpoint}") + @ServiceInterface(name = "ScVmmClientVirtualNe") public interface VirtualNetworksService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualNetworks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualNetworkName") String virtualNetworkName, @HeaderParam("Accept") String accept, + @PathParam("virtualNetworkName") String virtualNetworkName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualNetworkName") String virtualNetworkName, - @BodyParam("application/json") VirtualNetworkInner resource, @HeaderParam("Accept") String accept, - Context context); + @PathParam("virtualNetworkName") String virtualNetworkName, @HeaderParam("accept") String accept, + @BodyParam("application/json") VirtualNetworkInner resource, Context context); @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualNetworkName") String virtualNetworkName, - @BodyParam("application/json") VirtualNetworkTagsUpdate properties, @HeaderParam("Accept") String accept, - Context context); + @PathParam("virtualNetworkName") String virtualNetworkName, @HeaderParam("accept") String accept, + @BodyParam("application/json") VirtualNetworkTagsUpdate properties, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("force") ForceDelete force, - @PathParam("virtualNetworkName") String virtualNetworkName, @HeaderParam("Accept") String accept, + @PathParam("virtualNetworkName") String virtualNetworkName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + @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) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** - * Implements GET VirtualNetworks in a subscription. + * Gets a VirtualNetwork. * - * List of VirtualNetworks in a subscription. + * Implements VirtualNetwork GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the VirtualNetwork. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VirtualNetwork list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the VirtualNetworks resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String virtualNetworkName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -169,29 +171,38 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (virtualNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements GET VirtualNetworks in a subscription. + * Gets a VirtualNetwork. * - * List of VirtualNetworks in a subscription. + * Implements VirtualNetwork GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the VirtualNetwork. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VirtualNetwork list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the VirtualNetworks resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String virtualNetworkName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -200,91 +211,91 @@ private Mono> listSinglePageAsync(Context con return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (virtualNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, accept, context); } /** - * Implements GET VirtualNetworks in a subscription. + * Gets a VirtualNetwork. * - * List of VirtualNetworks in a subscription. + * Implements VirtualNetwork GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the VirtualNetwork. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VirtualNetwork list operation as paginated response with {@link PagedFlux}. + * @return the VirtualNetworks resource definition on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String virtualNetworkName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, virtualNetworkName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Implements GET VirtualNetworks in a subscription. + * Gets a VirtualNetwork. * - * List of VirtualNetworks in a subscription. + * Implements VirtualNetwork GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the VirtualNetwork. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VirtualNetwork list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Implements GET VirtualNetworks in a subscription. - * - * List of VirtualNetworks in a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + * @return the VirtualNetworks resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String virtualNetworkName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, virtualNetworkName, context).block(); } /** - * Implements GET VirtualNetworks in a subscription. + * Gets a VirtualNetwork. * - * List of VirtualNetworks in a subscription. + * Implements VirtualNetwork GET method. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the VirtualNetwork. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VirtualNetwork list operation as paginated response with {@link PagedIterable}. + * @return the VirtualNetworks resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualNetworkInner getByResourceGroup(String resourceGroupName, String virtualNetworkName) { + return getByResourceGroupWithResponse(resourceGroupName, virtualNetworkName, Context.NONE).getValue(); } /** - * Implements GET VirtualNetworks in a resource group. + * Implements VirtualNetworks PUT method. * - * List of VirtualNetworks in a resource group. + * Onboards the ScVmm virtual network as an Azure virtual network resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the VirtualNetwork. + * @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 response of a VirtualNetwork list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the VirtualNetworks resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String virtualNetworkName, VirtualNetworkInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -297,31 +308,40 @@ private Mono> listByResourceGroupSinglePageAs return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (virtualNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements GET VirtualNetworks in a resource group. + * Implements VirtualNetworks PUT method. * - * List of VirtualNetworks in a resource group. + * Onboards the ScVmm virtual network as an Azure virtual network resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the VirtualNetwork. + * @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 response of a VirtualNetwork list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the VirtualNetworks resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String virtualNetworkName, VirtualNetworkInner resource, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -334,223 +354,194 @@ private Mono> listByResourceGroupSinglePageAs return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (virtualNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, accept, resource, context); } /** - * Implements GET VirtualNetworks in a resource group. + * Implements VirtualNetworks PUT method. * - * List of VirtualNetworks in a resource group. + * Onboards the ScVmm virtual network as an Azure virtual network resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the VirtualNetwork. + * @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 response of a VirtualNetwork list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of the VirtualNetworks resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VirtualNetworkInner> + beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, virtualNetworkName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VirtualNetworkInner.class, VirtualNetworkInner.class, this.client.getContext()); } /** - * Implements GET VirtualNetworks in a resource group. + * Implements VirtualNetworks PUT method. * - * List of VirtualNetworks in a resource group. + * Onboards the ScVmm virtual network as an Azure virtual network resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the VirtualNetwork. + * @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 response of a VirtualNetwork list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of the VirtualNetworks resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VirtualNetworkInner> beginCreateOrUpdateAsync( + String resourceGroupName, String virtualNetworkName, VirtualNetworkInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, virtualNetworkName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VirtualNetworkInner.class, VirtualNetworkInner.class, context); } /** - * Implements GET VirtualNetworks in a resource group. + * Implements VirtualNetworks PUT method. * - * List of VirtualNetworks in a resource group. + * Onboards the ScVmm virtual network as an Azure virtual network resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the VirtualNetwork. + * @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 response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of the VirtualNetworks resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualNetworkInner> + beginCreateOrUpdate(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, virtualNetworkName, resource).getSyncPoller(); } /** - * Implements GET VirtualNetworks in a resource group. + * Implements VirtualNetworks PUT method. * - * List of VirtualNetworks in a resource group. + * Onboards the ScVmm virtual network as an Azure virtual network resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the VirtualNetwork. + * @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 response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of the VirtualNetworks resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualNetworkInner> beginCreateOrUpdate( + String resourceGroupName, String virtualNetworkName, VirtualNetworkInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, virtualNetworkName, resource, context).getSyncPoller(); } /** - * Gets a VirtualNetwork. + * Implements VirtualNetworks PUT method. * - * Implements VirtualNetwork GET method. + * Onboards the ScVmm virtual network as an Azure virtual network resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. + * @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 VirtualNetworks resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the VirtualNetworks resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String virtualNetworkName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, + VirtualNetworkInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, virtualNetworkName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a VirtualNetwork. + * Implements VirtualNetworks PUT method. * - * Implements VirtualNetwork GET method. + * Onboards the ScVmm virtual network as an Azure virtual network resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. + * @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 VirtualNetworks resource definition along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String virtualNetworkName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, accept, context); - } - - /** - * Gets a VirtualNetwork. - * - * Implements VirtualNetwork GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the VirtualNetworks resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String virtualNetworkName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, virtualNetworkName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, + VirtualNetworkInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, virtualNetworkName, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a VirtualNetwork. + * Implements VirtualNetworks PUT method. * - * Implements VirtualNetwork GET method. + * Onboards the ScVmm virtual network as an Azure virtual network resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param context The context to associate with this operation. + * @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 VirtualNetworks resource definition along with {@link Response}. + * @return the VirtualNetworks resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String virtualNetworkName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, virtualNetworkName, context).block(); + public VirtualNetworkInner createOrUpdate(String resourceGroupName, String virtualNetworkName, + VirtualNetworkInner resource) { + return createOrUpdateAsync(resourceGroupName, virtualNetworkName, resource).block(); } /** - * Gets a VirtualNetwork. + * Implements VirtualNetworks PUT method. * - * Implements VirtualNetwork GET method. + * Onboards the ScVmm virtual network as an Azure virtual network resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. + * @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 VirtualNetworks resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualNetworkInner getByResourceGroup(String resourceGroupName, String virtualNetworkName) { - return getByResourceGroupWithResponse(resourceGroupName, virtualNetworkName, Context.NONE).getValue(); + public VirtualNetworkInner createOrUpdate(String resourceGroupName, String virtualNetworkName, + VirtualNetworkInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, virtualNetworkName, resource, context).block(); } /** - * Implements VirtualNetworks PUT method. + * Implements the VirtualNetworks PATCH method. * - * Onboards the ScVmm virtual network as an Azure virtual network resource. + * Updates the VirtualNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param resource Resource create parameters. + * @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. @@ -558,8 +549,8 @@ public VirtualNetworkInner getByResourceGroup(String resourceGroupName, String v * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String virtualNetworkName, VirtualNetworkInner resource) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String virtualNetworkName, VirtualNetworkTagsUpdate properties) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -576,26 +567,26 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); } else { - resource.validate(); + properties.validate(); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, resource, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements VirtualNetworks PUT method. + * Implements the VirtualNetworks PATCH method. * - * Onboards the ScVmm virtual network as an Azure virtual network resource. + * Updates the VirtualNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param resource Resource create parameters. + * @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. @@ -604,8 +595,8 @@ private Mono>> createOrUpdateWithResponseAsync(String * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String virtualNetworkName, VirtualNetworkInner resource, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String virtualNetworkName, VirtualNetworkTagsUpdate properties, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -622,47 +613,47 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); } else { - resource.validate(); + properties.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, resource, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, virtualNetworkName, accept, properties, context); } /** - * Implements VirtualNetworks PUT method. + * Implements the VirtualNetworks PATCH method. * - * Onboards the ScVmm virtual network as an Azure virtual network resource. + * Updates the VirtualNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param resource Resource create parameters. + * @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 the VirtualNetworks resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualNetworkInner> - beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner resource) { + private PollerFlux, VirtualNetworkInner> beginUpdateAsync(String resourceGroupName, + String virtualNetworkName, VirtualNetworkTagsUpdate properties) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, virtualNetworkName, resource); + = updateWithResponseAsync(resourceGroupName, virtualNetworkName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), VirtualNetworkInner.class, VirtualNetworkInner.class, this.client.getContext()); } /** - * Implements VirtualNetworks PUT method. + * Implements the VirtualNetworks PATCH method. * - * Onboards the ScVmm virtual network as an Azure virtual network resource. + * Updates the VirtualNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param resource Resource create parameters. + * @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. @@ -670,42 +661,42 @@ private Mono>> createOrUpdateWithResponseAsync(String * @return the {@link PollerFlux} for polling of the VirtualNetworks resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualNetworkInner> beginCreateOrUpdateAsync( - String resourceGroupName, String virtualNetworkName, VirtualNetworkInner resource, Context context) { + private PollerFlux, VirtualNetworkInner> beginUpdateAsync(String resourceGroupName, + String virtualNetworkName, VirtualNetworkTagsUpdate properties, Context context) { context = this.client.mergeContext(context); Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, virtualNetworkName, resource, context); + = updateWithResponseAsync(resourceGroupName, virtualNetworkName, properties, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), VirtualNetworkInner.class, VirtualNetworkInner.class, context); } /** - * Implements VirtualNetworks PUT method. + * Implements the VirtualNetworks PATCH method. * - * Onboards the ScVmm virtual network as an Azure virtual network resource. + * Updates the VirtualNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param resource Resource create parameters. + * @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 the VirtualNetworks resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualNetworkInner> - beginCreateOrUpdate(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, virtualNetworkName, resource).getSyncPoller(); + public SyncPoller, VirtualNetworkInner> beginUpdate(String resourceGroupName, + String virtualNetworkName, VirtualNetworkTagsUpdate properties) { + return this.beginUpdateAsync(resourceGroupName, virtualNetworkName, properties).getSyncPoller(); } /** - * Implements VirtualNetworks PUT method. + * Implements the VirtualNetworks PATCH method. * - * Onboards the ScVmm virtual network as an Azure virtual network resource. + * Updates the VirtualNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param resource Resource create parameters. + * @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. @@ -713,39 +704,39 @@ private PollerFlux, VirtualNetworkInner> beginCr * @return the {@link SyncPoller} for polling of the VirtualNetworks resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualNetworkInner> beginCreateOrUpdate( - String resourceGroupName, String virtualNetworkName, VirtualNetworkInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, virtualNetworkName, resource, context).getSyncPoller(); + public SyncPoller, VirtualNetworkInner> beginUpdate(String resourceGroupName, + String virtualNetworkName, VirtualNetworkTagsUpdate properties, Context context) { + return this.beginUpdateAsync(resourceGroupName, virtualNetworkName, properties, context).getSyncPoller(); } /** - * Implements VirtualNetworks PUT method. + * Implements the VirtualNetworks PATCH method. * - * Onboards the ScVmm virtual network as an Azure virtual network resource. + * Updates the VirtualNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param resource Resource create parameters. + * @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 VirtualNetworks resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, - VirtualNetworkInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, virtualNetworkName, resource).last() + private Mono updateAsync(String resourceGroupName, String virtualNetworkName, + VirtualNetworkTagsUpdate properties) { + return beginUpdateAsync(resourceGroupName, virtualNetworkName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements VirtualNetworks PUT method. + * Implements the VirtualNetworks PATCH method. * - * Onboards the ScVmm virtual network as an Azure virtual network resource. + * Updates the VirtualNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param resource Resource create parameters. + * @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. @@ -753,39 +744,39 @@ private Mono createOrUpdateAsync(String resourceGroupName, * @return the VirtualNetworks resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, - VirtualNetworkInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, virtualNetworkName, resource, context).last() + private Mono updateAsync(String resourceGroupName, String virtualNetworkName, + VirtualNetworkTagsUpdate properties, Context context) { + return beginUpdateAsync(resourceGroupName, virtualNetworkName, properties, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements VirtualNetworks PUT method. + * Implements the VirtualNetworks PATCH method. * - * Onboards the ScVmm virtual network as an Azure virtual network resource. + * Updates the VirtualNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param resource Resource create parameters. + * @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 VirtualNetworks resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualNetworkInner createOrUpdate(String resourceGroupName, String virtualNetworkName, - VirtualNetworkInner resource) { - return createOrUpdateAsync(resourceGroupName, virtualNetworkName, resource).block(); + public VirtualNetworkInner update(String resourceGroupName, String virtualNetworkName, + VirtualNetworkTagsUpdate properties) { + return updateAsync(resourceGroupName, virtualNetworkName, properties).block(); } /** - * Implements VirtualNetworks PUT method. + * Implements the VirtualNetworks PATCH method. * - * Onboards the ScVmm virtual network as an Azure virtual network resource. + * Updates the VirtualNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param resource Resource create parameters. + * @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. @@ -793,28 +784,27 @@ public VirtualNetworkInner createOrUpdate(String resourceGroupName, String virtu * @return the VirtualNetworks resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualNetworkInner createOrUpdate(String resourceGroupName, String virtualNetworkName, - VirtualNetworkInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, virtualNetworkName, resource, context).block(); + public VirtualNetworkInner update(String resourceGroupName, String virtualNetworkName, + VirtualNetworkTagsUpdate properties, Context context) { + return updateAsync(resourceGroupName, virtualNetworkName, properties, context).block(); } /** - * Implements the VirtualNetworks PATCH method. + * Implements VirtualNetwork DELETE method. * - * Updates the VirtualNetworks resource. + * Deregisters the ScVmm virtual network from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VirtualNetworks resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String virtualNetworkName, VirtualNetworkTagsUpdate properties) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String virtualNetworkName, ForceDelete force) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -831,36 +821,30 @@ private Mono>> updateWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, properties, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, force, virtualNetworkName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the VirtualNetworks PATCH method. + * Implements VirtualNetwork DELETE method. * - * Updates the VirtualNetworks resource. + * Deregisters the ScVmm virtual network from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VirtualNetworks resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String virtualNetworkName, VirtualNetworkTagsUpdate properties, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String virtualNetworkName, ForceDelete force, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -877,180 +861,189 @@ private Mono>> updateWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, virtualNetworkName, properties, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, force, virtualNetworkName, accept, context); } /** - * Implements the VirtualNetworks PATCH method. + * Implements VirtualNetwork DELETE method. * - * Updates the VirtualNetworks resource. + * Deregisters the ScVmm virtual network from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the VirtualNetworks resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualNetworkInner> beginUpdateAsync(String resourceGroupName, - String virtualNetworkName, VirtualNetworkTagsUpdate properties) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, virtualNetworkName, properties); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VirtualNetworkInner.class, VirtualNetworkInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualNetworkName, + ForceDelete force) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, virtualNetworkName, force); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Implements the VirtualNetworks PATCH method. + * Implements VirtualNetwork DELETE method. * - * Updates the VirtualNetworks resource. + * Deregisters the ScVmm virtual network from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualNetworkName) { + final ForceDelete force = null; + Mono>> mono = deleteWithResponseAsync(resourceGroupName, virtualNetworkName, force); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Implements VirtualNetwork DELETE method. + * + * Deregisters the ScVmm virtual network from Azure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the VirtualNetwork. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the VirtualNetworks resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualNetworkInner> beginUpdateAsync(String resourceGroupName, - String virtualNetworkName, VirtualNetworkTagsUpdate properties, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualNetworkName, + ForceDelete force, Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateWithResponseAsync(resourceGroupName, virtualNetworkName, properties, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VirtualNetworkInner.class, VirtualNetworkInner.class, context); + = deleteWithResponseAsync(resourceGroupName, virtualNetworkName, force, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Implements the VirtualNetworks PATCH method. + * Implements VirtualNetwork DELETE method. * - * Updates the VirtualNetworks resource. + * Deregisters the ScVmm virtual network from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @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 the VirtualNetworks resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualNetworkInner> beginUpdate(String resourceGroupName, - String virtualNetworkName, VirtualNetworkTagsUpdate properties) { - return this.beginUpdateAsync(resourceGroupName, virtualNetworkName, properties).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualNetworkName) { + final ForceDelete force = null; + return this.beginDeleteAsync(resourceGroupName, virtualNetworkName, force).getSyncPoller(); } /** - * Implements the VirtualNetworks PATCH method. + * Implements VirtualNetwork DELETE method. * - * Updates the VirtualNetworks resource. + * Deregisters the ScVmm virtual network from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the VirtualNetworks resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualNetworkInner> beginUpdate(String resourceGroupName, - String virtualNetworkName, VirtualNetworkTagsUpdate properties, Context context) { - return this.beginUpdateAsync(resourceGroupName, virtualNetworkName, properties, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualNetworkName, + ForceDelete force, Context context) { + return this.beginDeleteAsync(resourceGroupName, virtualNetworkName, force, context).getSyncPoller(); } /** - * Implements the VirtualNetworks PATCH method. + * Implements VirtualNetwork DELETE method. * - * Updates the VirtualNetworks resource. + * Deregisters the ScVmm virtual network from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VirtualNetworks resource definition on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String virtualNetworkName, - VirtualNetworkTagsUpdate properties) { - return beginUpdateAsync(resourceGroupName, virtualNetworkName, properties).last() + private Mono deleteAsync(String resourceGroupName, String virtualNetworkName, ForceDelete force) { + return beginDeleteAsync(resourceGroupName, virtualNetworkName, force).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the VirtualNetworks PATCH method. + * Implements VirtualNetwork DELETE method. * - * Updates the VirtualNetworks resource. + * Deregisters the ScVmm virtual network from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @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 VirtualNetworks resource definition on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String virtualNetworkName, - VirtualNetworkTagsUpdate properties, Context context) { - return beginUpdateAsync(resourceGroupName, virtualNetworkName, properties, context).last() + private Mono deleteAsync(String resourceGroupName, String virtualNetworkName) { + final ForceDelete force = null; + return beginDeleteAsync(resourceGroupName, virtualNetworkName, force).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the VirtualNetworks PATCH method. + * Implements VirtualNetwork DELETE method. * - * Updates the VirtualNetworks resource. + * Deregisters the ScVmm virtual network from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VirtualNetworks resource definition. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualNetworkInner update(String resourceGroupName, String virtualNetworkName, - VirtualNetworkTagsUpdate properties) { - return updateAsync(resourceGroupName, virtualNetworkName, properties).block(); + private Mono deleteAsync(String resourceGroupName, String virtualNetworkName, ForceDelete force, + Context context) { + return beginDeleteAsync(resourceGroupName, virtualNetworkName, force, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the VirtualNetworks PATCH method. + * Implements VirtualNetwork DELETE method. * - * Updates the VirtualNetworks resource. + * Deregisters the ScVmm virtual network from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. - * @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 VirtualNetworks resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualNetworkInner update(String resourceGroupName, String virtualNetworkName, - VirtualNetworkTagsUpdate properties, Context context) { - return updateAsync(resourceGroupName, virtualNetworkName, properties, context).block(); + public void delete(String resourceGroupName, String virtualNetworkName) { + final ForceDelete force = null; + deleteAsync(resourceGroupName, virtualNetworkName, force).block(); } /** @@ -1061,14 +1054,30 @@ public VirtualNetworkInner update(String resourceGroupName, String virtualNetwor * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName Name of the VirtualNetwork. * @param force Forces the resource to be deleted. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 virtualNetworkName, ForceDelete force) { + public void delete(String resourceGroupName, String virtualNetworkName, ForceDelete force, Context context) { + deleteAsync(resourceGroupName, virtualNetworkName, force, context).block(); + } + + /** + * Implements GET VirtualNetworks in a resource group. + * + * List of VirtualNetworks in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetwork list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1077,38 +1086,35 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualNetworkName == null) { + if (resourceGroupName == null) { return Mono - .error(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, force, virtualNetworkName, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements VirtualNetwork DELETE method. + * Implements GET VirtualNetworks in a resource group. * - * Deregisters the ScVmm virtual network from Azure. + * List of VirtualNetworks in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a VirtualNetwork list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String virtualNetworkName, ForceDelete force, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1121,214 +1127,208 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (virtualNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, force, virtualNetworkName, accept, context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Implements VirtualNetwork DELETE method. + * Implements GET VirtualNetworks in a resource group. * - * Deregisters the ScVmm virtual network from Azure. + * List of VirtualNetworks in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualNetworkName, - ForceDelete force) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, virtualNetworkName, force); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Implements VirtualNetwork DELETE method. + * Implements GET VirtualNetworks in a resource group. * - * Deregisters the ScVmm virtual network from Azure. + * List of VirtualNetworks in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualNetworkName) { - final ForceDelete force = null; - Mono>> mono = deleteWithResponseAsync(resourceGroupName, virtualNetworkName, force); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Implements VirtualNetwork DELETE method. + * Implements GET VirtualNetworks in a resource group. * - * Deregisters the ScVmm virtual network from Azure. + * List of VirtualNetworks in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param force Forces the resource to be deleted. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualNetworkName, - ForceDelete force, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, virtualNetworkName, force, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } /** - * Implements VirtualNetwork DELETE method. + * Implements GET VirtualNetworks in a resource group. * - * Deregisters the ScVmm virtual network from Azure. + * List of VirtualNetworks in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualNetworkName) { - final ForceDelete force = null; - return this.beginDeleteAsync(resourceGroupName, virtualNetworkName, force).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** - * Implements VirtualNetwork DELETE method. + * Implements GET VirtualNetworks in a subscription. * - * Deregisters the ScVmm virtual network from Azure. + * List of VirtualNetworks in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param force Forces the resource to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a VirtualNetwork list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualNetworkName, - ForceDelete force, Context context) { - return this.beginDeleteAsync(resourceGroupName, virtualNetworkName, force, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements VirtualNetwork DELETE method. + * Implements GET VirtualNetworks in a subscription. * - * Deregisters the ScVmm virtual network from Azure. + * List of VirtualNetworks in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param force Forces the resource to be deleted. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a VirtualNetwork list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String virtualNetworkName, ForceDelete force) { - return beginDeleteAsync(resourceGroupName, virtualNetworkName, force).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Implements VirtualNetwork DELETE method. + * Implements GET VirtualNetworks in a subscription. * - * Deregisters the ScVmm virtual network from Azure. + * List of VirtualNetworks in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String virtualNetworkName) { - final ForceDelete force = null; - return beginDeleteAsync(resourceGroupName, virtualNetworkName, force).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Implements VirtualNetwork DELETE method. + * Implements GET VirtualNetworks in a subscription. * - * Deregisters the ScVmm virtual network from Azure. + * List of VirtualNetworks in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String virtualNetworkName, ForceDelete force, - Context context) { - return beginDeleteAsync(resourceGroupName, virtualNetworkName, force, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** - * Implements VirtualNetwork DELETE method. + * Implements GET VirtualNetworks in a subscription. * - * Deregisters the ScVmm virtual network from Azure. + * List of VirtualNetworks in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VirtualNetwork list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String virtualNetworkName) { - final ForceDelete force = null; - deleteAsync(resourceGroupName, virtualNetworkName, force).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); } /** - * Implements VirtualNetwork DELETE method. + * Implements GET VirtualNetworks in a subscription. * - * Deregisters the ScVmm virtual network from Azure. + * List of VirtualNetworks in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VirtualNetwork list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String virtualNetworkName, ForceDelete force, Context context) { - deleteAsync(resourceGroupName, virtualNetworkName, force, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** + * Implements GET VirtualNetworks in a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1339,7 +1339,7 @@ public void delete(String resourceGroupName, String virtualNetworkName, ForceDel * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1350,13 +1350,15 @@ private Mono> listBySubscriptionNextSinglePag final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * Implements GET VirtualNetworks in a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1368,7 +1370,7 @@ private Mono> listBySubscriptionNextSinglePag * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1379,12 +1381,14 @@ private Mono> listBySubscriptionNextSinglePag } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** + * Implements GET VirtualNetworks in a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1395,7 +1399,7 @@ private Mono> listBySubscriptionNextSinglePag * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1406,13 +1410,15 @@ private Mono> listByResourceGroupNextSinglePa final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * Implements GET VirtualNetworks in a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1424,7 +1430,7 @@ private Mono> listByResourceGroupNextSinglePa * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1435,7 +1441,7 @@ private Mono> listByResourceGroupNextSinglePa } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualNetworksImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualNetworksImpl.java index b6d77b023c07..fc60d0a3795b 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualNetworksImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VirtualNetworksImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -20,34 +20,14 @@ public final class VirtualNetworksImpl implements VirtualNetworks { private final VirtualNetworksClient innerClient; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; public VirtualNetworksImpl(VirtualNetworksClient innerClient, - com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String virtualNetworkName, Context context) { Response inner @@ -77,6 +57,26 @@ public void delete(String resourceGroupName, String virtualNetworkName, ForceDel this.serviceClient().delete(resourceGroupName, virtualNetworkName, force, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkImpl(inner1, this.manager())); + } + public VirtualNetwork getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -138,7 +138,7 @@ private VirtualNetworksClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmInstanceHybridIdentityMetadataImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmInstanceHybridIdentityMetadataImpl.java index 1c4055d5248b..25737806275d 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmInstanceHybridIdentityMetadataImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmInstanceHybridIdentityMetadataImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -12,10 +12,10 @@ public final class VmInstanceHybridIdentityMetadataImpl implements VmInstanceHybridIdentityMetadata { private VmInstanceHybridIdentityMetadataInner innerObject; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; VmInstanceHybridIdentityMetadataImpl(VmInstanceHybridIdentityMetadataInner innerObject, - com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -44,7 +44,7 @@ public VmInstanceHybridIdentityMetadataInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmInstanceHybridIdentityMetadatasClientImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmInstanceHybridIdentityMetadatasClientImpl.java index 1d29c4f3651a..b8e8440e6276 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmInstanceHybridIdentityMetadatasClientImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmInstanceHybridIdentityMetadatasClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.scvmm.fluent.VmInstanceHybridIdentityMetadatasClient; import com.azure.resourcemanager.scvmm.fluent.models.VmInstanceHybridIdentityMetadataInner; -import com.azure.resourcemanager.scvmm.models.VmInstanceHybridIdentityMetadataListResult; +import com.azure.resourcemanager.scvmm.implementation.models.VmInstanceHybridIdentityMetadataListResult; import reactor.core.publisher.Mono; /** @@ -42,68 +42,64 @@ public final class VmInstanceHybridIdentityMetadatasClientImpl implements VmInst /** * The service client containing this operation class. */ - private final ScvmmClientImpl client; + private final ScVmmClientImpl client; /** * Initializes an instance of VmInstanceHybridIdentityMetadatasClientImpl. * * @param client the instance of the service client containing this operation class. */ - VmInstanceHybridIdentityMetadatasClientImpl(ScvmmClientImpl client) { + VmInstanceHybridIdentityMetadatasClientImpl(ScVmmClientImpl client) { this.service = RestProxy.create(VmInstanceHybridIdentityMetadatasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ScvmmClientVmInstanceHybridIdentityMetadatas to be used by the proxy + * The interface defining all the services for ScVmmClientVmInstanceHybridIdentityMetadatas to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ScvmmClientVmInstanc") + @Host("{endpoint}") + @ServiceInterface(name = "ScVmmClientVmInstanc") public interface VmInstanceHybridIdentityMetadatasService { @Headers({ "Content-Type: application/json" }) - @Get("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata") + @Get("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByVirtualMachineInstance( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceUri") String resourceUri, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata/default") + @Get("/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, - Context context); + Mono> listByVirtualMachineInstance( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("resourceUri") String resourceUri, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByVirtualMachineInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** - * Implements GET HybridIdentityMetadata in a vm. + * Gets HybridIdentityMetadata. * - * Returns the list of HybridIdentityMetadata of the given VM. + * Implements HybridIdentityMetadata GET method. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VmInstanceHybridIdentityMetadata list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return defines the HybridIdentityMetadata along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByVirtualMachineInstanceSinglePageAsync(String resourceUri) { + private Mono> getWithResponseAsync(String resourceUri) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -113,29 +109,26 @@ Mono> listByVirtualMachineI } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByVirtualMachineInstance(this.client.getEndpoint(), - this.client.getApiVersion(), resourceUri, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements GET HybridIdentityMetadata in a vm. + * Gets HybridIdentityMetadata. * - * Returns the list of HybridIdentityMetadata of the given VM. + * Implements HybridIdentityMetadata GET method. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VmInstanceHybridIdentityMetadata list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return defines the HybridIdentityMetadata along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByVirtualMachineInstanceSinglePageAsync(String resourceUri, Context context) { + private Mono> getWithResponseAsync(String resourceUri, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -145,66 +138,56 @@ Mono> listByVirtualMachineI } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByVirtualMachineInstance(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, context); } /** - * Implements GET HybridIdentityMetadata in a vm. + * Gets HybridIdentityMetadata. * - * Returns the list of HybridIdentityMetadata of the given VM. + * Implements HybridIdentityMetadata GET method. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VmInstanceHybridIdentityMetadata list operation as paginated response with - * {@link PagedFlux}. + * @return defines the HybridIdentityMetadata on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByVirtualMachineInstanceAsync(String resourceUri) { - return new PagedFlux<>(() -> listByVirtualMachineInstanceSinglePageAsync(resourceUri), - nextLink -> listByVirtualMachineInstanceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceUri) { + return getWithResponseAsync(resourceUri).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Implements GET HybridIdentityMetadata in a vm. + * Gets HybridIdentityMetadata. * - * Returns the list of HybridIdentityMetadata of the given VM. + * Implements HybridIdentityMetadata GET method. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VmInstanceHybridIdentityMetadata list operation as paginated response with - * {@link PagedFlux}. + * @return defines the HybridIdentityMetadata along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByVirtualMachineInstanceAsync(String resourceUri, - Context context) { - return new PagedFlux<>(() -> listByVirtualMachineInstanceSinglePageAsync(resourceUri, context), - nextLink -> listByVirtualMachineInstanceNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceUri, Context context) { + return getWithResponseAsync(resourceUri, context).block(); } /** - * Implements GET HybridIdentityMetadata in a vm. + * Gets HybridIdentityMetadata. * - * Returns the list of HybridIdentityMetadata of the given VM. + * Implements HybridIdentityMetadata GET method. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VmInstanceHybridIdentityMetadata list operation as paginated response with - * {@link PagedIterable}. + * @return defines the HybridIdentityMetadata. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByVirtualMachineInstance(String resourceUri) { - return new PagedIterable<>(listByVirtualMachineInstanceAsync(resourceUri)); + @ServiceMethod(returns = ReturnType.SINGLE) + public VmInstanceHybridIdentityMetadataInner get(String resourceUri) { + return getWithResponse(resourceUri, Context.NONE).getValue(); } /** @@ -213,32 +196,15 @@ public PagedIterable listByVirtualMachine * Returns the list of HybridIdentityMetadata of the given VM. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VmInstanceHybridIdentityMetadata list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByVirtualMachineInstance(String resourceUri, - Context context) { - return new PagedIterable<>(listByVirtualMachineInstanceAsync(resourceUri, context)); - } - - /** - * Gets HybridIdentityMetadata. - * - * Implements HybridIdentityMetadata GET method. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a VmInstanceHybridIdentityMetadata list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceUri) { + private Mono> + listByVirtualMachineInstanceSinglePageAsync(String resourceUri) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -248,26 +214,29 @@ private Mono> getWithResponseAsy } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, - accept, context)) + .withContext(context -> service.listByVirtualMachineInstance(this.client.getEndpoint(), + this.client.getApiVersion(), resourceUri, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets HybridIdentityMetadata. + * Implements GET HybridIdentityMetadata in a vm. * - * Implements HybridIdentityMetadata GET method. + * Returns the list of HybridIdentityMetadata of the given VM. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a VmInstanceHybridIdentityMetadata list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceUri, - Context context) { + private Mono> + listByVirtualMachineInstanceSinglePageAsync(String resourceUri, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -277,59 +246,90 @@ private Mono> getWithResponseAsy } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, context); + return service + .listByVirtualMachineInstance(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets HybridIdentityMetadata. + * Implements GET HybridIdentityMetadata in a vm. * - * Implements HybridIdentityMetadata GET method. + * Returns the list of HybridIdentityMetadata of the given VM. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata on successful completion of {@link Mono}. + * @return the response of a VmInstanceHybridIdentityMetadata list operation as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceUri) { - return getWithResponseAsync(resourceUri).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVirtualMachineInstanceAsync(String resourceUri) { + return new PagedFlux<>(() -> listByVirtualMachineInstanceSinglePageAsync(resourceUri), + nextLink -> listByVirtualMachineInstanceNextSinglePageAsync(nextLink)); } /** - * Gets HybridIdentityMetadata. + * Implements GET HybridIdentityMetadata in a vm. * - * Implements HybridIdentityMetadata GET method. + * Returns the list of HybridIdentityMetadata of the given VM. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata along with {@link Response}. + * @return the response of a VmInstanceHybridIdentityMetadata list operation as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceUri, Context context) { - return getWithResponseAsync(resourceUri, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVirtualMachineInstanceAsync(String resourceUri, + Context context) { + return new PagedFlux<>(() -> listByVirtualMachineInstanceSinglePageAsync(resourceUri, context), + nextLink -> listByVirtualMachineInstanceNextSinglePageAsync(nextLink, context)); } /** - * Gets HybridIdentityMetadata. + * Implements GET HybridIdentityMetadata in a vm. * - * Implements HybridIdentityMetadata GET method. + * Returns the list of HybridIdentityMetadata of the given VM. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata. + * @return the response of a VmInstanceHybridIdentityMetadata list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VmInstanceHybridIdentityMetadataInner get(String resourceUri) { - return getWithResponse(resourceUri, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVirtualMachineInstance(String resourceUri) { + return new PagedIterable<>(listByVirtualMachineInstanceAsync(resourceUri)); + } + + /** + * Implements GET HybridIdentityMetadata in a vm. + * + * Returns the list of HybridIdentityMetadata of the given VM. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VmInstanceHybridIdentityMetadata list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVirtualMachineInstance(String resourceUri, + Context context) { + return new PagedIterable<>(listByVirtualMachineInstanceAsync(resourceUri, context)); } /** + * Implements GET HybridIdentityMetadata in a vm. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -358,6 +358,8 @@ public VmInstanceHybridIdentityMetadataInner get(String resourceUri) { } /** + * Implements GET HybridIdentityMetadata in a vm. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmInstanceHybridIdentityMetadatasImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmInstanceHybridIdentityMetadatasImpl.java index 062ae7815934..edb8a405f812 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmInstanceHybridIdentityMetadatasImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmInstanceHybridIdentityMetadatasImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -19,29 +19,14 @@ public final class VmInstanceHybridIdentityMetadatasImpl implements VmInstanceHy private final VmInstanceHybridIdentityMetadatasClient innerClient; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; public VmInstanceHybridIdentityMetadatasImpl(VmInstanceHybridIdentityMetadatasClient innerClient, - com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable listByVirtualMachineInstance(String resourceUri) { - PagedIterable inner - = this.serviceClient().listByVirtualMachineInstance(resourceUri); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new VmInstanceHybridIdentityMetadataImpl(inner1, this.manager())); - } - - public PagedIterable listByVirtualMachineInstance(String resourceUri, - Context context) { - PagedIterable inner - = this.serviceClient().listByVirtualMachineInstance(resourceUri, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new VmInstanceHybridIdentityMetadataImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceUri, Context context) { Response inner = this.serviceClient().getWithResponse(resourceUri, context); @@ -62,11 +47,26 @@ public VmInstanceHybridIdentityMetadata get(String resourceUri) { } } + public PagedIterable listByVirtualMachineInstance(String resourceUri) { + PagedIterable inner + = this.serviceClient().listByVirtualMachineInstance(resourceUri); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new VmInstanceHybridIdentityMetadataImpl(inner1, this.manager())); + } + + public PagedIterable listByVirtualMachineInstance(String resourceUri, + Context context) { + PagedIterable inner + = this.serviceClient().listByVirtualMachineInstance(resourceUri, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new VmInstanceHybridIdentityMetadataImpl(inner1, this.manager())); + } + private VmInstanceHybridIdentityMetadatasClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmmServerImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmmServerImpl.java index 5dea73553f06..794678297c95 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmmServerImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmmServerImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -18,7 +18,7 @@ public final class VmmServerImpl implements VmmServer, VmmServer.Definition, VmmServer.Update { private VmmServerInner innerObject; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; public String id() { return this.innerModel().id(); @@ -73,7 +73,7 @@ public VmmServerInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } @@ -102,7 +102,7 @@ public VmmServer create(Context context) { return this; } - VmmServerImpl(String name, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + VmmServerImpl(String name, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerObject = new VmmServerInner(); this.serviceManager = serviceManager; this.vmmServerName = name; @@ -127,7 +127,7 @@ public VmmServer apply(Context context) { return this; } - VmmServerImpl(VmmServerInner innerObject, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + VmmServerImpl(VmmServerInner innerObject, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmmServersClientImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmmServersClientImpl.java index 1851b8802af9..a21e356658d7 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmmServersClientImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmmServersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -34,8 +34,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.scvmm.fluent.VmmServersClient; import com.azure.resourcemanager.scvmm.fluent.models.VmmServerInner; +import com.azure.resourcemanager.scvmm.implementation.models.VmmServerListResult; import com.azure.resourcemanager.scvmm.models.ForceDelete; -import com.azure.resourcemanager.scvmm.models.VmmServerListResult; import com.azure.resourcemanager.scvmm.models.VmmServerTagsUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -53,110 +53,113 @@ public final class VmmServersClientImpl implements VmmServersClient { /** * The service client containing this operation class. */ - private final ScvmmClientImpl client; + private final ScVmmClientImpl client; /** * Initializes an instance of VmmServersClientImpl. * * @param client the instance of the service client containing this operation class. */ - VmmServersClientImpl(ScvmmClientImpl client) { + VmmServersClientImpl(ScVmmClientImpl client) { this.service = RestProxy.create(VmmServersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ScvmmClientVmmServers to be used by the proxy service to perform REST + * The interface defining all the services for ScVmmClientVmmServers to be used by the proxy service to perform REST * calls. */ - @Host("{$host}") - @ServiceInterface(name = "ScvmmClientVmmServer") + @Host("{endpoint}") + @ServiceInterface(name = "ScVmmClientVmmServer") public interface VmmServersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/vmmServers") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vmmServerName") String vmmServerName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vmmServerName") String vmmServerName, - @BodyParam("application/json") VmmServerInner resource, @HeaderParam("Accept") String accept, + @HeaderParam("accept") String accept, @BodyParam("application/json") VmmServerInner resource, Context context); @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vmmServerName") String vmmServerName, - @BodyParam("application/json") VmmServerTagsUpdate properties, @HeaderParam("Accept") String accept, + @HeaderParam("accept") String accept, @BodyParam("application/json") VmmServerTagsUpdate properties, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("force") ForceDelete force, - @PathParam("vmmServerName") String vmmServerName, @HeaderParam("Accept") String accept, Context context); + @PathParam("vmmServerName") String vmmServerName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/vmmServers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + @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) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** - * Implements GET VmmServers in a subscription. + * Gets a VMMServer. * - * List of VmmServers in a subscription. + * Implements VmmServer GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VmmServer list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the VmmServers resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String vmmServerName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -165,29 +168,36 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vmmServerName == null) { + return Mono.error(new IllegalArgumentException("Parameter vmmServerName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vmmServerName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements GET VmmServers in a subscription. + * Gets a VMMServer. * - * List of VmmServers in a subscription. + * Implements VmmServer GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VmmServer list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the VmmServers resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String vmmServerName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -196,91 +206,89 @@ private Mono> listSinglePageAsync(Context context) return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vmmServerName == null) { + return Mono.error(new IllegalArgumentException("Parameter vmmServerName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vmmServerName, accept, context); } /** - * Implements GET VmmServers in a subscription. + * Gets a VMMServer. * - * List of VmmServers in a subscription. + * Implements VmmServer GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VmmServer list operation as paginated response with {@link PagedFlux}. + * @return the VmmServers resource definition on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String vmmServerName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, vmmServerName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Implements GET VmmServers in a subscription. + * Gets a VMMServer. * - * List of VmmServers in a subscription. + * Implements VmmServer GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VmmServer list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Implements GET VmmServers in a subscription. - * - * List of VmmServers in a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VmmServer list operation as paginated response with {@link PagedIterable}. + * @return the VmmServers resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String vmmServerName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, vmmServerName, context).block(); } /** - * Implements GET VmmServers in a subscription. + * Gets a VMMServer. * - * List of VmmServers in a subscription. + * Implements VmmServer GET method. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VmmServer list operation as paginated response with {@link PagedIterable}. + * @return the VmmServers resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public VmmServerInner getByResourceGroup(String resourceGroupName, String vmmServerName) { + return getByResourceGroupWithResponse(resourceGroupName, vmmServerName, Context.NONE).getValue(); } /** - * Implements GET VmmServers in a resource group. + * Implements VmmServers PUT method. * - * List of VmmServers in a resource group. + * Onboards the SCVmm fabric as an Azure VmmServer resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @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 response of a VmmServer list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the VmmServers resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String vmmServerName, VmmServerInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -293,31 +301,38 @@ private Mono> listByResourceGroupSinglePageAsync(S return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (vmmServerName == null) { + return Mono.error(new IllegalArgumentException("Parameter vmmServerName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vmmServerName, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements GET VmmServers in a resource group. + * Implements VmmServers PUT method. * - * List of VmmServers in a resource group. + * Onboards the SCVmm fabric as an Azure VmmServer resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @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 response of a VmmServer list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the VmmServers resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String vmmServerName, VmmServerInner resource, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -330,227 +345,200 @@ private Mono> listByResourceGroupSinglePageAsync(S return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (vmmServerName == null) { + return Mono.error(new IllegalArgumentException("Parameter vmmServerName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vmmServerName, accept, resource, context); } /** - * Implements GET VmmServers in a resource group. + * Implements VmmServers PUT method. * - * List of VmmServers in a resource group. + * Onboards the SCVmm fabric as an Azure VmmServer resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @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 response of a VmmServer list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of the VmmServers resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VmmServerInner> beginCreateOrUpdateAsync(String resourceGroupName, + String vmmServerName, VmmServerInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, vmmServerName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VmmServerInner.class, VmmServerInner.class, this.client.getContext()); } /** - * Implements GET VmmServers in a resource group. + * Implements VmmServers PUT method. * - * List of VmmServers in a resource group. + * Onboards the SCVmm fabric as an Azure VmmServer resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @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 response of a VmmServer list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of the VmmServers resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VmmServerInner> beginCreateOrUpdateAsync(String resourceGroupName, + String vmmServerName, VmmServerInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, vmmServerName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VmmServerInner.class, VmmServerInner.class, context); } /** - * Implements GET VmmServers in a resource group. + * Implements VmmServers PUT method. * - * List of VmmServers in a resource group. + * Onboards the SCVmm fabric as an Azure VmmServer resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @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 response of a VmmServer list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of the VmmServers resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VmmServerInner> beginCreateOrUpdate(String resourceGroupName, + String vmmServerName, VmmServerInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, vmmServerName, resource).getSyncPoller(); } /** - * Implements GET VmmServers in a resource group. + * Implements VmmServers PUT method. * - * List of VmmServers in a resource group. + * Onboards the SCVmm fabric as an Azure VmmServer resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @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 response of a VmmServer list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of the VmmServers resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VmmServerInner> beginCreateOrUpdate(String resourceGroupName, + String vmmServerName, VmmServerInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, vmmServerName, resource, context).getSyncPoller(); } /** - * Gets a VMMServer. + * Implements VmmServers PUT method. * - * Implements VmmServer GET method. + * Onboards the SCVmm fabric as an Azure VmmServer resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. + * @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 VmmServers resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the VmmServers resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String vmmServerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmmServerName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmmServerName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, vmmServerName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createOrUpdateAsync(String resourceGroupName, String vmmServerName, + VmmServerInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, vmmServerName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a VMMServer. + * Implements VmmServers PUT method. * - * Implements VmmServer GET method. + * Onboards the SCVmm fabric as an Azure VmmServer resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. + * @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 VmmServers resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String vmmServerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vmmServerName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmmServerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, vmmServerName, accept, context); - } - - /** - * Gets a VMMServer. - * - * Implements VmmServer GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the VmmServers resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String vmmServerName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, vmmServerName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, String vmmServerName, + VmmServerInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, vmmServerName, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a VMMServer. + * Implements VmmServers PUT method. * - * Implements VmmServer GET method. + * Onboards the SCVmm fabric as an Azure VmmServer resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param context The context to associate with this operation. + * @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 VmmServers resource definition along with {@link Response}. + * @return the VmmServers resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String vmmServerName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, vmmServerName, context).block(); + public VmmServerInner createOrUpdate(String resourceGroupName, String vmmServerName, VmmServerInner resource) { + return createOrUpdateAsync(resourceGroupName, vmmServerName, resource).block(); } /** - * Gets a VMMServer. + * Implements VmmServers PUT method. * - * Implements VmmServer GET method. + * Onboards the SCVmm fabric as an Azure VmmServer resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. + * @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 VmmServers resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VmmServerInner getByResourceGroup(String resourceGroupName, String vmmServerName) { - return getByResourceGroupWithResponse(resourceGroupName, vmmServerName, Context.NONE).getValue(); + public VmmServerInner createOrUpdate(String resourceGroupName, String vmmServerName, VmmServerInner resource, + Context context) { + return createOrUpdateAsync(resourceGroupName, vmmServerName, resource, context).block(); } /** - * Implements VmmServers PUT method. + * Implements VmmServers PATCH method. * - * Onboards the SCVmm fabric as an Azure VmmServer resource. + * Updates the VmmServers resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param resource Resource create parameters. + * @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 VmmServers resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String vmmServerName, VmmServerInner resource) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String vmmServerName, + VmmServerTagsUpdate properties) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -566,26 +554,26 @@ private Mono>> createOrUpdateWithResponseAsync(String if (vmmServerName == null) { return Mono.error(new IllegalArgumentException("Parameter vmmServerName is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); } else { - resource.validate(); + properties.validate(); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, vmmServerName, resource, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vmmServerName, accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements VmmServers PUT method. + * Implements VmmServers PATCH method. * - * Onboards the SCVmm fabric as an Azure VmmServer resource. + * Updates the VmmServers resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param resource Resource create parameters. + * @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. @@ -593,8 +581,8 @@ private Mono>> createOrUpdateWithResponseAsync(String * @return the VmmServers resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String vmmServerName, VmmServerInner resource, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String vmmServerName, + VmmServerTagsUpdate properties, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -610,47 +598,46 @@ private Mono>> createOrUpdateWithResponseAsync(String if (vmmServerName == null) { return Mono.error(new IllegalArgumentException("Parameter vmmServerName is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); } else { - resource.validate(); + properties.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, vmmServerName, resource, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vmmServerName, accept, properties, context); } /** - * Implements VmmServers PUT method. + * Implements VmmServers PATCH method. * - * Onboards the SCVmm fabric as an Azure VmmServer resource. + * Updates the VmmServers resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param resource Resource create parameters. + * @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 the VmmServers resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VmmServerInner> beginCreateOrUpdateAsync(String resourceGroupName, - String vmmServerName, VmmServerInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, vmmServerName, resource); + private PollerFlux, VmmServerInner> beginUpdateAsync(String resourceGroupName, + String vmmServerName, VmmServerTagsUpdate properties) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, vmmServerName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), VmmServerInner.class, VmmServerInner.class, this.client.getContext()); } /** - * Implements VmmServers PUT method. + * Implements VmmServers PATCH method. * - * Onboards the SCVmm fabric as an Azure VmmServer resource. + * Updates the VmmServers resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param resource Resource create parameters. + * @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. @@ -658,42 +645,42 @@ private PollerFlux, VmmServerInner> beginCreateOrUpda * @return the {@link PollerFlux} for polling of the VmmServers resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VmmServerInner> beginCreateOrUpdateAsync(String resourceGroupName, - String vmmServerName, VmmServerInner resource, Context context) { + private PollerFlux, VmmServerInner> beginUpdateAsync(String resourceGroupName, + String vmmServerName, VmmServerTagsUpdate properties, Context context) { context = this.client.mergeContext(context); Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, vmmServerName, resource, context); + = updateWithResponseAsync(resourceGroupName, vmmServerName, properties, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), VmmServerInner.class, VmmServerInner.class, context); } /** - * Implements VmmServers PUT method. + * Implements VmmServers PATCH method. * - * Onboards the SCVmm fabric as an Azure VmmServer resource. + * Updates the VmmServers resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param resource Resource create parameters. + * @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 the VmmServers resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VmmServerInner> beginCreateOrUpdate(String resourceGroupName, - String vmmServerName, VmmServerInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, vmmServerName, resource).getSyncPoller(); + public SyncPoller, VmmServerInner> beginUpdate(String resourceGroupName, + String vmmServerName, VmmServerTagsUpdate properties) { + return this.beginUpdateAsync(resourceGroupName, vmmServerName, properties).getSyncPoller(); } /** - * Implements VmmServers PUT method. + * Implements VmmServers PATCH method. * - * Onboards the SCVmm fabric as an Azure VmmServer resource. + * Updates the VmmServers resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param resource Resource create parameters. + * @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. @@ -701,39 +688,39 @@ public SyncPoller, VmmServerInner> beginCreateOrUpdat * @return the {@link SyncPoller} for polling of the VmmServers resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VmmServerInner> beginCreateOrUpdate(String resourceGroupName, - String vmmServerName, VmmServerInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, vmmServerName, resource, context).getSyncPoller(); + public SyncPoller, VmmServerInner> beginUpdate(String resourceGroupName, + String vmmServerName, VmmServerTagsUpdate properties, Context context) { + return this.beginUpdateAsync(resourceGroupName, vmmServerName, properties, context).getSyncPoller(); } /** - * Implements VmmServers PUT method. + * Implements VmmServers PATCH method. * - * Onboards the SCVmm fabric as an Azure VmmServer resource. + * Updates the VmmServers resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param resource Resource create parameters. + * @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 VmmServers resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String vmmServerName, - VmmServerInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, vmmServerName, resource).last() + private Mono updateAsync(String resourceGroupName, String vmmServerName, + VmmServerTagsUpdate properties) { + return beginUpdateAsync(resourceGroupName, vmmServerName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements VmmServers PUT method. + * Implements VmmServers PATCH method. * - * Onboards the SCVmm fabric as an Azure VmmServer resource. + * Updates the VmmServers resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param resource Resource create parameters. + * @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. @@ -741,38 +728,38 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin * @return the VmmServers resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String vmmServerName, - VmmServerInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, vmmServerName, resource, context).last() + private Mono updateAsync(String resourceGroupName, String vmmServerName, + VmmServerTagsUpdate properties, Context context) { + return beginUpdateAsync(resourceGroupName, vmmServerName, properties, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements VmmServers PUT method. + * Implements VmmServers PATCH method. * - * Onboards the SCVmm fabric as an Azure VmmServer resource. + * Updates the VmmServers resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param resource Resource create parameters. + * @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 VmmServers resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VmmServerInner createOrUpdate(String resourceGroupName, String vmmServerName, VmmServerInner resource) { - return createOrUpdateAsync(resourceGroupName, vmmServerName, resource).block(); + public VmmServerInner update(String resourceGroupName, String vmmServerName, VmmServerTagsUpdate properties) { + return updateAsync(resourceGroupName, vmmServerName, properties).block(); } /** - * Implements VmmServers PUT method. + * Implements VmmServers PATCH method. * - * Onboards the SCVmm fabric as an Azure VmmServer resource. + * Updates the VmmServers resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param resource Resource create parameters. + * @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. @@ -780,27 +767,27 @@ public VmmServerInner createOrUpdate(String resourceGroupName, String vmmServerN * @return the VmmServers resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VmmServerInner createOrUpdate(String resourceGroupName, String vmmServerName, VmmServerInner resource, + public VmmServerInner update(String resourceGroupName, String vmmServerName, VmmServerTagsUpdate properties, Context context) { - return createOrUpdateAsync(resourceGroupName, vmmServerName, resource, context).block(); + return updateAsync(resourceGroupName, vmmServerName, properties, context).block(); } /** - * Implements VmmServers PATCH method. + * Implements VmmServers DELETE method. * - * Updates the VmmServers resource. + * Removes the SCVmm fabric from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VmmServers resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String vmmServerName, - VmmServerTagsUpdate properties) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String vmmServerName, + ForceDelete force) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -816,35 +803,30 @@ private Mono>> updateWithResponseAsync(String resource if (vmmServerName == null) { return Mono.error(new IllegalArgumentException("Parameter vmmServerName is required and cannot be null.")); } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, vmmServerName, properties, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, force, vmmServerName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements VmmServers PATCH method. + * Implements VmmServers DELETE method. * - * Updates the VmmServers resource. + * Removes the SCVmm fabric from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VmmServers resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String vmmServerName, - VmmServerTagsUpdate properties, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String vmmServerName, + ForceDelete force, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -860,178 +842,188 @@ private Mono>> updateWithResponseAsync(String resource if (vmmServerName == null) { return Mono.error(new IllegalArgumentException("Parameter vmmServerName is required and cannot be null.")); } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, vmmServerName, properties, accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, force, vmmServerName, accept, context); } /** - * Implements VmmServers PATCH method. + * Implements VmmServers DELETE method. * - * Updates the VmmServers resource. + * Removes the SCVmm fabric from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the VmmServers resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VmmServerInner> beginUpdateAsync(String resourceGroupName, - String vmmServerName, VmmServerTagsUpdate properties) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, vmmServerName, properties); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VmmServerInner.class, VmmServerInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String vmmServerName, + ForceDelete force) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, vmmServerName, force); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Implements VmmServers PATCH method. + * Implements VmmServers DELETE method. * - * Updates the VmmServers resource. + * Removes the SCVmm fabric from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String vmmServerName) { + final ForceDelete force = null; + Mono>> mono = deleteWithResponseAsync(resourceGroupName, vmmServerName, force); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Implements VmmServers DELETE method. + * + * Removes the SCVmm fabric from Azure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the VmmServers resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VmmServerInner> beginUpdateAsync(String resourceGroupName, - String vmmServerName, VmmServerTagsUpdate properties, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String vmmServerName, + ForceDelete force, Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateWithResponseAsync(resourceGroupName, vmmServerName, properties, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VmmServerInner.class, VmmServerInner.class, context); + = deleteWithResponseAsync(resourceGroupName, vmmServerName, force, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Implements VmmServers PATCH method. + * Implements VmmServers DELETE method. * - * Updates the VmmServers resource. + * Removes the SCVmm fabric from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @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 the VmmServers resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VmmServerInner> beginUpdate(String resourceGroupName, - String vmmServerName, VmmServerTagsUpdate properties) { - return this.beginUpdateAsync(resourceGroupName, vmmServerName, properties).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String vmmServerName) { + final ForceDelete force = null; + return this.beginDeleteAsync(resourceGroupName, vmmServerName, force).getSyncPoller(); } /** - * Implements VmmServers PATCH method. + * Implements VmmServers DELETE method. * - * Updates the VmmServers resource. + * Removes the SCVmm fabric from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the VmmServers resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VmmServerInner> beginUpdate(String resourceGroupName, - String vmmServerName, VmmServerTagsUpdate properties, Context context) { - return this.beginUpdateAsync(resourceGroupName, vmmServerName, properties, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String vmmServerName, + ForceDelete force, Context context) { + return this.beginDeleteAsync(resourceGroupName, vmmServerName, force, context).getSyncPoller(); } /** - * Implements VmmServers PATCH method. + * Implements VmmServers DELETE method. * - * Updates the VmmServers resource. + * Removes the SCVmm fabric from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VmmServers resource definition on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String vmmServerName, - VmmServerTagsUpdate properties) { - return beginUpdateAsync(resourceGroupName, vmmServerName, properties).last() + private Mono deleteAsync(String resourceGroupName, String vmmServerName, ForceDelete force) { + return beginDeleteAsync(resourceGroupName, vmmServerName, force).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements VmmServers PATCH method. + * Implements VmmServers DELETE method. * - * Updates the VmmServers resource. + * Removes the SCVmm fabric from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @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 VmmServers resource definition on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String vmmServerName, - VmmServerTagsUpdate properties, Context context) { - return beginUpdateAsync(resourceGroupName, vmmServerName, properties, context).last() + private Mono deleteAsync(String resourceGroupName, String vmmServerName) { + final ForceDelete force = null; + return beginDeleteAsync(resourceGroupName, vmmServerName, force).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements VmmServers PATCH method. + * Implements VmmServers DELETE method. * - * Updates the VmmServers resource. + * Removes the SCVmm fabric from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @param properties The resource properties to be updated. + * @param force Forces the resource to be deleted. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VmmServers resource definition. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VmmServerInner update(String resourceGroupName, String vmmServerName, VmmServerTagsUpdate properties) { - return updateAsync(resourceGroupName, vmmServerName, properties).block(); + private Mono deleteAsync(String resourceGroupName, String vmmServerName, ForceDelete force, Context context) { + return beginDeleteAsync(resourceGroupName, vmmServerName, force, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements VmmServers PATCH method. + * Implements VmmServers DELETE method. * - * Updates the VmmServers resource. + * Removes the SCVmm fabric from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. - * @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 VmmServers resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VmmServerInner update(String resourceGroupName, String vmmServerName, VmmServerTagsUpdate properties, - Context context) { - return updateAsync(resourceGroupName, vmmServerName, properties, context).block(); + public void delete(String resourceGroupName, String vmmServerName) { + final ForceDelete force = null; + deleteAsync(resourceGroupName, vmmServerName, force).block(); } /** @@ -1042,14 +1034,30 @@ public VmmServerInner update(String resourceGroupName, String vmmServerName, Vmm * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vmmServerName Name of the VmmServer. * @param force Forces the resource to be deleted. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 vmmServerName, - ForceDelete force) { + public void delete(String resourceGroupName, String vmmServerName, ForceDelete force, Context context) { + deleteAsync(resourceGroupName, vmmServerName, force, context).block(); + } + + /** + * Implements GET VmmServers in a resource group. + * + * List of VmmServers in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VmmServer list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1062,33 +1070,31 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (vmmServerName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmmServerName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, force, vmmServerName, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements VmmServers DELETE method. + * Implements GET VmmServers in a resource group. * - * Removes the SCVmm fabric from Azure. + * List of VmmServers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a VmmServer list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String vmmServerName, - ForceDelete force, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1101,212 +1107,208 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (vmmServerName == null) { - return Mono.error(new IllegalArgumentException("Parameter vmmServerName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, force, vmmServerName, accept, context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Implements VmmServers DELETE method. + * Implements GET VmmServers in a resource group. * - * Removes the SCVmm fabric from Azure. + * List of VmmServers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param force Forces the resource to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a VmmServer list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String vmmServerName, - ForceDelete force) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, vmmServerName, force); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Implements VmmServers DELETE method. + * Implements GET VmmServers in a resource group. * - * Removes the SCVmm fabric from Azure. + * List of VmmServers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a VmmServer list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String vmmServerName) { - final ForceDelete force = null; - Mono>> mono = deleteWithResponseAsync(resourceGroupName, vmmServerName, force); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Implements VmmServers DELETE method. + * Implements GET VmmServers in a resource group. * - * Removes the SCVmm fabric from Azure. + * List of VmmServers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param force Forces the resource to be deleted. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a VmmServer list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String vmmServerName, - ForceDelete force, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, vmmServerName, force, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } /** - * Implements VmmServers DELETE method. + * Implements GET VmmServers in a resource group. * - * Removes the SCVmm fabric from Azure. + * List of VmmServers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a VmmServer list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String vmmServerName) { - final ForceDelete force = null; - return this.beginDeleteAsync(resourceGroupName, vmmServerName, force).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** - * Implements VmmServers DELETE method. + * Implements GET VmmServers in a subscription. * - * Removes the SCVmm fabric from Azure. + * List of VmmServers in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param force Forces the resource to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response of a VmmServer list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String vmmServerName, - ForceDelete force, Context context) { - return this.beginDeleteAsync(resourceGroupName, vmmServerName, force, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements VmmServers DELETE method. + * Implements GET VmmServers in a subscription. * - * Removes the SCVmm fabric from Azure. + * List of VmmServers in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param force Forces the resource to be deleted. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a VmmServer list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String vmmServerName, ForceDelete force) { - return beginDeleteAsync(resourceGroupName, vmmServerName, force).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Implements VmmServers DELETE method. + * Implements GET VmmServers in a subscription. * - * Removes the SCVmm fabric from Azure. + * List of VmmServers in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a VmmServer list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String vmmServerName) { - final ForceDelete force = null; - return beginDeleteAsync(resourceGroupName, vmmServerName, force).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Implements VmmServers DELETE method. + * Implements GET VmmServers in a subscription. * - * Removes the SCVmm fabric from Azure. + * List of VmmServers in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a VmmServer list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String vmmServerName, ForceDelete force, Context context) { - return beginDeleteAsync(resourceGroupName, vmmServerName, force, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** - * Implements VmmServers DELETE method. + * Implements GET VmmServers in a subscription. * - * Removes the SCVmm fabric from Azure. + * List of VmmServers in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VmmServer list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String vmmServerName) { - final ForceDelete force = null; - deleteAsync(resourceGroupName, vmmServerName, force).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); } /** - * Implements VmmServers DELETE method. + * Implements GET VmmServers in a subscription. * - * Removes the SCVmm fabric from Azure. + * List of VmmServers in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VmmServer list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String vmmServerName, ForceDelete force, Context context) { - deleteAsync(resourceGroupName, vmmServerName, force, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** + * Implements GET VmmServers in a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1317,7 +1319,7 @@ public void delete(String resourceGroupName, String vmmServerName, ForceDelete f * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1328,13 +1330,15 @@ private Mono> listBySubscriptionNextSinglePageAsyn final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * Implements GET VmmServers in a resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1346,7 +1350,7 @@ private Mono> listBySubscriptionNextSinglePageAsyn * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1357,12 +1361,14 @@ private Mono> listBySubscriptionNextSinglePageAsyn } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** + * Implements GET VmmServers in a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1373,7 +1379,7 @@ private Mono> listBySubscriptionNextSinglePageAsyn * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1384,13 +1390,15 @@ private Mono> listByResourceGroupNextSinglePageAsy final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * Implements GET VmmServers in a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1402,7 +1410,7 @@ private Mono> listByResourceGroupNextSinglePageAsy * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1413,7 +1421,7 @@ private Mono> listByResourceGroupNextSinglePageAsy } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmmServersImpl.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmmServersImpl.java index 66a829f3783c..026e27f5adc6 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmmServersImpl.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/VmmServersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.implementation; @@ -20,33 +20,13 @@ public final class VmmServersImpl implements VmmServers { private final VmmServersClient innerClient; - private final com.azure.resourcemanager.scvmm.ScvmmManager serviceManager; + private final com.azure.resourcemanager.scvmm.SCVMMManager serviceManager; - public VmmServersImpl(VmmServersClient innerClient, com.azure.resourcemanager.scvmm.ScvmmManager serviceManager) { + public VmmServersImpl(VmmServersClient innerClient, com.azure.resourcemanager.scvmm.SCVMMManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VmmServerImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VmmServerImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VmmServerImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VmmServerImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String vmmServerName, Context context) { Response inner @@ -76,6 +56,26 @@ public void delete(String resourceGroupName, String vmmServerName, ForceDelete f this.serviceClient().delete(resourceGroupName, vmmServerName, force, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VmmServerImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VmmServerImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VmmServerImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VmmServerImpl(inner1, this.manager())); + } + public VmmServer getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -137,7 +137,7 @@ private VmmServersClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.scvmm.ScvmmManager manager() { + private com.azure.resourcemanager.scvmm.SCVMMManager manager() { return this.serviceManager; } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySetListResult.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/AvailabilitySetListResult.java similarity index 96% rename from sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySetListResult.java rename to sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/AvailabilitySetListResult.java index ab297c795f82..102d6ca679eb 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySetListResult.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/AvailabilitySetListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.scvmm.models; +package com.azure.resourcemanager.scvmm.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudListResult.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/CloudListResult.java similarity index 96% rename from sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudListResult.java rename to sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/CloudListResult.java index 76b40f67fe14..26edfa064250 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudListResult.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/CloudListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.scvmm.models; +package com.azure.resourcemanager.scvmm.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestAgentListResult.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/GuestAgentListResult.java similarity index 96% rename from sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestAgentListResult.java rename to sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/GuestAgentListResult.java index 41b5281bbc8e..d0cac50073b4 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestAgentListResult.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/GuestAgentListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.scvmm.models; +package com.azure.resourcemanager.scvmm.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItemListResult.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/InventoryItemListResult.java similarity index 96% rename from sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItemListResult.java rename to sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/InventoryItemListResult.java index 42487c52d435..16889176e66b 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItemListResult.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/InventoryItemListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.scvmm.models; +package com.azure.resourcemanager.scvmm.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/OperationListResult.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/OperationListResult.java similarity index 76% rename from sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/OperationListResult.java rename to sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/OperationListResult.java index 56c15ff6955c..259987b6160c 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/OperationListResult.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/OperationListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.scvmm.models; +package com.azure.resourcemanager.scvmm.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,12 +21,12 @@ @Immutable public final class OperationListResult implements JsonSerializable { /* - * List of operations supported by the resource provider + * The Operation items on this page */ private List value; /* - * URL to get the next set of operation list results (if there are any). + * The link to the next page of items */ private String nextLink; @@ -36,7 +37,7 @@ private OperationListResult() { } /** - * Get the value property: List of operations supported by the resource provider. + * Get the value property: The Operation items on this page. * * @return the value value. */ @@ -45,7 +46,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -59,17 +60,23 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model OperationListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(OperationListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -79,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OperationListResult 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 OperationListResult. */ public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineInstanceListResult.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/VirtualMachineInstanceListResult.java similarity index 96% rename from sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineInstanceListResult.java rename to sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/VirtualMachineInstanceListResult.java index f235f2dab277..8bdeba76964d 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineInstanceListResult.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/VirtualMachineInstanceListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.scvmm.models; +package com.azure.resourcemanager.scvmm.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplateListResult.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/VirtualMachineTemplateListResult.java similarity index 96% rename from sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplateListResult.java rename to sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/VirtualMachineTemplateListResult.java index 4c1563c2eba8..25aacef42365 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplateListResult.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/VirtualMachineTemplateListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.scvmm.models; +package com.azure.resourcemanager.scvmm.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworkListResult.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/VirtualNetworkListResult.java similarity index 96% rename from sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworkListResult.java rename to sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/VirtualNetworkListResult.java index b70a218b151b..b742aca55089 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworkListResult.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/VirtualNetworkListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.scvmm.models; +package com.azure.resourcemanager.scvmm.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmInstanceHybridIdentityMetadataListResult.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/VmInstanceHybridIdentityMetadataListResult.java similarity index 97% rename from sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmInstanceHybridIdentityMetadataListResult.java rename to sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/VmInstanceHybridIdentityMetadataListResult.java index 8476d7ef2122..1ffb574ac668 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmInstanceHybridIdentityMetadataListResult.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/VmInstanceHybridIdentityMetadataListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.scvmm.models; +package com.azure.resourcemanager.scvmm.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServerListResult.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/VmmServerListResult.java similarity index 96% rename from sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServerListResult.java rename to sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/VmmServerListResult.java index 7b48184be56f..9f6a2b3d9596 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServerListResult.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/models/VmmServerListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.scvmm.models; +package com.azure.resourcemanager.scvmm.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/package-info.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/package-info.java index 5edf353caba8..97a80d35eb09 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/package-info.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/implementation/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for ScvmmClient. - * SCVMM Client. + * Package containing the implementations for SCVMM. + * The Microsoft.ScVmm Rest API spec. */ package com.azure.resourcemanager.scvmm.implementation; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ActionType.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ActionType.java index 27b4d427adc1..105580902abf 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ActionType.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ public final class ActionType extends ExpandableStringEnum { /** diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AllocationMethod.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AllocationMethod.java index eccdce555d3b..3e0b9766eebf 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AllocationMethod.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AllocationMethod.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySet.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySet.java index 97d424d842cb..9d016f0e110b 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySet.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySet.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySetListItem.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySetListItem.java index 33f227463369..e4b516e29f23 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySetListItem.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySetListItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySetProperties.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySetProperties.java index 828ca8cf7bb6..32880df5878a 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySetProperties.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySetProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySetTagsUpdate.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySetTagsUpdate.java index fe7a3b3e7726..3978e6593525 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySetTagsUpdate.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySetTagsUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySets.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySets.java index 79118d03837c..ee82df674917 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySets.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/AvailabilitySets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; @@ -13,113 +13,113 @@ */ public interface AvailabilitySets { /** - * Implements GET AvailabilitySets in a subscription. + * Gets an AvailabilitySet. * - * List of AvailabilitySets in a subscription. + * Implements AvailabilitySet GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 AvailabilitySet list operation as paginated response with {@link PagedIterable}. + * @return the AvailabilitySets resource definition along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, + String availabilitySetResourceName, Context context); /** - * Implements GET AvailabilitySets in a subscription. + * Gets an AvailabilitySet. * - * List of AvailabilitySets in a subscription. + * Implements AvailabilitySet GET method. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 AvailabilitySet list operation as paginated response with {@link PagedIterable}. + * @return the AvailabilitySets resource definition. */ - PagedIterable list(Context context); + AvailabilitySet getByResourceGroup(String resourceGroupName, String availabilitySetResourceName); /** - * Implements GET AvailabilitySets in a resource group. + * Implements AvailabilitySet DELETE method. * - * List of AvailabilitySets in a resource group. + * Deregisters the ScVmm availability set from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 AvailabilitySet list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void delete(String resourceGroupName, String availabilitySetResourceName); /** - * Implements GET AvailabilitySets in a resource group. + * Implements AvailabilitySet DELETE method. * - * List of AvailabilitySets in a resource group. + * Deregisters the ScVmm availability set from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param availabilitySetResourceName Name of the AvailabilitySet. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 AvailabilitySet list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + void delete(String resourceGroupName, String availabilitySetResourceName, ForceDelete force, Context context); /** - * Gets an AvailabilitySet. + * Implements GET AvailabilitySets in a resource group. * - * Implements AvailabilitySet GET method. + * List of AvailabilitySets in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AvailabilitySets resource definition along with {@link Response}. + * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, - String availabilitySetResourceName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets an AvailabilitySet. + * Implements GET AvailabilitySets in a resource group. * - * Implements AvailabilitySet GET method. + * List of AvailabilitySets in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AvailabilitySets resource definition. + * @return the response of a AvailabilitySet list operation as paginated response with {@link PagedIterable}. */ - AvailabilitySet getByResourceGroup(String resourceGroupName, String availabilitySetResourceName); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Implements AvailabilitySet DELETE method. + * Implements GET AvailabilitySets in a subscription. * - * Deregisters the ScVmm availability set from Azure. + * List of AvailabilitySets in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 AvailabilitySet list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String availabilitySetResourceName); + PagedIterable list(); /** - * Implements AvailabilitySet DELETE method. + * Implements GET AvailabilitySets in a subscription. * - * Deregisters the ScVmm availability set from Azure. + * List of AvailabilitySets in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param availabilitySetResourceName Name of the AvailabilitySet. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 AvailabilitySet list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String availabilitySetResourceName, ForceDelete force, Context context); + PagedIterable list(Context context); /** * Gets an AvailabilitySet. diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Checkpoint.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Checkpoint.java index 1801586a6c30..f0dad5e8a531 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Checkpoint.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Checkpoint.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Defines the resource properties. */ -@Fluent +@Immutable public final class Checkpoint implements JsonSerializable { /* * Gets ID of parent of the checkpoint. @@ -39,7 +39,7 @@ public final class Checkpoint implements JsonSerializable { /** * Creates an instance of Checkpoint class. */ - public Checkpoint() { + private Checkpoint() { } /** @@ -51,17 +51,6 @@ public String parentCheckpointId() { return this.parentCheckpointId; } - /** - * Set the parentCheckpointId property: Gets ID of parent of the checkpoint. - * - * @param parentCheckpointId the parentCheckpointId value to set. - * @return the Checkpoint object itself. - */ - public Checkpoint withParentCheckpointId(String parentCheckpointId) { - this.parentCheckpointId = parentCheckpointId; - return this; - } - /** * Get the checkpointId property: Gets ID of the checkpoint. * @@ -71,17 +60,6 @@ public String checkpointId() { return this.checkpointId; } - /** - * Set the checkpointId property: Gets ID of the checkpoint. - * - * @param checkpointId the checkpointId value to set. - * @return the Checkpoint object itself. - */ - public Checkpoint withCheckpointId(String checkpointId) { - this.checkpointId = checkpointId; - return this; - } - /** * Get the name property: Gets name of the checkpoint. * @@ -91,17 +69,6 @@ public String name() { return this.name; } - /** - * Set the name property: Gets name of the checkpoint. - * - * @param name the name value to set. - * @return the Checkpoint object itself. - */ - public Checkpoint withName(String name) { - this.name = name; - return this; - } - /** * Get the description property: Gets description of the checkpoint. * @@ -111,17 +78,6 @@ public String description() { return this.description; } - /** - * Set the description property: Gets description of the checkpoint. - * - * @param description the description value to set. - * @return the Checkpoint object itself. - */ - public Checkpoint withDescription(String description) { - this.description = description; - return this; - } - /** * Validates the instance. * diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Cloud.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Cloud.java index b6e61833d81a..d1a57a66f5b3 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Cloud.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Cloud.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudCapacity.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudCapacity.java index 128a3a6b87c9..4e9e0267ed88 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudCapacity.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudCapacity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; @@ -34,7 +34,7 @@ public final class CloudCapacity implements JsonSerializable { /** * Creates an instance of CloudCapacity class. */ - public CloudCapacity() { + private CloudCapacity() { } /** diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudInventoryItem.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudInventoryItem.java index 7ab5536c3aec..33cadda8c3cf 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudInventoryItem.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudInventoryItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudProperties.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudProperties.java index d81e1ae3f6c6..d6ca7aa819c4 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudProperties.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudTagsUpdate.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudTagsUpdate.java index 1abdcf5c1260..cc1ec5a21ed1 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudTagsUpdate.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CloudTagsUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Clouds.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Clouds.java index f7143ed0238d..301dea24e884 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Clouds.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Clouds.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; @@ -13,112 +13,112 @@ */ public interface Clouds { /** - * Implements GET Clouds in a subscription. + * Gets a Cloud. * - * List of Clouds in a subscription. + * Implements Cloud GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 Cloud list operation as paginated response with {@link PagedIterable}. + * @return the Clouds resource definition along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String cloudResourceName, Context context); /** - * Implements GET Clouds in a subscription. + * Gets a Cloud. * - * List of Clouds in a subscription. + * Implements Cloud GET method. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 Cloud list operation as paginated response with {@link PagedIterable}. + * @return the Clouds resource definition. */ - PagedIterable list(Context context); + Cloud getByResourceGroup(String resourceGroupName, String cloudResourceName); /** - * Implements GET Clouds in a resource group. + * Implements Cloud resource DELETE method. * - * List of Clouds in a resource group. + * Deregisters the ScVmm fabric cloud from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 Cloud list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void delete(String resourceGroupName, String cloudResourceName); /** - * Implements GET Clouds in a resource group. + * Implements Cloud resource DELETE method. * - * List of Clouds in a resource group. + * Deregisters the ScVmm fabric cloud from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudResourceName Name of the Cloud. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 Cloud list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + void delete(String resourceGroupName, String cloudResourceName, ForceDelete force, Context context); /** - * Gets a Cloud. + * Implements GET Clouds in a resource group. * - * Implements Cloud GET method. + * List of Clouds in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Clouds resource definition along with {@link Response}. + * @return the response of a Cloud list operation as paginated response with {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String cloudResourceName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets a Cloud. + * Implements GET Clouds in a resource group. * - * Implements Cloud GET method. + * List of Clouds in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Clouds resource definition. + * @return the response of a Cloud list operation as paginated response with {@link PagedIterable}. */ - Cloud getByResourceGroup(String resourceGroupName, String cloudResourceName); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Implements Cloud resource DELETE method. + * Implements GET Clouds in a subscription. * - * Deregisters the ScVmm fabric cloud from Azure. + * List of Clouds in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 Cloud list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String cloudResourceName); + PagedIterable list(); /** - * Implements Cloud resource DELETE method. + * Implements GET Clouds in a subscription. * - * Deregisters the ScVmm fabric cloud from Azure. + * List of Clouds in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudResourceName Name of the Cloud. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 Cloud list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String cloudResourceName, ForceDelete force, Context context); + PagedIterable list(Context context); /** * Gets a Cloud. diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CreateDiffDisk.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CreateDiffDisk.java index 33f0506d4f7f..429ebb545581 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CreateDiffDisk.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/CreateDiffDisk.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/DeleteFromHost.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/DeleteFromHost.java index cbe0d382c817..d9cda2b682cb 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/DeleteFromHost.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/DeleteFromHost.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for DeleteFromHost. + * Delete From Host. */ public final class DeleteFromHost extends ExpandableStringEnum { /** diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/DynamicMemoryEnabled.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/DynamicMemoryEnabled.java index 3d331dbac7b2..1195ab15ac4f 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/DynamicMemoryEnabled.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/DynamicMemoryEnabled.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ExtendedLocation.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ExtendedLocation.java index d9274a91889e..33ab1b8980e0 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ExtendedLocation.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ExtendedLocation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ExtensionResource.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ExtensionResource.java new file mode 100644 index 000000000000..3636953c7e49 --- /dev/null +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ExtensionResource.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.scvmm.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The base extension resource. + */ +@Immutable +public class ExtensionResource extends ProxyResource { + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + + /** + * Creates an instance of ExtensionResource class. + */ + public ExtensionResource() { + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Set the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @param systemData the systemData value to set. + * @return the ExtensionResource object itself. + */ + ExtensionResource withSystemData(SystemData systemData) { + this.systemData = systemData; + return this; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExtensionResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExtensionResource 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 ExtensionResource. + */ + public static ExtensionResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExtensionResource deserializedExtensionResource = new ExtensionResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedExtensionResource.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedExtensionResource.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedExtensionResource.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedExtensionResource.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExtensionResource; + }); + } +} diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ForceDelete.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ForceDelete.java index bfc03be49ada..5c82bcd113fe 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ForceDelete.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ForceDelete.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for ForceDelete. + * Force Delete. */ public final class ForceDelete extends ExpandableStringEnum { /** diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestAgent.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestAgent.java index 2e600cacb0b9..3871b4928697 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestAgent.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestAgent.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestAgentProperties.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestAgentProperties.java index 170c9bf544f8..f301c756e6e6 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestAgentProperties.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestAgentProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestAgents.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestAgents.java index 1373e1f366db..52d5f7776d24 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestAgents.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestAgents.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; @@ -13,33 +13,6 @@ * Resource collection API of GuestAgents. */ public interface GuestAgents { - /** - * Implements GET GuestAgent in a vm. - * - * Returns the list of GuestAgent of the given vm. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GuestAgent list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByVirtualMachineInstance(String resourceUri); - - /** - * Implements GET GuestAgent in a vm. - * - * Returns the list of GuestAgent of the given vm. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GuestAgent list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByVirtualMachineInstance(String resourceUri, Context context); - /** * Gets GuestAgent. * @@ -121,4 +94,31 @@ public interface GuestAgents { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceUri); + + /** + * Implements GET GuestAgent in a vm. + * + * Returns the list of GuestAgent of the given vm. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GuestAgent list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVirtualMachineInstance(String resourceUri); + + /** + * Implements GET GuestAgent in a vm. + * + * Returns the list of GuestAgent of the given vm. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GuestAgent list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVirtualMachineInstance(String resourceUri, Context context); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestCredential.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestCredential.java index 34b554891520..030fdf157f35 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestCredential.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/GuestCredential.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/HardwareProfile.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/HardwareProfile.java index ac7c6efe5234..01d2f2a4b679 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/HardwareProfile.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/HardwareProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/HardwareProfileUpdate.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/HardwareProfileUpdate.java index 1af85f6311be..f19e84b61336 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/HardwareProfileUpdate.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/HardwareProfileUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/HttpProxyConfiguration.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/HttpProxyConfiguration.java index 248378bbb6e4..0370b2a244cd 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/HttpProxyConfiguration.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/HttpProxyConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InfrastructureProfile.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InfrastructureProfile.java index af81e92cd7e6..f5485677852b 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InfrastructureProfile.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InfrastructureProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InfrastructureProfileUpdate.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InfrastructureProfileUpdate.java index 777db7587720..e4ce3cf41c3e 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InfrastructureProfileUpdate.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InfrastructureProfileUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItem.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItem.java index 0506f1e2a251..5e323f532fbf 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItem.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItemDetails.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItemDetails.java index 50e3df48b05a..d8c2c7176d3a 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItemDetails.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItemDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItemProperties.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItemProperties.java index 8025f703525f..e7cb09d38cf8 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItemProperties.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItemProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; @@ -180,12 +180,12 @@ public static InventoryItemProperties fromJson(JsonReader jsonReader) throws IOE // Use the discriminator value to determine which subtype should be deserialized. if ("Cloud".equals(discriminatorValue)) { return CloudInventoryItem.fromJson(readerToUse.reset()); - } else if ("VirtualMachine".equals(discriminatorValue)) { - return VirtualMachineInventoryItem.fromJson(readerToUse.reset()); - } else if ("VirtualMachineTemplate".equals(discriminatorValue)) { - return VirtualMachineTemplateInventoryItem.fromJson(readerToUse.reset()); } else if ("VirtualNetwork".equals(discriminatorValue)) { return VirtualNetworkInventoryItem.fromJson(readerToUse.reset()); + } else if ("VirtualMachineTemplate".equals(discriminatorValue)) { + return VirtualMachineTemplateInventoryItem.fromJson(readerToUse.reset()); + } else if ("VirtualMachine".equals(discriminatorValue)) { + return VirtualMachineInventoryItem.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItems.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItems.java index 2c5871ed8446..4cdf8f686001 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItems.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryItems.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; @@ -12,35 +12,6 @@ * Resource collection API of InventoryItems. */ public interface InventoryItems { - /** - * Implements GET for the list of Inventory Items in the VMMServer. - * - * Returns the list of inventoryItems in the given VmmServer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 InventoryItem list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByVmmServer(String resourceGroupName, String vmmServerName); - - /** - * Implements GET for the list of Inventory Items in the VMMServer. - * - * Returns the list of inventoryItems in the given VmmServer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 InventoryItem list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByVmmServer(String resourceGroupName, String vmmServerName, Context context); - /** * Implements GET InventoryItem method. * @@ -104,6 +75,35 @@ Response deleteWithResponse(String resourceGroupName, String vmmServerName */ void delete(String resourceGroupName, String vmmServerName, String inventoryItemResourceName); + /** + * Implements GET for the list of Inventory Items in the VMMServer. + * + * Returns the list of inventoryItems in the given VmmServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 InventoryItem list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVmmServer(String resourceGroupName, String vmmServerName); + + /** + * Implements GET for the list of Inventory Items in the VMMServer. + * + * Returns the list of inventoryItems in the given VmmServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 InventoryItem list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVmmServer(String resourceGroupName, String vmmServerName, Context context); + /** * Implements GET InventoryItem method. * diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryType.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryType.java index c6a139997f81..b8f6a204b848 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryType.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/InventoryType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/IsCustomizable.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/IsCustomizable.java index 5db4162a571c..8bbc61896a74 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/IsCustomizable.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/IsCustomizable.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/IsHighlyAvailable.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/IsHighlyAvailable.java index 89631058ed71..fe49b25aa61e 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/IsHighlyAvailable.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/IsHighlyAvailable.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/LimitCpuForMigration.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/LimitCpuForMigration.java index a85bdc9aa826..8153c04b4b95 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/LimitCpuForMigration.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/LimitCpuForMigration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/NetworkInterface.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/NetworkInterface.java index d8cad3f13a7e..88eae4ba68da 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/NetworkInterface.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/NetworkInterface.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/NetworkInterfaceUpdate.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/NetworkInterfaceUpdate.java index 80f94a24b61c..b96eb132a18e 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/NetworkInterfaceUpdate.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/NetworkInterfaceUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/NetworkProfile.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/NetworkProfile.java index 18e9e631a12b..ebc7bf812417 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/NetworkProfile.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/NetworkProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/NetworkProfileUpdate.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/NetworkProfileUpdate.java index 276fe1ab669a..b3a04c228f6e 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/NetworkProfileUpdate.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/NetworkProfileUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Operation.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Operation.java index 0f7143c2f090..7cedb74fb0ca 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Operation.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Operation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; @@ -20,7 +20,7 @@ public interface Operation { /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ @@ -42,8 +42,8 @@ public interface Operation { Origin origin(); /** - * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. + * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. * * @return the actionType value. */ diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/OperationDisplay.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/OperationDisplay.java index cfead659bf58..e0307599c7e8 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/OperationDisplay.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/OperationDisplay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Localized display information for this particular operation. + * Localized display information for and operation. */ @Immutable public final class OperationDisplay implements JsonSerializable { @@ -99,6 +99,10 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", this.provider); + jsonWriter.writeStringField("resource", this.resource); + jsonWriter.writeStringField("operation", this.operation); + jsonWriter.writeStringField("description", this.description); return jsonWriter.writeEndObject(); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Operations.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Operations.java index caf6db84f41f..91c370086321 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Operations.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Operations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Origin.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Origin.java index 2be07df63909..279d1782a7d3 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Origin.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/Origin.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/OsProfileForVmInstance.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/OsProfileForVmInstance.java index 5cdc7631f590..2f7de6816da2 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/OsProfileForVmInstance.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/OsProfileForVmInstance.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/OsType.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/OsType.java index 7549422df0e4..9a28cd0d6ebc 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/OsType.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/OsType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ProvisioningAction.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ProvisioningAction.java index a4a20d39aa62..432e2af7c9fa 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ProvisioningAction.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ProvisioningAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ProvisioningState.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ProvisioningState.java index 03c2bb75871b..c6010071fbb5 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ProvisioningState.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/ProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/SkipShutdown.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/SkipShutdown.java index c75e326f4ca2..92c45b802fd6 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/SkipShutdown.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/SkipShutdown.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; @@ -8,8 +8,7 @@ import java.util.Collection; /** - * Gets or sets a value indicating whether to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Defaults to false. + * Skip shutdown. */ public final class SkipShutdown extends ExpandableStringEnum { /** diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/StopVirtualMachineOptions.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/StopVirtualMachineOptions.java index e514a69dbc5f..40aae3b452c5 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/StopVirtualMachineOptions.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/StopVirtualMachineOptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/StorageProfile.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/StorageProfile.java index b53139a1dd64..ed18c45e9b5d 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/StorageProfile.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/StorageProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/StorageProfileUpdate.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/StorageProfileUpdate.java index e5877d81bf71..b4f9971c347b 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/StorageProfileUpdate.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/StorageProfileUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/StorageQosPolicy.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/StorageQosPolicy.java index b4e75d913288..2ef620233fd5 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/StorageQosPolicy.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/StorageQosPolicy.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The StorageQoSPolicy definition. */ -@Fluent +@Immutable public final class StorageQosPolicy implements JsonSerializable { /* * The name of the policy. @@ -49,7 +49,7 @@ public final class StorageQosPolicy implements JsonSerializable list(String resourceUri); - - /** - * Implements List virtual machine instances. - * - * Lists all of the virtual machine instances within the specified parent resource. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualMachineInstance list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceUri, Context context); - /** * Gets a virtual machine. * @@ -155,36 +128,36 @@ public interface VirtualMachineInstances { void delete(String resourceUri, ForceDelete force, DeleteFromHost deleteFromHost, Context context); /** - * Implements the operation to creates a checkpoint in a virtual machine instance. + * Implements List virtual machine instances. * - * Creates a checkpoint in virtual machine instance. + * Lists all of the virtual machine instances within the specified parent resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualMachineInstance list operation as paginated response with {@link PagedIterable}. */ - void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body); + PagedIterable list(String resourceUri); /** - * Implements the operation to creates a checkpoint in a virtual machine instance. + * Implements List virtual machine instances. * - * Creates a checkpoint in virtual machine instance. + * Lists all of the virtual machine instances within the specified parent resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualMachineInstance list operation as paginated response with {@link PagedIterable}. */ - void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body, Context context); + PagedIterable list(String resourceUri, Context context); /** - * Implements the operation to delete a checkpoint in a virtual machine instance. + * Implements the operation to stop a virtual machine. * - * Deletes a checkpoint in virtual machine instance. + * The operation to power off (stop) a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -192,12 +165,12 @@ public interface VirtualMachineInstances { * @throws com.azure.core.management.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 deleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body); + void stop(String resourceUri, StopVirtualMachineOptions body); /** - * Implements the operation to delete a checkpoint in a virtual machine instance. + * Implements the operation to stop a virtual machine. * - * Deletes a checkpoint in virtual machine instance. + * The operation to power off (stop) a virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -206,7 +179,32 @@ public interface VirtualMachineInstances { * @throws com.azure.core.management.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 deleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body, Context context); + void stop(String resourceUri, StopVirtualMachineOptions body, Context context); + + /** + * Implements the operation to start a virtual machine. + * + * The operation to start a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void start(String resourceUri); + + /** + * Implements the operation to start a virtual machine. + * + * The operation to start a virtual machine instance. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void start(String resourceUri, Context context); /** * Implements the operation to restart a virtual machine. @@ -234,9 +232,9 @@ public interface VirtualMachineInstances { void restart(String resourceUri, Context context); /** - * Implements the operation to restores to a checkpoint in a virtual machine instance. + * Implements the operation to creates a checkpoint in a virtual machine instance. * - * Restores to a checkpoint in virtual machine instance. + * Creates a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -244,12 +242,12 @@ public interface VirtualMachineInstances { * @throws com.azure.core.management.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 restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body); + void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body); /** - * Implements the operation to restores to a checkpoint in a virtual machine instance. + * Implements the operation to creates a checkpoint in a virtual machine instance. * - * Restores to a checkpoint in virtual machine instance. + * Creates a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -258,37 +256,39 @@ public interface VirtualMachineInstances { * @throws com.azure.core.management.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 restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body, Context context); + void createCheckpoint(String resourceUri, VirtualMachineCreateCheckpoint body, Context context); /** - * Implements the operation to start a virtual machine. + * Implements the operation to delete a checkpoint in a virtual machine instance. * - * The operation to start a virtual machine instance. + * Deletes a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void start(String resourceUri); + void deleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body); /** - * Implements the operation to start a virtual machine. + * Implements the operation to delete a checkpoint in a virtual machine instance. * - * The operation to start a virtual machine instance. + * Deletes a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void start(String resourceUri, Context context); + void deleteCheckpoint(String resourceUri, VirtualMachineDeleteCheckpoint body, Context context); /** - * Implements the operation to stop a virtual machine. + * Implements the operation to restores to a checkpoint in a virtual machine instance. * - * The operation to power off (stop) a virtual machine instance. + * Restores to a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -296,12 +296,12 @@ public interface VirtualMachineInstances { * @throws com.azure.core.management.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 stop(String resourceUri, StopVirtualMachineOptions body); + void restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body); /** - * Implements the operation to stop a virtual machine. + * Implements the operation to restores to a checkpoint in a virtual machine instance. * - * The operation to power off (stop) a virtual machine instance. + * Restores to a checkpoint in virtual machine instance. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. * @param body The content of the action request. @@ -310,5 +310,5 @@ public interface VirtualMachineInstances { * @throws com.azure.core.management.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 stop(String resourceUri, StopVirtualMachineOptions body, Context context); + void restoreCheckpoint(String resourceUri, VirtualMachineRestoreCheckpoint body, Context context); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineInventoryItem.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineInventoryItem.java index 42094f442937..4617581beebd 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineInventoryItem.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineInventoryItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineRestoreCheckpoint.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineRestoreCheckpoint.java index 7286dda1127b..1aae82d46127 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineRestoreCheckpoint.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineRestoreCheckpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplate.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplate.java index 4f2b20763699..31ab1b26ae1d 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplate.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplateInventoryItem.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplateInventoryItem.java index 284a69663a10..318e7a0265b8 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplateInventoryItem.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplateInventoryItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplateProperties.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplateProperties.java index f207fb73c00d..4a87bcdb164b 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplateProperties.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplateTagsUpdate.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplateTagsUpdate.java index dd471d443c86..08f151d8aec9 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplateTagsUpdate.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplateTagsUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplates.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplates.java index 2a676d700c87..e6bb347904ad 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplates.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualMachineTemplates.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; @@ -13,113 +13,113 @@ */ public interface VirtualMachineTemplates { /** - * Implements GET VirtualMachineTemplates in a subscription. + * Gets a VirtualMachineTemplate. * - * List of VirtualMachineTemplates in a subscription. + * Implements VirtualMachineTemplate GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. + * @return the VirtualMachineTemplates resource definition along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, + String virtualMachineTemplateName, Context context); /** - * Implements GET VirtualMachineTemplates in a subscription. + * Gets a VirtualMachineTemplate. * - * List of VirtualMachineTemplates in a subscription. + * Implements VirtualMachineTemplate GET method. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. + * @return the VirtualMachineTemplates resource definition. */ - PagedIterable list(Context context); + VirtualMachineTemplate getByResourceGroup(String resourceGroupName, String virtualMachineTemplateName); /** - * Implements GET VirtualMachineTemplates in a resource group. + * Implements VirtualMachineTemplate DELETE method. * - * List of VirtualMachineTemplates in a resource group. + * Deregisters the ScVmm VM Template from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void delete(String resourceGroupName, String virtualMachineTemplateName); /** - * Implements GET VirtualMachineTemplates in a resource group. + * Implements VirtualMachineTemplate DELETE method. * - * List of VirtualMachineTemplates in a resource group. + * Deregisters the ScVmm VM Template from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + void delete(String resourceGroupName, String virtualMachineTemplateName, ForceDelete force, Context context); /** - * Gets a VirtualMachineTemplate. + * Implements GET VirtualMachineTemplates in a resource group. * - * Implements VirtualMachineTemplate GET method. + * List of VirtualMachineTemplates in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VirtualMachineTemplates resource definition along with {@link Response}. + * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, - String virtualMachineTemplateName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets a VirtualMachineTemplate. + * Implements GET VirtualMachineTemplates in a resource group. * - * Implements VirtualMachineTemplate GET method. + * List of VirtualMachineTemplates in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VirtualMachineTemplates resource definition. + * @return the response of a VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. */ - VirtualMachineTemplate getByResourceGroup(String resourceGroupName, String virtualMachineTemplateName); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Implements VirtualMachineTemplate DELETE method. + * Implements GET VirtualMachineTemplates in a subscription. * - * Deregisters the ScVmm VM Template from Azure. + * List of VirtualMachineTemplates in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String virtualMachineTemplateName); + PagedIterable list(); /** - * Implements VirtualMachineTemplate DELETE method. + * Implements GET VirtualMachineTemplates in a subscription. * - * Deregisters the ScVmm VM Template from Azure. + * List of VirtualMachineTemplates in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualMachineTemplateName Name of the VirtualMachineTemplate. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VirtualMachineTemplate list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String virtualMachineTemplateName, ForceDelete force, Context context); + PagedIterable list(Context context); /** * Gets a VirtualMachineTemplate. diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetwork.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetwork.java index 1e27f728d3c5..eb458f641d64 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetwork.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetwork.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworkInventoryItem.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworkInventoryItem.java index 8061608cbc6c..965d25779388 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworkInventoryItem.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworkInventoryItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworkProperties.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworkProperties.java index d4abc8155e56..3c69b7b9b944 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworkProperties.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworkProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworkTagsUpdate.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworkTagsUpdate.java index 5e94df2a2abb..ec2d348b4c08 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworkTagsUpdate.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworkTagsUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworks.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworks.java index 02731012e4d1..5b7642a2bf3d 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworks.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VirtualNetworks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; @@ -13,113 +13,113 @@ */ public interface VirtualNetworks { /** - * Implements GET VirtualNetworks in a subscription. + * Gets a VirtualNetwork. * - * List of VirtualNetworks in a subscription. + * Implements VirtualNetwork GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the VirtualNetwork. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VirtualNetwork list operation as paginated response with {@link PagedIterable}. + * @return the VirtualNetworks resource definition along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String virtualNetworkName, + Context context); /** - * Implements GET VirtualNetworks in a subscription. + * Gets a VirtualNetwork. * - * List of VirtualNetworks in a subscription. + * Implements VirtualNetwork GET method. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the VirtualNetwork. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VirtualNetwork list operation as paginated response with {@link PagedIterable}. + * @return the VirtualNetworks resource definition. */ - PagedIterable list(Context context); + VirtualNetwork getByResourceGroup(String resourceGroupName, String virtualNetworkName); /** - * Implements GET VirtualNetworks in a resource group. + * Implements VirtualNetwork DELETE method. * - * List of VirtualNetworks in a resource group. + * Deregisters the ScVmm virtual network from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the VirtualNetwork. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VirtualNetwork list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void delete(String resourceGroupName, String virtualNetworkName); /** - * Implements GET VirtualNetworks in a resource group. + * Implements VirtualNetwork DELETE method. * - * List of VirtualNetworks in a resource group. + * Deregisters the ScVmm virtual network from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param virtualNetworkName Name of the VirtualNetwork. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VirtualNetwork list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + void delete(String resourceGroupName, String virtualNetworkName, ForceDelete force, Context context); /** - * Gets a VirtualNetwork. + * Implements GET VirtualNetworks in a resource group. * - * Implements VirtualNetwork GET method. + * List of VirtualNetworks in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VirtualNetworks resource definition along with {@link Response}. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String virtualNetworkName, - Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets a VirtualNetwork. + * Implements GET VirtualNetworks in a resource group. * - * Implements VirtualNetwork GET method. + * List of VirtualNetworks in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VirtualNetworks resource definition. + * @return the response of a VirtualNetwork list operation as paginated response with {@link PagedIterable}. */ - VirtualNetwork getByResourceGroup(String resourceGroupName, String virtualNetworkName); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Implements VirtualNetwork DELETE method. + * Implements GET VirtualNetworks in a subscription. * - * Deregisters the ScVmm virtual network from Azure. + * List of VirtualNetworks in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VirtualNetwork list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String virtualNetworkName); + PagedIterable list(); /** - * Implements VirtualNetwork DELETE method. + * Implements GET VirtualNetworks in a subscription. * - * Deregisters the ScVmm virtual network from Azure. + * List of VirtualNetworks in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName Name of the VirtualNetwork. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VirtualNetwork list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String virtualNetworkName, ForceDelete force, Context context); + PagedIterable list(Context context); /** * Gets a VirtualNetwork. diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmInstanceHybridIdentityMetadata.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmInstanceHybridIdentityMetadata.java index c1acbd08620a..76e185420400 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmInstanceHybridIdentityMetadata.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmInstanceHybridIdentityMetadata.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmInstanceHybridIdentityMetadataProperties.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmInstanceHybridIdentityMetadataProperties.java index 6139d49f2d6e..4b0feac64966 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmInstanceHybridIdentityMetadataProperties.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmInstanceHybridIdentityMetadataProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Describes the properties of Hybrid Identity Metadata for a Virtual Machine. */ -@Fluent +@Immutable public final class VmInstanceHybridIdentityMetadataProperties implements JsonSerializable { /* @@ -35,7 +35,7 @@ public final class VmInstanceHybridIdentityMetadataProperties /** * Creates an instance of VmInstanceHybridIdentityMetadataProperties class. */ - public VmInstanceHybridIdentityMetadataProperties() { + private VmInstanceHybridIdentityMetadataProperties() { } /** @@ -47,17 +47,6 @@ public String resourceUid() { return this.resourceUid; } - /** - * Set the resourceUid property: The unique identifier for the resource. - * - * @param resourceUid the resourceUid value to set. - * @return the VmInstanceHybridIdentityMetadataProperties object itself. - */ - public VmInstanceHybridIdentityMetadataProperties withResourceUid(String resourceUid) { - this.resourceUid = resourceUid; - return this; - } - /** * Get the publicKey property: Gets or sets the Public Key. * @@ -67,17 +56,6 @@ public String publicKey() { return this.publicKey; } - /** - * Set the publicKey property: Gets or sets the Public Key. - * - * @param publicKey the publicKey value to set. - * @return the VmInstanceHybridIdentityMetadataProperties object itself. - */ - public VmInstanceHybridIdentityMetadataProperties withPublicKey(String publicKey) { - this.publicKey = publicKey; - return this; - } - /** * Get the provisioningState property: Provisioning state of the resource. * diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmInstanceHybridIdentityMetadatas.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmInstanceHybridIdentityMetadatas.java index 87f746996dda..0fb32b4d12e1 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmInstanceHybridIdentityMetadatas.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmInstanceHybridIdentityMetadatas.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; @@ -13,58 +13,58 @@ */ public interface VmInstanceHybridIdentityMetadatas { /** - * Implements GET HybridIdentityMetadata in a vm. + * Gets HybridIdentityMetadata. * - * Returns the list of HybridIdentityMetadata of the given VM. + * Implements HybridIdentityMetadata GET method. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VmInstanceHybridIdentityMetadata list operation as paginated response with - * {@link PagedIterable}. + * @return defines the HybridIdentityMetadata along with {@link Response}. */ - PagedIterable listByVirtualMachineInstance(String resourceUri); + Response getWithResponse(String resourceUri, Context context); /** - * Implements GET HybridIdentityMetadata in a vm. + * Gets HybridIdentityMetadata. * - * Returns the list of HybridIdentityMetadata of the given VM. + * Implements HybridIdentityMetadata GET method. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VmInstanceHybridIdentityMetadata list operation as paginated response with - * {@link PagedIterable}. + * @return defines the HybridIdentityMetadata. */ - PagedIterable listByVirtualMachineInstance(String resourceUri, Context context); + VmInstanceHybridIdentityMetadata get(String resourceUri); /** - * Gets HybridIdentityMetadata. + * Implements GET HybridIdentityMetadata in a vm. * - * Implements HybridIdentityMetadata GET method. + * Returns the list of HybridIdentityMetadata of the given VM. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata along with {@link Response}. + * @return the response of a VmInstanceHybridIdentityMetadata list operation as paginated response with + * {@link PagedIterable}. */ - Response getWithResponse(String resourceUri, Context context); + PagedIterable listByVirtualMachineInstance(String resourceUri); /** - * Gets HybridIdentityMetadata. + * Implements GET HybridIdentityMetadata in a vm. * - * Implements HybridIdentityMetadata GET method. + * Returns the list of HybridIdentityMetadata of the given VM. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata. + * @return the response of a VmInstanceHybridIdentityMetadata list operation as paginated response with + * {@link PagedIterable}. */ - VmInstanceHybridIdentityMetadata get(String resourceUri); + PagedIterable listByVirtualMachineInstance(String resourceUri, Context context); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmCredential.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmCredential.java index 4fa33ca5ee9b..829c0bce3c48 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmCredential.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmCredential.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServer.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServer.java index 81935937c09a..71f817448212 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServer.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServerProperties.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServerProperties.java index 13d013057b24..5f6a6d881513 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServerProperties.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServerProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServerTagsUpdate.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServerTagsUpdate.java index 16cd596c8c82..a475ab2d89ff 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServerTagsUpdate.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServerTagsUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServers.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServers.java index a2112548542d..f077a008d03a 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServers.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/VmmServers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.models; @@ -13,112 +13,112 @@ */ public interface VmmServers { /** - * Implements GET VmmServers in a subscription. + * Gets a VMMServer. * - * List of VmmServers in a subscription. + * Implements VmmServer GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VmmServer list operation as paginated response with {@link PagedIterable}. + * @return the VmmServers resource definition along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String vmmServerName, Context context); /** - * Implements GET VmmServers in a subscription. + * Gets a VMMServer. * - * List of VmmServers in a subscription. + * Implements VmmServer GET method. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VmmServer list operation as paginated response with {@link PagedIterable}. + * @return the VmmServers resource definition. */ - PagedIterable list(Context context); + VmmServer getByResourceGroup(String resourceGroupName, String vmmServerName); /** - * Implements GET VmmServers in a resource group. + * Implements VmmServers DELETE method. * - * List of VmmServers in a resource group. + * Removes the SCVmm fabric from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VmmServer list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void delete(String resourceGroupName, String vmmServerName); /** - * Implements GET VmmServers in a resource group. + * Implements VmmServers DELETE method. * - * List of VmmServers in a resource group. + * Removes the SCVmm fabric from Azure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmmServerName Name of the VmmServer. + * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VmmServer list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + void delete(String resourceGroupName, String vmmServerName, ForceDelete force, Context context); /** - * Gets a VMMServer. + * Implements GET VmmServers in a resource group. * - * Implements VmmServer GET method. + * List of VmmServers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VmmServers resource definition along with {@link Response}. + * @return the response of a VmmServer list operation as paginated response with {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String vmmServerName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets a VMMServer. + * Implements GET VmmServers in a resource group. * - * Implements VmmServer GET method. + * List of VmmServers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the VmmServers resource definition. + * @return the response of a VmmServer list operation as paginated response with {@link PagedIterable}. */ - VmmServer getByResourceGroup(String resourceGroupName, String vmmServerName); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Implements VmmServers DELETE method. + * Implements GET VmmServers in a subscription. * - * Removes the SCVmm fabric from Azure. + * List of VmmServers in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VmmServer list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String vmmServerName); + PagedIterable list(); /** - * Implements VmmServers DELETE method. + * Implements GET VmmServers in a subscription. * - * Removes the SCVmm fabric from Azure. + * List of VmmServers in a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmmServerName Name of the VmmServer. - * @param force Forces the resource to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VmmServer list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String vmmServerName, ForceDelete force, Context context); + PagedIterable list(Context context); /** * Gets a VMMServer. diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/package-info.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/package-info.java index f84b6a59a77d..46a641a55b1c 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/package-info.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for ScvmmClient. - * SCVMM Client. + * Package containing the data models for SCVMM. + * The Microsoft.ScVmm Rest API spec. */ package com.azure.resourcemanager.scvmm.models; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/package-info.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/package-info.java index 324adf22d7f1..43443d4054b6 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/package-info.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/com/azure/resourcemanager/scvmm/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for ScvmmClient. - * SCVMM Client. + * Package containing the classes for SCVMM. + * The Microsoft.ScVmm Rest API spec. */ package com.azure.resourcemanager.scvmm; diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/module-info.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/module-info.java index 60573333fb85..301064e8902e 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/module-info.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.scvmm { requires transitive com.azure.core.management; @@ -10,4 +10,5 @@ exports com.azure.resourcemanager.scvmm.models; opens com.azure.resourcemanager.scvmm.fluent.models to com.azure.core, com.fasterxml.jackson.databind; opens com.azure.resourcemanager.scvmm.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.scvmm.implementation.models to com.azure.core, com.fasterxml.jackson.databind; } \ No newline at end of file diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsCreateOrUpdateSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsCreateOrUpdateSamples.java index 6b3a0aff0cb0..0d70c4eb6fa4 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsCreateOrUpdateSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -14,33 +14,15 @@ */ public final class AvailabilitySetsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_CreateOrUpdate_MinimumSet_Gen.json - */ - /** - * Sample code: AvailabilitySets_CreateOrUpdate_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void availabilitySetsCreateOrUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.availabilitySets() - .define("_") - .withRegion("jelevilan") - .withExistingResourceGroup("rgscvmm") - .withExtendedLocation(new ExtendedLocation()) - .create(); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/AvailabilitySets_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: AvailabilitySets_CreateOrUpdate_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void availabilitySetsCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void availabilitySetsCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.availabilitySets() .define("-") .withRegion("jelevilan") diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsDeleteSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsDeleteSamples.java index 52dfcdc27663..342a64610aa8 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsDeleteSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,28 +11,15 @@ */ public final class AvailabilitySetsDeleteSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_Delete_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/AvailabilitySets_Delete_MaximumSet_Gen.json */ /** * Sample code: AvailabilitySets_Delete_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void availabilitySetsDeleteMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void availabilitySetsDeleteMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.availabilitySets().delete("rgscvmm", "_", ForceDelete.TRUE, com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_Delete_MinimumSet_Gen.json - */ - /** - * Sample code: AvailabilitySets_Delete_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void availabilitySetsDeleteMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.availabilitySets().delete("rgscvmm", "6", null, com.azure.core.util.Context.NONE); - } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsGetByResourceGroupSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsGetByResourceGroupSamples.java index 99799a361a5b..3336e1767167 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsGetByResourceGroupSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,28 +9,15 @@ */ public final class AvailabilitySetsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_Get_MinimumSet_Gen.json - */ - /** - * Sample code: AvailabilitySets_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void availabilitySetsGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.availabilitySets().getByResourceGroupWithResponse("rgscvmm", "V", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_Get_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/AvailabilitySets_Get_MaximumSet_Gen.json */ /** * Sample code: AvailabilitySets_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void availabilitySetsGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void availabilitySetsGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.availabilitySets().getByResourceGroupWithResponse("rgscvmm", "-", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsListByResourceGroupSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsListByResourceGroupSamples.java index 935e31bb576e..d618048a65e0 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsListByResourceGroupSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,30 +9,16 @@ */ public final class AvailabilitySetsListByResourceGroupSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_ListByResourceGroup_MinimumSet_Gen.json - */ - /** - * Sample code: AvailabilitySets_ListByResourceGroup_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - availabilitySetsListByResourceGroupMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.availabilitySets().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/AvailabilitySets_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: AvailabilitySets_ListByResourceGroup_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - availabilitySetsListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + availabilitySetsListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.availabilitySets().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsListSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsListSamples.java index 9714a70deda9..1987151d3ea4 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsListSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,30 +9,16 @@ */ public final class AvailabilitySetsListSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_ListBySubscription_MinimumSet_Gen.json - */ - /** - * Sample code: AvailabilitySets_ListBySubscription_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - availabilitySetsListBySubscriptionMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.availabilitySets().list(com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/AvailabilitySets_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: AvailabilitySets_ListBySubscription_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - availabilitySetsListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + availabilitySetsListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.availabilitySets().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsUpdateSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsUpdateSamples.java index 522f491aa2b9..abdaf8e980d5 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsUpdateSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -13,31 +13,15 @@ */ public final class AvailabilitySetsUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_Update_MinimumSet_Gen.json - */ - /** - * Sample code: AvailabilitySets_Update_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void availabilitySetsUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - AvailabilitySet resource = manager.availabilitySets() - .getByResourceGroupWithResponse("rgscvmm", "1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * AvailabilitySets_Update_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/AvailabilitySets_Update_MaximumSet_Gen.json */ /** * Sample code: AvailabilitySets_Update_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void availabilitySetsUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void availabilitySetsUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { AvailabilitySet resource = manager.availabilitySets() .getByResourceGroupWithResponse("rgscvmm", "-", com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsCreateOrUpdateSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsCreateOrUpdateSamples.java index cdd59d501c66..d0fcf6cfe4ab 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsCreateOrUpdateSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -14,33 +14,15 @@ */ public final class CloudsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * Clouds_CreateOrUpdate_MinimumSet_Gen.json - */ - /** - * Sample code: Clouds_CreateOrUpdate_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void cloudsCreateOrUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.clouds() - .define("-") - .withRegion("khwsdmaxfhmbu") - .withExistingResourceGroup("rgscvmm") - .withExtendedLocation(new ExtendedLocation()) - .create(); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * Clouds_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/Clouds_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: Clouds_CreateOrUpdate_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void cloudsCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void cloudsCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.clouds() .define("2") .withRegion("khwsdmaxfhmbu") diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsDeleteSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsDeleteSamples.java index 1198e9164fe6..d8adab1ce658 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsDeleteSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,28 +11,14 @@ */ public final class CloudsDeleteSamples { /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/Clouds_Delete_MaximumSet_Gen.json */ /** * Sample code: Clouds_Delete_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void cloudsDeleteMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void cloudsDeleteMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.clouds().delete("rgscvmm", "-", ForceDelete.TRUE, com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Delete_MinimumSet_Gen.json - */ - /** - * Sample code: Clouds_Delete_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void cloudsDeleteMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.clouds().delete("rgscvmm", "1", null, com.azure.core.util.Context.NONE); - } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsGetByResourceGroupSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsGetByResourceGroupSamples.java index 21dc65862229..b2f99b93d903 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsGetByResourceGroupSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,28 +9,14 @@ */ public final class CloudsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/Clouds_Get_MaximumSet_Gen.json */ /** * Sample code: Clouds_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void cloudsGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void cloudsGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.clouds().getByResourceGroupWithResponse("rgscvmm", "_", com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Get_MinimumSet_Gen.json - */ - /** - * Sample code: Clouds_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void cloudsGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.clouds().getByResourceGroupWithResponse("rgscvmm", "i", com.azure.core.util.Context.NONE); - } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsListByResourceGroupSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsListByResourceGroupSamples.java index b8b834896fb7..80f8ef95c8b8 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsListByResourceGroupSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,28 +9,15 @@ */ public final class CloudsListByResourceGroupSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * Clouds_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/Clouds_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: Clouds_ListByResourceGroup_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void cloudsListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.clouds().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * Clouds_ListByResourceGroup_MinimumSet_Gen.json - */ - /** - * Sample code: Clouds_ListByResourceGroup_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void cloudsListByResourceGroupMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void cloudsListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.clouds().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsListSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsListSamples.java index 5a91c1223a5e..2691b772059e 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsListSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,28 +9,15 @@ */ public final class CloudsListSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * Clouds_ListBySubscription_MinimumSet_Gen.json - */ - /** - * Sample code: Clouds_ListBySubscription_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void cloudsListBySubscriptionMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.clouds().list(com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * Clouds_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/Clouds_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: Clouds_ListBySubscription_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void cloudsListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void cloudsListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.clouds().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsUpdateSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsUpdateSamples.java index 98093ba8d0bb..4fb994c6048a 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsUpdateSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/CloudsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -13,31 +13,14 @@ */ public final class CloudsUpdateSamples { /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Update_MinimumSet_Gen.json - */ - /** - * Sample code: Clouds_Update_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void cloudsUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - Cloud resource = manager.clouds() - .getByResourceGroupWithResponse("rgscvmm", "_", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Clouds_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/Clouds_Update_MaximumSet_Gen.json */ /** * Sample code: Clouds_Update_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void cloudsUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void cloudsUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { Cloud resource = manager.clouds() .getByResourceGroupWithResponse("rgscvmm", "P", com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsCreateSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsCreateSamples.java index 09788e1117e4..18f505374450 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsCreateSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -16,29 +16,14 @@ public final class GuestAgentsCreateSamples { /* * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Create_MinimumSet_Gen - * .json - */ - /** - * Sample code: GuestAgents_Create_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void guestAgentsCreateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.guestAgents().create("gtgclehcbsyave", new GuestAgentInner(), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Create_MaximumSet_Gen - * .json + * specification/scvmm/ScVmm.Management/examples/2023-10-07/GuestAgents_Create_MaximumSet_Gen.json */ /** * Sample code: GuestAgents_Create_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void guestAgentsCreateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void guestAgentsCreateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.guestAgents() .create("gtgclehcbsyave", new GuestAgentInner().withProperties(new GuestAgentProperties() diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsDeleteSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsDeleteSamples.java index 5823a2e98b40..f67e0bd0b30f 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsDeleteSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -10,29 +10,14 @@ public final class GuestAgentsDeleteSamples { /* * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Delete_MaximumSet_Gen - * .json + * specification/scvmm/ScVmm.Management/examples/2023-10-07/GuestAgents_Delete_MaximumSet_Gen.json */ /** * Sample code: GuestAgents_Delete_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void guestAgentsDeleteMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.guestAgents().deleteWithResponse("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Delete_MinimumSet_Gen - * .json - */ - /** - * Sample code: GuestAgents_Delete_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void guestAgentsDeleteMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void guestAgentsDeleteMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.guestAgents().deleteWithResponse("gtgclehcbsyave", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsGetSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsGetSamples.java index 12e8240f2ae3..a63b43fb1ee7 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsGetSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,30 +9,14 @@ */ public final class GuestAgentsGetSamples { /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Get_MaximumSet_Gen. - * json + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/GuestAgents_Get_MaximumSet_Gen.json */ /** * Sample code: GuestAgents_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void guestAgentsGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.guestAgents().getWithResponse("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/GuestAgents_Get_MinimumSet_Gen. - * json - */ - /** - * Sample code: GuestAgents_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void guestAgentsGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void guestAgentsGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.guestAgents().getWithResponse("gtgclehcbsyave", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsListByVirtualMachineInstanceSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsListByVirtualMachineInstanceSamples.java index ffd9e2d614b2..e0150bc1a937 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsListByVirtualMachineInstanceSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsListByVirtualMachineInstanceSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,30 +9,17 @@ */ public final class GuestAgentsListByVirtualMachineInstanceSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * GuestAgents_ListByVirtualMachineInstance_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/GuestAgents_ListByVirtualMachineInstance_MaximumSet_Gen. + * json */ /** * Sample code: GuestAgents_ListByVirtualMachineInstance_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - guestAgentsListByVirtualMachineInstanceMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.guestAgents().listByVirtualMachineInstance("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * GuestAgents_ListByVirtualMachineInstance_MinimumSet_Gen.json - */ - /** - * Sample code: GuestAgents_ListByVirtualMachineInstance_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - guestAgentsListByVirtualMachineInstanceMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + guestAgentsListByVirtualMachineInstanceMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.guestAgents().listByVirtualMachineInstance("gtgclehcbsyave", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsCreateSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsCreateSamples.java index 281cc12fa8a7..d5df3a5130fc 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsCreateSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,31 +11,15 @@ */ public final class InventoryItemsCreateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * InventoryItems_Create_MinimumSet_Gen.json - */ - /** - * Sample code: InventoryItems_Create_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void inventoryItemsCreateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.inventoryItems() - .define("bbFb0cBb-50ce-4bfc-3eeD-bC26AbCC257a") - .withExistingVmmServer("rgscvmm", ".") - .create(); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * InventoryItems_Create_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/InventoryItems_Create_MaximumSet_Gen.json */ /** * Sample code: InventoryItems_Create_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void inventoryItemsCreateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void inventoryItemsCreateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.inventoryItems() .define("1BdDc2Ab-bDd9-Ebd6-bfdb-C0dbbdB5DEDf") .withExistingVmmServer("rgscvmm", "O") diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsDeleteSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsDeleteSamples.java index 2cee94efb876..e30c89d5269b 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsDeleteSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,32 +9,17 @@ */ public final class InventoryItemsDeleteSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * InventoryItems_Delete_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/InventoryItems_Delete_MaximumSet_Gen.json */ /** * Sample code: InventoryItems_Delete_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void inventoryItemsDeleteMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void inventoryItemsDeleteMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.inventoryItems() .deleteWithResponse("rgscvmm", "b", "EcECadfd-Eaaa-e5Ce-ebdA-badeEd3c6af1", com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * InventoryItems_Delete_MinimumSet_Gen.json - */ - /** - * Sample code: InventoryItems_Delete_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void inventoryItemsDeleteMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.inventoryItems() - .deleteWithResponse("rgscvmm", "_", "cDBcbae6-BC3d-52fe-CedC-7eFeaBFabb82", - com.azure.core.util.Context.NONE); - } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsGetSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsGetSamples.java index 2db329b4100b..e1dead53dcc3 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsGetSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -10,30 +10,14 @@ public final class InventoryItemsGetSamples { /* * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Get_MinimumSet_Gen - * .json - */ - /** - * Sample code: InventoryItems_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void inventoryItemsGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.inventoryItems() - .getWithResponse("rgscvmm", "_", "cacb8Ceb-efAC-bebb-ae7C-dec8C5Bb7100", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/InventoryItems_Get_MaximumSet_Gen - * .json + * specification/scvmm/ScVmm.Management/examples/2023-10-07/InventoryItems_Get_MaximumSet_Gen.json */ /** * Sample code: InventoryItems_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void inventoryItemsGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void inventoryItemsGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.inventoryItems() .getWithResponse("rgscvmm", "1", "2bFBede6-EEf8-becB-dBbd-B96DbBFdB3f3", com.azure.core.util.Context.NONE); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsListByVmmServerSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsListByVmmServerSamples.java index fdaf6036b08a..ec6a461df1ae 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsListByVmmServerSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsListByVmmServerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,28 +9,15 @@ */ public final class InventoryItemsListByVmmServerSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * InventoryItems_ListByVmmServer_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/InventoryItems_ListByVmmServer_MaximumSet_Gen.json */ /** * Sample code: InventoryItems_ListByVmmServer_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void inventoryItemsListByVmmServerMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void inventoryItemsListByVmmServerMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.inventoryItems().listByVmmServer("rgscvmm", "X", com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * InventoryItems_ListByVmmServer_MinimumSet_Gen.json - */ - /** - * Sample code: InventoryItems_ListByVmmServer_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void inventoryItemsListByVmmServerMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.inventoryItems().listByVmmServer("rgscvmm", "H", com.azure.core.util.Context.NONE); - } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/OperationsListSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/OperationsListSamples.java index 690f112d4af4..0d48ec3e51bb 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/OperationsListSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/OperationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,30 +9,14 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Operations_List_MinimumSet_Gen. - * json - */ - /** - * Sample code: Operations_List_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void operationsListMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/Operations_List_MaximumSet_Gen. - * json + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/Operations_List_MaximumSet_Gen.json */ /** * Sample code: Operations_List_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void operationsListMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void operationsListMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesCreateCheckpointSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesCreateCheckpointSamples.java index 72bf7748f978..8c45c37f8672 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesCreateCheckpointSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesCreateCheckpointSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,33 +11,19 @@ */ public final class VirtualMachineInstancesCreateCheckpointSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_CreateCheckpoint_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_CreateCheckpoint_MaximumSet_Gen. + * json */ /** * Sample code: VirtualMachineInstances_CreateCheckpoint_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualMachineInstancesCreateCheckpointMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualMachineInstancesCreateCheckpointMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances() .createCheckpoint("gtgclehcbsyave", new VirtualMachineCreateCheckpoint().withName("ilvltf") .withDescription("zoozhfbepldrgpjqsbhpqebtodrhvy"), com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_CreateCheckpoint_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_CreateCheckpoint_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualMachineInstancesCreateCheckpointMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances() - .createCheckpoint("gtgclehcbsyave", new VirtualMachineCreateCheckpoint(), com.azure.core.util.Context.NONE); - } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesCreateOrUpdateSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesCreateOrUpdateSamples.java index 4b406b9fc181..354416772af1 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesCreateOrUpdateSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -27,16 +27,17 @@ */ public final class VirtualMachineInstancesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_CreateOrUpdate_MaximumSet_Gen. + * json */ /** * Sample code: VirtualMachineInstances_CreateOrUpdate_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualMachineInstancesCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualMachineInstancesCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances() .createOrUpdate("gtgclehcbsyave", new VirtualMachineInstanceInner() .withProperties(new VirtualMachineInstanceProperties() @@ -88,21 +89,4 @@ public final class VirtualMachineInstancesCreateOrUpdateSamples { "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName")), com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_CreateOrUpdate_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_CreateOrUpdate_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualMachineInstancesCreateOrUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances() - .createOrUpdate("gtgclehcbsyave", - new VirtualMachineInstanceInner().withExtendedLocation(new ExtendedLocation()), - com.azure.core.util.Context.NONE); - } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesDeleteCheckpointSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesDeleteCheckpointSamples.java index fbbe01aa6326..2effbfbb4fd0 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesDeleteCheckpointSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesDeleteCheckpointSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,34 +11,20 @@ */ public final class VirtualMachineInstancesDeleteCheckpointSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_DeleteCheckpoint_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_DeleteCheckpoint_MaximumSet_Gen. + * json */ /** * Sample code: VirtualMachineInstances_DeleteCheckpoint_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualMachineInstancesDeleteCheckpointMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualMachineInstancesDeleteCheckpointMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances() .deleteCheckpoint("gtgclehcbsyave", new VirtualMachineDeleteCheckpoint().withId("eenfflimcbgqfsebdusophahjpk"), com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_DeleteCheckpoint_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_DeleteCheckpoint_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualMachineInstancesDeleteCheckpointMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances() - .deleteCheckpoint("gtgclehcbsyave", new VirtualMachineDeleteCheckpoint(), com.azure.core.util.Context.NONE); - } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesDeleteSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesDeleteSamples.java index 0c3e5745a772..15b54fd5045d 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesDeleteSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -12,29 +12,16 @@ */ public final class VirtualMachineInstancesDeleteSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Delete_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_Delete_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineInstances_Delete_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineInstancesDeleteMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineInstancesDeleteMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances() .delete("gtgclehcbsyave", ForceDelete.TRUE, DeleteFromHost.TRUE, com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Delete_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_Delete_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineInstancesDeleteMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances().delete("gtgclehcbsyave", null, null, com.azure.core.util.Context.NONE); - } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesGetSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesGetSamples.java index 5f8e76b23736..dac6b27c37e9 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesGetSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,28 +9,15 @@ */ public final class VirtualMachineInstancesGetSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Get_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineInstancesGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances().getWithResponse("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Get_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_Get_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineInstances_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineInstancesGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineInstancesGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances().getWithResponse("gtgclehcbsyave", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesListSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesListSamples.java index c52897ccda26..4932d8899666 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesListSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,28 +9,15 @@ */ public final class VirtualMachineInstancesListSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_List_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_List_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineInstances_List_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineInstancesListMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances().list("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_List_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_List_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineInstancesListMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineInstancesListMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances().list("gtgclehcbsyave", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesRestartSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesRestartSamples.java index e2591721c842..49895e6c0cbe 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesRestartSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesRestartSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,28 +9,15 @@ */ public final class VirtualMachineInstancesRestartSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Restart_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_Restart_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineInstances_Restart_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineInstancesRestartMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances().restart("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Restart_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_Restart_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineInstancesRestartMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineInstancesRestartMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances().restart("gtgclehcbsyave", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesRestoreCheckpointSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesRestoreCheckpointSamples.java index 2453bbfb7050..a6d914c7bc07 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesRestoreCheckpointSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesRestoreCheckpointSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,32 +11,17 @@ */ public final class VirtualMachineInstancesRestoreCheckpointSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_RestoreCheckpoint_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_RestoreCheckpoint_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualMachineInstancesRestoreCheckpointMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances() - .restoreCheckpoint("gtgclehcbsyave", new VirtualMachineRestoreCheckpoint(), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_RestoreCheckpoint_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_RestoreCheckpoint_MaximumSet_Gen + * .json */ /** * Sample code: VirtualMachineInstances_RestoreCheckpoint_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualMachineInstancesRestoreCheckpointMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualMachineInstancesRestoreCheckpointMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances() .restoreCheckpoint("gtgclehcbsyave", new VirtualMachineRestoreCheckpoint().withId("rweqduwzsn"), com.azure.core.util.Context.NONE); diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesStartSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesStartSamples.java index e312dca8b560..cfb021b4ee0e 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesStartSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesStartSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,28 +9,15 @@ */ public final class VirtualMachineInstancesStartSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Start_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_Start_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineInstancesStartMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances().start("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Start_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_Start_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineInstances_Start_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineInstancesStartMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineInstancesStartMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances().start("gtgclehcbsyave", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesStopSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesStopSamples.java index 13cc1ebcfba9..a47ef43092b8 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesStopSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesStopSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -12,31 +12,17 @@ */ public final class VirtualMachineInstancesStopSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Stop_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_Stop_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineInstances_Stop_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineInstancesStopMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineInstancesStopMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances() .stop("gtgclehcbsyave", new StopVirtualMachineOptions().withSkipShutdown(SkipShutdown.TRUE), com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Stop_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_Stop_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineInstancesStopMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances() - .stop("gtgclehcbsyave", new StopVirtualMachineOptions(), com.azure.core.util.Context.NONE); - } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesUpdateSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesUpdateSamples.java index 9e745e6aa78b..23ac31b9c39d 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesUpdateSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstancesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -24,29 +24,15 @@ */ public final class VirtualMachineInstancesUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Update_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineInstances_Update_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineInstancesUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineInstances() - .update("gtgclehcbsyave", new VirtualMachineInstanceUpdate(), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineInstances_Update_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineInstances_Update_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineInstances_Update_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineInstancesUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineInstancesUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineInstances() .update("gtgclehcbsyave", new VirtualMachineInstanceUpdate().withProperties(new VirtualMachineInstanceUpdateProperties() diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesCreateOrUpdateSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesCreateOrUpdateSamples.java index 9be14b34a4dd..99fb01b3ad8b 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesCreateOrUpdateSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -14,35 +14,17 @@ */ public final class VirtualMachineTemplatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_CreateOrUpdate_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineTemplates_CreateOrUpdate_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualMachineTemplatesCreateOrUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineTemplates() - .define("P") - .withRegion("ayxsyduviotylbojh") - .withExistingResourceGroup("rgscvmm") - .withExtendedLocation(new ExtendedLocation()) - .create(); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineTemplates_CreateOrUpdate_MaximumSet_Gen. + * json */ /** * Sample code: VirtualMachineTemplates_CreateOrUpdate_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualMachineTemplatesCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualMachineTemplatesCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineTemplates() .define("6") .withRegion("ayxsyduviotylbojh") diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesDeleteSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesDeleteSamples.java index 512dfb09320c..bfcb7d1290c1 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesDeleteSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,28 +11,15 @@ */ public final class VirtualMachineTemplatesDeleteSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_Delete_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineTemplates_Delete_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineTemplatesDeleteMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineTemplates().delete("rgscvmm", "5", null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_Delete_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineTemplates_Delete_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineTemplates_Delete_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineTemplatesDeleteMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineTemplatesDeleteMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineTemplates().delete("rgscvmm", "6", ForceDelete.TRUE, com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesGetByResourceGroupSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesGetByResourceGroupSamples.java index 358fb603bd30..404ed621b6d1 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesGetByResourceGroupSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,29 +9,15 @@ */ public final class VirtualMachineTemplatesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_Get_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineTemplates_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineTemplatesGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineTemplates() - .getByResourceGroupWithResponse("rgscvmm", "m", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_Get_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineTemplates_Get_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineTemplates_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineTemplatesGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineTemplatesGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineTemplates() .getByResourceGroupWithResponse("rgscvmm", "4", com.azure.core.util.Context.NONE); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesListByResourceGroupSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesListByResourceGroupSamples.java index 725bc3dfd67f..20396f93cbfe 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesListByResourceGroupSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,30 +9,16 @@ */ public final class VirtualMachineTemplatesListByResourceGroupSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_ListByResourceGroup_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineTemplates_ListByResourceGroup_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualMachineTemplatesListByResourceGroupMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineTemplates().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/ * VirtualMachineTemplates_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineTemplates_ListByResourceGroup_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualMachineTemplatesListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualMachineTemplatesListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineTemplates().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesListSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesListSamples.java index 2df01698f32f..6a7cabe9f540 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesListSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,30 +9,16 @@ */ public final class VirtualMachineTemplatesListSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/ * VirtualMachineTemplates_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineTemplates_ListBySubscription_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualMachineTemplatesListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualMachineTemplates().list(com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_ListBySubscription_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineTemplates_ListBySubscription_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualMachineTemplatesListBySubscriptionMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualMachineTemplatesListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualMachineTemplates().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesUpdateSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesUpdateSamples.java index 2ccff5766cdc..f02c8b8141ac 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesUpdateSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -13,37 +13,21 @@ */ public final class VirtualMachineTemplatesUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_Update_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualMachineTemplates_Update_MaximumSet_Gen.json */ /** * Sample code: VirtualMachineTemplates_Update_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualMachineTemplatesUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualMachineTemplatesUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { VirtualMachineTemplate resource = manager.virtualMachineTemplates() .getByResourceGroupWithResponse("rgscvmm", "g", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("key6634", "fakeTokenPlaceholder")).apply(); } - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualMachineTemplates_Update_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualMachineTemplates_Update_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualMachineTemplatesUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - VirtualMachineTemplate resource = manager.virtualMachineTemplates() - .getByResourceGroupWithResponse("rgscvmm", "-", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } - // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksCreateOrUpdateSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksCreateOrUpdateSamples.java index 31b8022765de..c3d917382ba0 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksCreateOrUpdateSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -14,15 +14,15 @@ */ public final class VirtualNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualNetworks_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: VirtualNetworks_CreateOrUpdate_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualNetworksCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualNetworksCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualNetworks() .define("_") .withRegion("fky") @@ -38,24 +38,6 @@ public static void virtualNetworksCreateOrUpdateMaximumSet(com.azure.resourceman .create(); } - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_CreateOrUpdate_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualNetworks_CreateOrUpdate_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualNetworksCreateOrUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualNetworks() - .define("-") - .withRegion("fky") - .withExistingResourceGroup("rgscvmm") - .withExtendedLocation(new ExtendedLocation()) - .create(); - } - // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksDeleteSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksDeleteSamples.java index 3c76001693e6..aa440f4f9ea8 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksDeleteSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,28 +11,15 @@ */ public final class VirtualNetworksDeleteSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_Delete_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualNetworks_Delete_MaximumSet_Gen.json */ /** * Sample code: VirtualNetworks_Delete_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualNetworksDeleteMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualNetworksDeleteMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualNetworks().delete("rgscvmm", ".", ForceDelete.TRUE, com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_Delete_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualNetworks_Delete_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualNetworksDeleteMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualNetworks().delete("rgscvmm", "1", null, com.azure.core.util.Context.NONE); - } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksGetByResourceGroupSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksGetByResourceGroupSamples.java index 5d63cb08d6e9..2837bc88e39e 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksGetByResourceGroupSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,28 +9,15 @@ */ public final class VirtualNetworksGetByResourceGroupSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_Get_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualNetworks_Get_MaximumSet_Gen.json */ /** * Sample code: VirtualNetworks_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualNetworksGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualNetworksGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualNetworks().getByResourceGroupWithResponse("rgscvmm", "2", com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_Get_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualNetworks_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualNetworksGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualNetworks().getByResourceGroupWithResponse("rgscvmm", "-", com.azure.core.util.Context.NONE); - } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksListByResourceGroupSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksListByResourceGroupSamples.java index 2abdca4c2fdf..fb21299dfbc2 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksListByResourceGroupSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,30 +9,16 @@ */ public final class VirtualNetworksListByResourceGroupSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_ListByResourceGroup_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualNetworks_ListByResourceGroup_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualNetworksListByResourceGroupMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualNetworks().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualNetworks_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: VirtualNetworks_ListByResourceGroup_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualNetworksListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualNetworksListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualNetworks().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksListSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksListSamples.java index 28157042c631..3b0f6e7a63a9 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksListSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,30 +9,16 @@ */ public final class VirtualNetworksListSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_ListBySubscription_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualNetworks_ListBySubscription_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - virtualNetworksListBySubscriptionMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.virtualNetworks().list(com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualNetworks_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: VirtualNetworks_ListBySubscription_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - virtualNetworksListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + virtualNetworksListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.virtualNetworks().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksUpdateSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksUpdateSamples.java index 410ce15b58d6..ef65827fb4b3 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksUpdateSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -13,31 +13,15 @@ */ public final class VirtualNetworksUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_Update_MinimumSet_Gen.json - */ - /** - * Sample code: VirtualNetworks_Update_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void virtualNetworksUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - VirtualNetwork resource = manager.virtualNetworks() - .getByResourceGroupWithResponse("rgscvmm", "-", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VirtualNetworks_Update_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VirtualNetworks_Update_MaximumSet_Gen.json */ /** * Sample code: VirtualNetworks_Update_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void virtualNetworksUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void virtualNetworksUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { VirtualNetwork resource = manager.virtualNetworks() .getByResourceGroupWithResponse("rgscvmm", "S", com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmInstanceHybridIdentityMetadatasGetSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmInstanceHybridIdentityMetadatasGetSamples.java index 09a7900b6ff2..8ecf065bf225 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmInstanceHybridIdentityMetadatasGetSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmInstanceHybridIdentityMetadatasGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,30 +9,17 @@ */ public final class VmInstanceHybridIdentityMetadatasGetSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmInstanceHybridIdentityMetadatas_Get_MinimumSet_Gen.json - */ - /** - * Sample code: VmInstanceHybridIdentityMetadatas_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void - vmInstanceHybridIdentityMetadatasGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.vmInstanceHybridIdentityMetadatas().getWithResponse("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmInstanceHybridIdentityMetadatas_Get_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VmInstanceHybridIdentityMetadatas_Get_MaximumSet_Gen. + * json */ /** * Sample code: VmInstanceHybridIdentityMetadatas_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void - vmInstanceHybridIdentityMetadatasGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + vmInstanceHybridIdentityMetadatasGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.vmInstanceHybridIdentityMetadatas().getWithResponse("gtgclehcbsyave", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSamples.java index 53e4b45d4559..5e0f209de744 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,31 +9,16 @@ */ public final class VmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/ * VmInstanceHybridIdentityMetadatas_ListByVirtualMachineInstance_MaximumSet_Gen.json */ /** * Sample code: VmInstanceHybridIdentityMetadatas_ListByVirtualMachineInstance_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ public static void vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceMaximumSet( - com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.vmInstanceHybridIdentityMetadatas() - .listByVirtualMachineInstance("gtgclehcbsyave", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmInstanceHybridIdentityMetadatas_ListByVirtualMachineInstance_MinimumSet_Gen.json - */ - /** - * Sample code: VmInstanceHybridIdentityMetadatas_ListByVirtualMachineInstance_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void vmInstanceHybridIdentityMetadatasListByVirtualMachineInstanceMinimumSet( - com.azure.resourcemanager.scvmm.ScvmmManager manager) { + com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.vmInstanceHybridIdentityMetadatas() .listByVirtualMachineInstance("gtgclehcbsyave", com.azure.core.util.Context.NONE); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersCreateOrUpdateSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersCreateOrUpdateSamples.java index 9e632ae4658a..1fb0c30673be 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersCreateOrUpdateSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -15,33 +15,15 @@ */ public final class VmmServersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmmServers_CreateOrUpdate_MinimumSet_Gen.json - */ - /** - * Sample code: VmmServers_CreateOrUpdate_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void vmmServersCreateOrUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.vmmServers() - .define("w") - .withRegion("hslxkyzktvwpqbypvs") - .withExistingResourceGroup("rgscvmm") - .withExtendedLocation(new ExtendedLocation()) - .create(); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmmServers_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VmmServers_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: VmmServers_CreateOrUpdate_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void vmmServersCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void vmmServersCreateOrUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.vmmServers() .define("-") .withRegion("hslxkyzktvwpqbypvs") diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersDeleteSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersDeleteSamples.java index 8b9955edf14d..f8a64eeebdae 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersDeleteSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -12,29 +12,14 @@ public final class VmmServersDeleteSamples { /* * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Delete_MaximumSet_Gen. - * json + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VmmServers_Delete_MaximumSet_Gen.json */ /** * Sample code: VmmServers_Delete_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void vmmServersDeleteMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void vmmServersDeleteMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.vmmServers().delete("rgscvmm", ".", ForceDelete.TRUE, com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Delete_MinimumSet_Gen. - * json - */ - /** - * Sample code: VmmServers_Delete_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void vmmServersDeleteMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.vmmServers().delete("rgscvmm", "8", null, com.azure.core.util.Context.NONE); - } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersGetByResourceGroupSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersGetByResourceGroupSamples.java index 046ab3dee5c2..5e1298be311c 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersGetByResourceGroupSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,30 +9,14 @@ */ public final class VmmServersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Get_MinimumSet_Gen. - * json - */ - /** - * Sample code: VmmServers_Get_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void vmmServersGetMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.vmmServers().getByResourceGroupWithResponse("rgscvmm", "D", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Get_MaximumSet_Gen. - * json + * x-ms-original-file: specification/scvmm/ScVmm.Management/examples/2023-10-07/VmmServers_Get_MaximumSet_Gen.json */ /** * Sample code: VmmServers_Get_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void vmmServersGetMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void vmmServersGetMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.vmmServers().getByResourceGroupWithResponse("rgscvmm", ".", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersListByResourceGroupSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersListByResourceGroupSamples.java index 2c2f9ce223d8..3db16b3c4c88 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersListByResourceGroupSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,28 +9,15 @@ */ public final class VmmServersListByResourceGroupSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmmServers_ListByResourceGroup_MinimumSet_Gen.json - */ - /** - * Sample code: VmmServers_ListByResourceGroup_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void vmmServersListByResourceGroupMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.vmmServers().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmmServers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VmmServers_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: VmmServers_ListByResourceGroup_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void vmmServersListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void vmmServersListByResourceGroupMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.vmmServers().listByResourceGroup("rgscvmm", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersListSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersListSamples.java index a1bc5c3ac9fb..440ff045b90b 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersListSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,28 +9,15 @@ */ public final class VmmServersListSamples { /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmmServers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VmmServers_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: VmmServers_ListBySubscription_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void vmmServersListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - manager.vmmServers().list(com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/ - * VmmServers_ListBySubscription_MinimumSet_Gen.json - */ - /** - * Sample code: VmmServers_ListBySubscription_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void vmmServersListBySubscriptionMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void vmmServersListBySubscriptionMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { manager.vmmServers().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersUpdateSamples.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersUpdateSamples.java index 8a8c727f1541..463f39e6bf3c 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersUpdateSamples.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/samples/java/com/azure/resourcemanager/scvmm/generated/VmmServersUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -14,32 +14,14 @@ public final class VmmServersUpdateSamples { /* * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Update_MinimumSet_Gen. - * json - */ - /** - * Sample code: VmmServers_Update_MinimumSet. - * - * @param manager Entry point to ScvmmManager. - */ - public static void vmmServersUpdateMinimumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { - VmmServer resource = manager.vmmServers() - .getByResourceGroupWithResponse("rgscvmm", "_", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } - - /* - * x-ms-original-file: - * specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/examples/VmmServers_Update_MaximumSet_Gen. - * json + * specification/scvmm/ScVmm.Management/examples/2023-10-07/VmmServers_Update_MaximumSet_Gen.json */ /** * Sample code: VmmServers_Update_MaximumSet. * - * @param manager Entry point to ScvmmManager. + * @param manager Entry point to SCVMMManager. */ - public static void vmmServersUpdateMaximumSet(com.azure.resourcemanager.scvmm.ScvmmManager manager) { + public static void vmmServersUpdateMaximumSet(com.azure.resourcemanager.scvmm.SCVMMManager manager) { VmmServer resource = manager.vmmServers() .getByResourceGroupWithResponse("rgscvmm", "Y", com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetInnerTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetInnerTests.java index 1bb21a97fe62..50d160fdf34d 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetInnerTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -16,30 +16,29 @@ public final class AvailabilitySetInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvailabilitySetInner model = BinaryData.fromString( - "{\"properties\":{\"availabilitySetName\":\"xy\",\"vmmServerId\":\"moyrxvwfudwpz\",\"provisioningState\":\"Accepted\"},\"extendedLocation\":{\"type\":\"dzhlrq\",\"name\":\"hckfrlhrx\"},\"location\":\"kyv\",\"tags\":{\"crnwbmeh\":\"anuzbpzkafkuw\"},\"id\":\"seyvj\",\"name\":\"srtslhspkdeem\",\"type\":\"ofmxagkvtmelmqkr\"}") + "{\"properties\":{\"availabilitySetName\":\"fdwoyuhh\",\"vmmServerId\":\"u\",\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"zbhd\",\"name\":\"mlmz\"},\"location\":\"oftrmaequia\",\"tags\":{\"nswhcc\":\"cslfaoqzpiyylha\",\"aivwitqscywu\":\"ph\"},\"id\":\"gwol\",\"name\":\"h\",\"type\":\"zbwemh\"}") .toObject(AvailabilitySetInner.class); - Assertions.assertEquals("kyv", model.location()); - Assertions.assertEquals("anuzbpzkafkuw", model.tags().get("crnwbmeh")); - Assertions.assertEquals("xy", model.properties().availabilitySetName()); - Assertions.assertEquals("moyrxvwfudwpz", model.properties().vmmServerId()); - Assertions.assertEquals("dzhlrq", model.extendedLocation().type()); - Assertions.assertEquals("hckfrlhrx", model.extendedLocation().name()); + Assertions.assertEquals("oftrmaequia", model.location()); + Assertions.assertEquals("cslfaoqzpiyylha", model.tags().get("nswhcc")); + Assertions.assertEquals("fdwoyuhh", model.properties().availabilitySetName()); + Assertions.assertEquals("u", model.properties().vmmServerId()); + Assertions.assertEquals("zbhd", model.extendedLocation().type()); + Assertions.assertEquals("mlmz", model.extendedLocation().name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AvailabilitySetInner model = new AvailabilitySetInner().withLocation("kyv") - .withTags(mapOf("crnwbmeh", "anuzbpzkafkuw")) - .withProperties( - new AvailabilitySetProperties().withAvailabilitySetName("xy").withVmmServerId("moyrxvwfudwpz")) - .withExtendedLocation(new ExtendedLocation().withType("dzhlrq").withName("hckfrlhrx")); + AvailabilitySetInner model = new AvailabilitySetInner().withLocation("oftrmaequia") + .withTags(mapOf("nswhcc", "cslfaoqzpiyylha", "aivwitqscywu", "ph")) + .withProperties(new AvailabilitySetProperties().withAvailabilitySetName("fdwoyuhh").withVmmServerId("u")) + .withExtendedLocation(new ExtendedLocation().withType("zbhd").withName("mlmz")); model = BinaryData.fromObject(model).toObject(AvailabilitySetInner.class); - Assertions.assertEquals("kyv", model.location()); - Assertions.assertEquals("anuzbpzkafkuw", model.tags().get("crnwbmeh")); - Assertions.assertEquals("xy", model.properties().availabilitySetName()); - Assertions.assertEquals("moyrxvwfudwpz", model.properties().vmmServerId()); - Assertions.assertEquals("dzhlrq", model.extendedLocation().type()); - Assertions.assertEquals("hckfrlhrx", model.extendedLocation().name()); + Assertions.assertEquals("oftrmaequia", model.location()); + Assertions.assertEquals("cslfaoqzpiyylha", model.tags().get("nswhcc")); + Assertions.assertEquals("fdwoyuhh", model.properties().availabilitySetName()); + Assertions.assertEquals("u", model.properties().vmmServerId()); + Assertions.assertEquals("zbhd", model.extendedLocation().type()); + Assertions.assertEquals("mlmz", model.extendedLocation().name()); } // Use "Map.of" if available diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetListItemTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetListItemTests.java index b04dc8eba205..486017fd2d09 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetListItemTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetListItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,17 +11,17 @@ public final class AvailabilitySetListItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AvailabilitySetListItem model - = BinaryData.fromString("{\"id\":\"hmofc\",\"name\":\"smy\"}").toObject(AvailabilitySetListItem.class); - Assertions.assertEquals("hmofc", model.id()); - Assertions.assertEquals("smy", model.name()); + AvailabilitySetListItem model = BinaryData.fromString("{\"id\":\"uzhlhkjoqrv\",\"name\":\"aatjinrvgoupmfi\"}") + .toObject(AvailabilitySetListItem.class); + Assertions.assertEquals("uzhlhkjoqrv", model.id()); + Assertions.assertEquals("aatjinrvgoupmfi", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AvailabilitySetListItem model = new AvailabilitySetListItem().withId("hmofc").withName("smy"); + AvailabilitySetListItem model = new AvailabilitySetListItem().withId("uzhlhkjoqrv").withName("aatjinrvgoupmfi"); model = BinaryData.fromObject(model).toObject(AvailabilitySetListItem.class); - Assertions.assertEquals("hmofc", model.id()); - Assertions.assertEquals("smy", model.name()); + Assertions.assertEquals("uzhlhkjoqrv", model.id()); + Assertions.assertEquals("aatjinrvgoupmfi", model.name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetListResultTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetListResultTests.java index edcf4a007b94..738358f0c1a8 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetListResultTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetListResultTests.java @@ -1,24 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.scvmm.models.AvailabilitySetListResult; +import com.azure.resourcemanager.scvmm.implementation.models.AvailabilitySetListResult; import org.junit.jupiter.api.Assertions; public final class AvailabilitySetListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvailabilitySetListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"availabilitySetName\":\"hrbnlankxmyskpbh\",\"vmmServerId\":\"btkcxywnytnrsyn\",\"provisioningState\":\"Updating\"},\"extendedLocation\":{\"type\":\"ybyxc\",\"name\":\"clha\"},\"location\":\"dbabp\",\"tags\":{\"yazttbtwwrqpue\":\"rqlfktsthsucocmn\",\"xibxujwbhqwalm\":\"ckzywbiexzfeyue\",\"ux\":\"zyoxaepdkzjan\",\"zt\":\"hdwbavxbniwdjs\"},\"id\":\"dbpgnxytxhp\",\"name\":\"xbzpfzab\",\"type\":\"lcuhxwtctyqiklb\"},{\"properties\":{\"availabilitySetName\":\"plwzbhvgyugu\",\"vmmServerId\":\"vmkfssxqu\",\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"type\":\"l\",\"name\":\"gsxnkjzkdeslpv\"},\"location\":\"pwiyig\",\"tags\":{\"upedeojnabckhs\":\"kdwzbaiuebbaumny\",\"ie\":\"txp\"},\"id\":\"tfhvpesapskrdqmh\",\"name\":\"jdhtldwkyzxu\",\"type\":\"tkncwsc\"},{\"properties\":{\"availabilitySetName\":\"lxotogtwrupq\",\"vmmServerId\":\"vnm\",\"provisioningState\":\"Updating\"},\"extendedLocation\":{\"type\":\"vce\",\"name\":\"eil\"},\"location\":\"notyfjfcnjbkcn\",\"tags\":{\"h\":\"bttk\",\"jtoqne\":\"wpn\",\"abgy\":\"mclfplphoxuscr\"},\"id\":\"psbjta\",\"name\":\"qugxywpmueefjzwf\",\"type\":\"kqujidsuyono\"}],\"nextLink\":\"laocqxtccmg\"}") + "{\"value\":[{\"properties\":{\"availabilitySetName\":\"hz\",\"vmmServerId\":\"csdtclusiypbs\",\"provisioningState\":\"Provisioning\"},\"extendedLocation\":{\"type\":\"gusl\",\"name\":\"adcy\"},\"location\":\"ukyhejhzis\",\"tags\":{\"pv\":\"pelol\"},\"id\":\"srp\",\"name\":\"vu\",\"type\":\"zraehtwd\"}],\"nextLink\":\"ftswibyrcdlbhsh\"}") .toObject(AvailabilitySetListResult.class); - Assertions.assertEquals("dbabp", model.value().get(0).location()); - Assertions.assertEquals("rqlfktsthsucocmn", model.value().get(0).tags().get("yazttbtwwrqpue")); - Assertions.assertEquals("hrbnlankxmyskpbh", model.value().get(0).properties().availabilitySetName()); - Assertions.assertEquals("btkcxywnytnrsyn", model.value().get(0).properties().vmmServerId()); - Assertions.assertEquals("ybyxc", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("clha", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals("ukyhejhzis", model.value().get(0).location()); + Assertions.assertEquals("pelol", model.value().get(0).tags().get("pv")); + Assertions.assertEquals("hz", model.value().get(0).properties().availabilitySetName()); + Assertions.assertEquals("csdtclusiypbs", model.value().get(0).properties().vmmServerId()); + Assertions.assertEquals("gusl", model.value().get(0).extendedLocation().type()); + Assertions.assertEquals("adcy", model.value().get(0).extendedLocation().name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetPropertiesTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetPropertiesTests.java index 3472679389c8..04f5bcb53ab1 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetPropertiesTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,20 +11,19 @@ public final class AvailabilitySetPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AvailabilitySetProperties model = BinaryData - .fromString( - "{\"availabilitySetName\":\"hvljuahaquh\",\"vmmServerId\":\"hmdua\",\"provisioningState\":\"Failed\"}") + AvailabilitySetProperties model = BinaryData.fromString( + "{\"availabilitySetName\":\"rsbrgzdwm\",\"vmmServerId\":\"eypqwdxggicccn\",\"provisioningState\":\"Canceled\"}") .toObject(AvailabilitySetProperties.class); - Assertions.assertEquals("hvljuahaquh", model.availabilitySetName()); - Assertions.assertEquals("hmdua", model.vmmServerId()); + Assertions.assertEquals("rsbrgzdwm", model.availabilitySetName()); + Assertions.assertEquals("eypqwdxggicccn", model.vmmServerId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AvailabilitySetProperties model - = new AvailabilitySetProperties().withAvailabilitySetName("hvljuahaquh").withVmmServerId("hmdua"); + = new AvailabilitySetProperties().withAvailabilitySetName("rsbrgzdwm").withVmmServerId("eypqwdxggicccn"); model = BinaryData.fromObject(model).toObject(AvailabilitySetProperties.class); - Assertions.assertEquals("hvljuahaquh", model.availabilitySetName()); - Assertions.assertEquals("hmdua", model.vmmServerId()); + Assertions.assertEquals("rsbrgzdwm", model.availabilitySetName()); + Assertions.assertEquals("eypqwdxggicccn", model.vmmServerId()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetTagsUpdateTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetTagsUpdateTests.java index 42678a4ec758..529dac824b7c 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetTagsUpdateTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetTagsUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -14,15 +14,15 @@ public final class AvailabilitySetTagsUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvailabilitySetTagsUpdate model - = BinaryData.fromString("{\"tags\":{\"g\":\"hgkfmin\"}}").toObject(AvailabilitySetTagsUpdate.class); - Assertions.assertEquals("hgkfmin", model.tags().get("g")); + = BinaryData.fromString("{\"tags\":{\"tvlz\":\"xmkttl\"}}").toObject(AvailabilitySetTagsUpdate.class); + Assertions.assertEquals("xmkttl", model.tags().get("tvlz")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AvailabilitySetTagsUpdate model = new AvailabilitySetTagsUpdate().withTags(mapOf("g", "hgkfmin")); + AvailabilitySetTagsUpdate model = new AvailabilitySetTagsUpdate().withTags(mapOf("tvlz", "xmkttl")); model = BinaryData.fromObject(model).toObject(AvailabilitySetTagsUpdate.class); - Assertions.assertEquals("hgkfmin", model.tags().get("g")); + Assertions.assertEquals("xmkttl", model.tags().get("tvlz")); } // Use "Map.of" if available diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsCreateOrUpdateMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsCreateOrUpdateMockTests.java index 3887dbafbaa3..cd0fd661b983 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsCreateOrUpdateMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,7 +9,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.AvailabilitySet; import com.azure.resourcemanager.scvmm.models.AvailabilitySetProperties; import com.azure.resourcemanager.scvmm.models.ExtendedLocation; @@ -25,31 +25,31 @@ public final class AvailabilitySetsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"availabilitySetName\":\"v\",\"vmmServerId\":\"eexavo\",\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"lecdmdqbw\",\"name\":\"pqtgsfjac\"},\"location\":\"lhhxudbxvodhtnsi\",\"tags\":{\"ckdlpag\":\"hzmme\",\"xdfgsftufqobr\":\"rcxfailcfxwmdb\",\"knh\":\"lnacgcc\"},\"id\":\"kizvytn\",\"name\":\"zvulj\",\"type\":\"aaeranokqgukk\"}"; + = "{\"properties\":{\"availabilitySetName\":\"vopwndyqleallk\",\"vmmServerId\":\"tkhlowkxxpvbr\",\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"zsyzfhotlh\",\"name\":\"cyychunsjlp\"},\"location\":\"twszhvvuic\",\"tags\":{\"dpyflubhv\":\"trrmhwrb\",\"lw\":\"glrocuy\",\"ooclutnp\":\"hmem\",\"ujxsglhsr\":\"memczjkmmyk\"},\"id\":\"rye\",\"name\":\"ylmbkzudni\",\"type\":\"rfih\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); AvailabilitySet response = manager.availabilitySets() - .define("yxkyxvx") - .withRegion("lnsrmffe") - .withExistingResourceGroup("jjidjk") - .withExtendedLocation(new ExtendedLocation().withType("jbnkpp").withName("nenlsvxeizzg")) - .withTags(mapOf("iymerteeammxqi", "ckt", "zddrt", "kk", "ojbmxv", "g", "cuijpxt", "vrefdeesv")) + .define("mxuq") + .withRegion("d") + .withExistingResourceGroup("viyfcaabeolhbhlv") + .withExtendedLocation(new ExtendedLocation().withType("qpvwgfst").withName("qyki")) + .withTags(mapOf("ycjimryvwgcwwpbm", "oafcluqvox")) .withProperties( - new AvailabilitySetProperties().withAvailabilitySetName("lbj").withVmmServerId("nljlageuaulx")) + new AvailabilitySetProperties().withAvailabilitySetName("xtkcudfbsfar").withVmmServerId("iowl")) .create(); - Assertions.assertEquals("lhhxudbxvodhtnsi", response.location()); - Assertions.assertEquals("hzmme", response.tags().get("ckdlpag")); - Assertions.assertEquals("v", response.properties().availabilitySetName()); - Assertions.assertEquals("eexavo", response.properties().vmmServerId()); - Assertions.assertEquals("lecdmdqbw", response.extendedLocation().type()); - Assertions.assertEquals("pqtgsfjac", response.extendedLocation().name()); + Assertions.assertEquals("twszhvvuic", response.location()); + Assertions.assertEquals("trrmhwrb", response.tags().get("dpyflubhv")); + Assertions.assertEquals("vopwndyqleallk", response.properties().availabilitySetName()); + Assertions.assertEquals("tkhlowkxxpvbr", response.properties().vmmServerId()); + Assertions.assertEquals("zsyzfhotlh", response.extendedLocation().type()); + Assertions.assertEquals("cyychunsjlp", response.extendedLocation().name()); } // Use "Map.of" if available diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsGetByResourceGroupWithResponseMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsGetByResourceGroupWithResponseMockTests.java index dae9a33777d5..ca72b6bdfc19 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,7 +9,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.AvailabilitySet; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,24 +21,24 @@ public final class AvailabilitySetsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"availabilitySetName\":\"qvmmbn\",\"vmmServerId\":\"fr\",\"provisioningState\":\"Accepted\"},\"extendedLocation\":{\"type\":\"zmegnitgvk\",\"name\":\"zyqdrfegcealzx\"},\"location\":\"cansymoyqhlwigd\",\"tags\":{\"ajuwas\":\"kbxgom\",\"hzbezkgi\":\"vdaeyyguxakjsq\",\"vvjskgfmocwahp\":\"sidxasicdd\"},\"id\":\"gat\",\"name\":\"eaahhvjhhn\",\"type\":\"kzyb\"}"; + = "{\"properties\":{\"availabilitySetName\":\"izjcpeog\",\"vmmServerId\":\"nmg\",\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"xddbhfhpfpaz\",\"name\":\"oywjxhpdulont\"},\"location\":\"np\",\"tags\":{\"jyoogwxh\":\"ehtuevrhr\",\"ugwbsreurfqkf\":\"sd\",\"vkyfedevjbosl\":\"arenlvhhtklnvnaf\",\"ymc\":\"qxypokkhminq\"},\"id\":\"ngnbdxxew\",\"name\":\"ninvudbchaqdt\",\"type\":\"qecrqctmxx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); AvailabilitySet response = manager.availabilitySets() - .getByResourceGroupWithResponse("m", "yefrpmpdnqqska", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("qtanarfdlpuk", "py", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("cansymoyqhlwigd", response.location()); - Assertions.assertEquals("kbxgom", response.tags().get("ajuwas")); - Assertions.assertEquals("qvmmbn", response.properties().availabilitySetName()); - Assertions.assertEquals("fr", response.properties().vmmServerId()); - Assertions.assertEquals("zmegnitgvk", response.extendedLocation().type()); - Assertions.assertEquals("zyqdrfegcealzx", response.extendedLocation().name()); + Assertions.assertEquals("np", response.location()); + Assertions.assertEquals("ehtuevrhr", response.tags().get("jyoogwxh")); + Assertions.assertEquals("izjcpeog", response.properties().availabilitySetName()); + Assertions.assertEquals("nmg", response.properties().vmmServerId()); + Assertions.assertEquals("xddbhfhpfpaz", response.extendedLocation().type()); + Assertions.assertEquals("oywjxhpdulont", response.extendedLocation().name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsListByResourceGroupMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsListByResourceGroupMockTests.java index 7a026d9a8f44..f3d5e86f8436 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsListByResourceGroupMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -10,7 +10,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.AvailabilitySet; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,23 +22,23 @@ public final class AvailabilitySetsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"availabilitySetName\":\"vmuvgpmu\",\"vmmServerId\":\"qsxvmhf\",\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"type\":\"yihsasbhudypohyu\",\"name\":\"slynsqyrpfoo\"},\"location\":\"lttymsjn\",\"tags\":{\"ilaxhn\":\"dnfwqzdzg\",\"wivkxo\":\"hqlyvijo\",\"ti\":\"zunbixx\"},\"id\":\"vcpwpgclrc\",\"name\":\"vtsoxf\",\"type\":\"kenx\"}]}"; + = "{\"value\":[{\"properties\":{\"availabilitySetName\":\"ytxzvtznapxbanno\",\"vmmServerId\":\"oxczytp\",\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"vroevytlyo\",\"name\":\"rrouuxvnsasbcry\"},\"location\":\"dizr\",\"tags\":{\"evfxzopjhbzxlioh\":\"obdxnazpmkmlm\",\"dtfgxqbawpcbb\":\"d\"},\"id\":\"zqcyknap\",\"name\":\"ofyuicd\",\"type\":\"zb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.availabilitySets().listByResourceGroup("hhzjhfj", com.azure.core.util.Context.NONE); + = manager.availabilitySets().listByResourceGroup("tddmf", com.azure.core.util.Context.NONE); - Assertions.assertEquals("lttymsjn", response.iterator().next().location()); - Assertions.assertEquals("dnfwqzdzg", response.iterator().next().tags().get("ilaxhn")); - Assertions.assertEquals("vmuvgpmu", response.iterator().next().properties().availabilitySetName()); - Assertions.assertEquals("qsxvmhf", response.iterator().next().properties().vmmServerId()); - Assertions.assertEquals("yihsasbhudypohyu", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("slynsqyrpfoo", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals("dizr", response.iterator().next().location()); + Assertions.assertEquals("obdxnazpmkmlm", response.iterator().next().tags().get("evfxzopjhbzxlioh")); + Assertions.assertEquals("ytxzvtznapxbanno", response.iterator().next().properties().availabilitySetName()); + Assertions.assertEquals("oxczytp", response.iterator().next().properties().vmmServerId()); + Assertions.assertEquals("vroevytlyo", response.iterator().next().extendedLocation().type()); + Assertions.assertEquals("rrouuxvnsasbcry", response.iterator().next().extendedLocation().name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsListMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsListMockTests.java index 64aba4807090..7234c12f87f6 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsListMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/AvailabilitySetsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -10,7 +10,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.AvailabilitySet; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,22 +22,22 @@ public final class AvailabilitySetsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"availabilitySetName\":\"cf\",\"vmmServerId\":\"rxgkne\",\"provisioningState\":\"Deleting\"},\"extendedLocation\":{\"type\":\"nzqodfvpg\",\"name\":\"oxgsgbpfgzdjtx\"},\"location\":\"flbqvgaq\",\"tags\":{\"cqusr\":\"a\",\"lduycv\":\"vetnwsdtutn\"},\"id\":\"zhyrmewipmve\",\"name\":\"dxukuqgsjjxundxg\",\"type\":\"etw\"}]}"; + = "{\"value\":[{\"properties\":{\"availabilitySetName\":\"wwgbdv\",\"vmmServerId\":\"idmhmwf\",\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"type\":\"muvapc\",\"name\":\"crrvweyo\"},\"location\":\"yyukphaimmo\",\"tags\":{\"apyyrmfsvbpavbo\":\"qboshbra\",\"gahxkumasjcaa\":\"fppdbwnu\",\"ehqepvufhbzehe\":\"fdmmcpug\",\"qnbldxe\":\"hoqhnl\"},\"id\":\"clgsc\",\"name\":\"orim\",\"type\":\"rsrrmoucsofldp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.availabilitySets().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("flbqvgaq", response.iterator().next().location()); - Assertions.assertEquals("a", response.iterator().next().tags().get("cqusr")); - Assertions.assertEquals("cf", response.iterator().next().properties().availabilitySetName()); - Assertions.assertEquals("rxgkne", response.iterator().next().properties().vmmServerId()); - Assertions.assertEquals("nzqodfvpg", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("oxgsgbpfgzdjtx", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals("yyukphaimmo", response.iterator().next().location()); + Assertions.assertEquals("qboshbra", response.iterator().next().tags().get("apyyrmfsvbpavbo")); + Assertions.assertEquals("wwgbdv", response.iterator().next().properties().availabilitySetName()); + Assertions.assertEquals("idmhmwf", response.iterator().next().properties().vmmServerId()); + Assertions.assertEquals("muvapc", response.iterator().next().extendedLocation().type()); + Assertions.assertEquals("crrvweyo", response.iterator().next().extendedLocation().name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CheckpointTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CheckpointTests.java index 6d45d53d67e9..697ee4dcd1dc 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CheckpointTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CheckpointTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -12,24 +12,11 @@ public final class CheckpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Checkpoint model = BinaryData.fromString( - "{\"parentCheckpointID\":\"qex\",\"checkpointID\":\"ocxscpaierhhbcs\",\"name\":\"ummajtjaod\",\"description\":\"bnbdxkqpxokajion\"}") + "{\"parentCheckpointID\":\"zxscyhwzdgirujb\",\"checkpointID\":\"omvzzbtd\",\"name\":\"vp\",\"description\":\"yujviylwdshfssn\"}") .toObject(Checkpoint.class); - Assertions.assertEquals("qex", model.parentCheckpointId()); - Assertions.assertEquals("ocxscpaierhhbcs", model.checkpointId()); - Assertions.assertEquals("ummajtjaod", model.name()); - Assertions.assertEquals("bnbdxkqpxokajion", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Checkpoint model = new Checkpoint().withParentCheckpointId("qex") - .withCheckpointId("ocxscpaierhhbcs") - .withName("ummajtjaod") - .withDescription("bnbdxkqpxokajion"); - model = BinaryData.fromObject(model).toObject(Checkpoint.class); - Assertions.assertEquals("qex", model.parentCheckpointId()); - Assertions.assertEquals("ocxscpaierhhbcs", model.checkpointId()); - Assertions.assertEquals("ummajtjaod", model.name()); - Assertions.assertEquals("bnbdxkqpxokajion", model.description()); + Assertions.assertEquals("zxscyhwzdgirujb", model.parentCheckpointId()); + Assertions.assertEquals("omvzzbtd", model.checkpointId()); + Assertions.assertEquals("vp", model.name()); + Assertions.assertEquals("yujviylwdshfssn", model.description()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudCapacityTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudCapacityTests.java index a58f33317a4d..6d67e45fc291 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudCapacityTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudCapacityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -12,13 +12,7 @@ public final class CloudCapacityTests { public void testDeserialize() throws Exception { CloudCapacity model = BinaryData .fromString( - "{\"cpuCount\":6996015407661494971,\"memoryMB\":3431932886317561144,\"vmCount\":5668149621351966733}") + "{\"cpuCount\":4013102962507329010,\"memoryMB\":8107487838702555165,\"vmCount\":8359250652631257424}") .toObject(CloudCapacity.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CloudCapacity model = new CloudCapacity(); - model = BinaryData.fromObject(model).toObject(CloudCapacity.class); - } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudInnerTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudInnerTests.java index 5237b761ae0f..69cc6a4c5023 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudInnerTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -16,32 +16,32 @@ public final class CloudInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudInner model = BinaryData.fromString( - "{\"properties\":{\"inventoryItemId\":\"ivkrtsw\",\"uuid\":\"qzvszjf\",\"vmmServerId\":\"vjfdx\",\"cloudName\":\"vetvt\",\"cloudCapacity\":{\"cpuCount\":3989982721308647052,\"memoryMB\":6414157962649478285,\"vmCount\":4668269847268047385},\"storageQoSPolicies\":[{\"name\":\"vxysl\",\"id\":\"hsfxoblytkb\",\"iopsMaximum\":1261547703522273379,\"iopsMinimum\":6710979409785542965,\"bandwidthLimit\":3820765705092103463,\"policyId\":\"vrnsvshqjohxc\"},{\"name\":\"bfovasrruvwbhsq\",\"id\":\"ubcgjbirxb\",\"iopsMaximum\":5990216587260133822,\"iopsMinimum\":9066736792193838127,\"bandwidthLimit\":2236269397517718606,\"policyId\":\"w\"},{\"name\":\"otftpvjzbexilz\",\"id\":\"fqqnvwpmqtaruo\",\"iopsMaximum\":6347695881931305668,\"iopsMinimum\":4269295539164353927,\"bandwidthLimit\":6824806013048148325,\"policyId\":\"jrybnwjewgdrjer\"},{\"name\":\"aen\",\"id\":\"eh\",\"iopsMaximum\":2926817929583465327,\"iopsMinimum\":781592580513390645,\"bandwidthLimit\":6991523348113589059,\"policyId\":\"nzdndslgna\"}],\"provisioningState\":\"Accepted\"},\"extendedLocation\":{\"type\":\"ynduha\",\"name\":\"qlkth\"},\"location\":\"aqolbgycduiertg\",\"tags\":{\"lqlfm\":\"mvaolps\"},\"id\":\"dnbbglzps\",\"name\":\"iydmcwyhzdxs\",\"type\":\"adbzmnvdfznud\"}") + "{\"properties\":{\"inventoryItemId\":\"dcc\",\"uuid\":\"h\",\"vmmServerId\":\"cnyejhkryhtnapcz\",\"cloudName\":\"okjye\",\"cloudCapacity\":{\"cpuCount\":7154563673254168299,\"memoryMB\":792921284197853575,\"vmCount\":1497253057352071787},\"storageQoSPolicies\":[{\"name\":\"hgejspodma\",\"id\":\"zyde\",\"iopsMaximum\":8061334738255036426,\"iopsMinimum\":8633403700755119900,\"bandwidthLimit\":2292906968066822359,\"policyId\":\"pmqnja\"},{\"name\":\"ixjsprozvcputeg\",\"id\":\"wmfdatscmdvpjhul\",\"iopsMaximum\":3419012052983951305,\"iopsMinimum\":1911547366406673085,\"bandwidthLimit\":6544521619215950850,\"policyId\":\"wfndiodjpsl\"}],\"provisioningState\":\"Provisioning\"},\"extendedLocation\":{\"type\":\"pvwryoqpsoacc\",\"name\":\"zakljlahbc\"},\"location\":\"ffdfdosygexpa\",\"tags\":{\"hcrzevd\":\"khmsbz\",\"qjbpfzfsin\":\"hlxaolthqtr\",\"wzo\":\"gvfcj\"},\"id\":\"xjtfelluwfzit\",\"name\":\"np\",\"type\":\"qfpjk\"}") .toObject(CloudInner.class); - Assertions.assertEquals("aqolbgycduiertg", model.location()); - Assertions.assertEquals("mvaolps", model.tags().get("lqlfm")); - Assertions.assertEquals("ivkrtsw", model.properties().inventoryItemId()); - Assertions.assertEquals("qzvszjf", model.properties().uuid()); - Assertions.assertEquals("vjfdx", model.properties().vmmServerId()); - Assertions.assertEquals("ynduha", model.extendedLocation().type()); - Assertions.assertEquals("qlkth", model.extendedLocation().name()); + Assertions.assertEquals("ffdfdosygexpa", model.location()); + Assertions.assertEquals("khmsbz", model.tags().get("hcrzevd")); + Assertions.assertEquals("dcc", model.properties().inventoryItemId()); + Assertions.assertEquals("h", model.properties().uuid()); + Assertions.assertEquals("cnyejhkryhtnapcz", model.properties().vmmServerId()); + Assertions.assertEquals("pvwryoqpsoacc", model.extendedLocation().type()); + Assertions.assertEquals("zakljlahbc", model.extendedLocation().name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CloudInner model = new CloudInner().withLocation("aqolbgycduiertg") - .withTags(mapOf("lqlfm", "mvaolps")) + CloudInner model = new CloudInner().withLocation("ffdfdosygexpa") + .withTags(mapOf("hcrzevd", "khmsbz", "qjbpfzfsin", "hlxaolthqtr", "wzo", "gvfcj")) .withProperties( - new CloudProperties().withInventoryItemId("ivkrtsw").withUuid("qzvszjf").withVmmServerId("vjfdx")) - .withExtendedLocation(new ExtendedLocation().withType("ynduha").withName("qlkth")); + new CloudProperties().withInventoryItemId("dcc").withUuid("h").withVmmServerId("cnyejhkryhtnapcz")) + .withExtendedLocation(new ExtendedLocation().withType("pvwryoqpsoacc").withName("zakljlahbc")); model = BinaryData.fromObject(model).toObject(CloudInner.class); - Assertions.assertEquals("aqolbgycduiertg", model.location()); - Assertions.assertEquals("mvaolps", model.tags().get("lqlfm")); - Assertions.assertEquals("ivkrtsw", model.properties().inventoryItemId()); - Assertions.assertEquals("qzvszjf", model.properties().uuid()); - Assertions.assertEquals("vjfdx", model.properties().vmmServerId()); - Assertions.assertEquals("ynduha", model.extendedLocation().type()); - Assertions.assertEquals("qlkth", model.extendedLocation().name()); + Assertions.assertEquals("ffdfdosygexpa", model.location()); + Assertions.assertEquals("khmsbz", model.tags().get("hcrzevd")); + Assertions.assertEquals("dcc", model.properties().inventoryItemId()); + Assertions.assertEquals("h", model.properties().uuid()); + Assertions.assertEquals("cnyejhkryhtnapcz", model.properties().vmmServerId()); + Assertions.assertEquals("pvwryoqpsoacc", model.extendedLocation().type()); + Assertions.assertEquals("zakljlahbc", model.extendedLocation().name()); } // Use "Map.of" if available diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudInventoryItemTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudInventoryItemTests.java index f63a0c8a6a0a..25d46e7967a8 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudInventoryItemTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudInventoryItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,7 +11,7 @@ public final class CloudInventoryItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudInventoryItem model = BinaryData.fromString( - "{\"inventoryType\":\"Cloud\",\"managedResourceId\":\"iivwzjbhyzsxjrka\",\"uuid\":\"trnegvmnvuqeqvld\",\"inventoryItemName\":\"astjbkkdmflvestm\",\"provisioningState\":\"Deleting\"}") + "{\"inventoryType\":\"Cloud\",\"managedResourceId\":\"hvxndzwmkrefajpj\",\"uuid\":\"wkqnyhg\",\"inventoryItemName\":\"j\",\"provisioningState\":\"Created\"}") .toObject(CloudInventoryItem.class); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudListResultTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudListResultTests.java index 5eaf51462015..a9c76bf6901a 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudListResultTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudListResultTests.java @@ -1,25 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.scvmm.models.CloudListResult; +import com.azure.resourcemanager.scvmm.implementation.models.CloudListResult; import org.junit.jupiter.api.Assertions; public final class CloudListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"inventoryItemId\":\"vfadmws\",\"uuid\":\"r\",\"vmmServerId\":\"xpvgo\",\"cloudName\":\"lf\",\"cloudCapacity\":{\"cpuCount\":3141876003584230040,\"memoryMB\":7679233497718407318,\"vmCount\":365691236561868989},\"storageQoSPolicies\":[{\"name\":\"k\",\"id\":\"ali\",\"iopsMaximum\":54169882983487255,\"iopsMinimum\":6778562451936395688,\"bandwidthLimit\":131133871653701525,\"policyId\":\"shsfwxosowzxcu\"}],\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"ooxdjebwpuc\",\"name\":\"fvovbvmeuecivy\"},\"location\":\"ce\",\"tags\":{\"x\":\"gjrwjueiotwmcdyt\",\"nrjawgqwg\":\"it\",\"klwndnhjdauwhv\":\"hniskxfbkpyc\",\"zbtd\":\"l\"},\"id\":\"xujznbmpowu\",\"name\":\"przqlveu\",\"type\":\"lupj\"},{\"properties\":{\"inventoryItemId\":\"fxobbcsws\",\"uuid\":\"jriplrbpbewtghf\",\"vmmServerId\":\"lcgwxzvlvqh\",\"cloudName\":\"begibtnmxiebwwa\",\"cloudCapacity\":{\"cpuCount\":6525239708045322977,\"memoryMB\":7151462329487158065,\"vmCount\":6136339981043942378},\"storageQoSPolicies\":[{\"name\":\"gwyzm\",\"id\":\"xongmtsavjcbpwxq\",\"iopsMaximum\":8746825901777553134,\"iopsMinimum\":5242300752961630966,\"bandwidthLimit\":2094806440159682328,\"policyId\":\"iuhprwmdyvxqta\"},{\"name\":\"iwwroyqbexrmc\",\"id\":\"bycnojvkn\",\"iopsMaximum\":3613497258699833567,\"iopsMinimum\":3533117585190130257,\"bandwidthLimit\":2097123359842677496,\"policyId\":\"pjyzhpv\"},{\"name\":\"zcjrvxdjzlmwlx\",\"id\":\"ug\",\"iopsMaximum\":8948733559998471922,\"iopsMinimum\":6856642650959955968,\"bandwidthLimit\":7305517021128699895,\"policyId\":\"nluthnnp\"}],\"provisioningState\":\"Accepted\"},\"extendedLocation\":{\"type\":\"peilpjzuaejxdu\",\"name\":\"skzbb\"},\"location\":\"zumveekgpwo\",\"tags\":{\"yofd\":\"kfpbs\",\"dttouwaboekqvkel\":\"luu\"},\"id\":\"smv\",\"name\":\"xwyjsflhhc\",\"type\":\"aln\"},{\"properties\":{\"inventoryItemId\":\"isxyawjoyaqcslyj\",\"uuid\":\"iidzyexzne\",\"vmmServerId\":\"xhnrztfolhb\",\"cloudName\":\"knalaulppg\",\"cloudCapacity\":{\"cpuCount\":4103777440618573927,\"memoryMB\":2247931820360130707,\"vmCount\":7714445110480603377},\"storageQoSPolicies\":[{\"name\":\"hpigv\",\"id\":\"ylgqgitxmedjvcsl\",\"iopsMaximum\":5849348987172300465,\"iopsMinimum\":3200172025781612030,\"bandwidthLimit\":1124312331123717294,\"policyId\":\"xgk\"}],\"provisioningState\":\"Canceled\"},\"extendedLocation\":{\"type\":\"ucnapkteoellwp\",\"name\":\"d\"},\"location\":\"pfqbuaceopzf\",\"tags\":{\"qeqxo\":\"huaoppp\",\"ahzxctobgbk\":\"z\"},\"id\":\"moizpos\",\"name\":\"mgrcfbu\",\"type\":\"rmfqjhhkxbpvj\"}],\"nextLink\":\"jhxxjyn\"}") + "{\"value\":[{\"properties\":{\"inventoryItemId\":\"wnzlljfmppeeb\",\"uuid\":\"gxsabkyq\",\"vmmServerId\":\"ujitcjcz\",\"cloudName\":\"evndh\",\"cloudCapacity\":{\"cpuCount\":7013302520561733407,\"memoryMB\":3966591499932194402,\"vmCount\":8041345972245934829},\"storageQoSPolicies\":[{\"name\":\"wrwjfeu\",\"id\":\"hutje\",\"iopsMaximum\":6178955280602456793,\"iopsMinimum\":8459479899003457966,\"bandwidthLimit\":6461823858730861400,\"policyId\":\"zdatqxhocdg\"},{\"name\":\"blgphuticn\",\"id\":\"kao\",\"iopsMaximum\":3411577258813776953,\"iopsMinimum\":2704667394155032427,\"bandwidthLimit\":6101131158833824091,\"policyId\":\"rokft\"},{\"name\":\"olniwpwcukjf\",\"id\":\"iawxklry\",\"iopsMaximum\":3346461090524524080,\"iopsMinimum\":5365450808227113003,\"bandwidthLimit\":8979659875393704693,\"policyId\":\"nddhsgcbacph\"}],\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"type\":\"tynqgoul\",\"name\":\"dlikwyqkgfgibma\"},\"location\":\"akeqs\",\"tags\":{\"ouf\":\"bzqqedqytbciq\"},\"id\":\"mmnkzsmodmgl\",\"name\":\"ugpbkw\",\"type\":\"mutduqktaps\"},{\"properties\":{\"inventoryItemId\":\"cuertu\",\"uuid\":\"dosvqwhbmdgbbjf\",\"vmmServerId\":\"gmbmbexppbh\",\"cloudName\":\"qrolfpf\",\"cloudCapacity\":{\"cpuCount\":9053922488113840190,\"memoryMB\":3204681718403888965,\"vmCount\":6569487787120678049},\"storageQoSPolicies\":[{\"name\":\"gzjaoyfhrtxilne\",\"id\":\"ujysvle\",\"iopsMaximum\":7063377078395052462,\"iopsMinimum\":6007575711591888285,\"bandwidthLimit\":6354733793545471287,\"policyId\":\"wjkcp\"},{\"name\":\"nwbxgjvtbvpyssz\",\"id\":\"rujqg\",\"iopsMaximum\":7498180337517236297,\"iopsMinimum\":9055326959685278668,\"bandwidthLimit\":7503430012540655419,\"policyId\":\"zw\"},{\"name\":\"g\",\"id\":\"tnwu\",\"iopsMaximum\":6026163120171622136,\"iopsMinimum\":435793093682081047,\"bandwidthLimit\":9096676301613856248,\"policyId\":\"ckyfih\"},{\"name\":\"idf\",\"id\":\"wdzuhtymwisd\",\"iopsMaximum\":9204546244351616694,\"iopsMinimum\":1735908186849769210,\"bandwidthLimit\":263357956670416647,\"policyId\":\"waopvkmijcmmxd\"}],\"provisioningState\":\"Updating\"},\"extendedLocation\":{\"type\":\"fsrpymzidnse\",\"name\":\"xtbzsgfyccsne\"},\"location\":\"dwzjeiach\",\"tags\":{\"eeh\":\"sflnrosfqp\",\"swjdkirso\":\"zvypyqrimzinp\"},\"id\":\"dqxhcrmnohjtckwh\",\"name\":\"soifiyipjxsqw\",\"type\":\"gr\"},{\"properties\":{\"inventoryItemId\":\"norcjxvsnbyxqab\",\"uuid\":\"ocpcy\",\"vmmServerId\":\"urzafb\",\"cloudName\":\"j\",\"cloudCapacity\":{\"cpuCount\":1680069633144252607,\"memoryMB\":308024076308805412,\"vmCount\":3089454434341708656},\"storageQoSPolicies\":[{\"name\":\"bqidtqaj\",\"id\":\"ulpkudjkrl\",\"iopsMaximum\":5301305904738744047,\"iopsMinimum\":7860487098364913435,\"bandwidthLimit\":425051225083018289,\"policyId\":\"qex\"}],\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"xscpaierhhbc\",\"name\":\"l\"},\"location\":\"majtjaod\",\"tags\":{\"pxokajionp\":\"nbdxk\",\"dg\":\"mexgstxgcp\",\"djwzrlov\":\"aajrm\",\"qsqsy\":\"clwhijcoejctbz\"},\"id\":\"bkbfkgukdkex\",\"name\":\"ppofmxaxcfjpgdd\",\"type\":\"ocjjxhvpmouexh\"}],\"nextLink\":\"xibqeojnx\"}") .toObject(CloudListResult.class); - Assertions.assertEquals("ce", model.value().get(0).location()); - Assertions.assertEquals("gjrwjueiotwmcdyt", model.value().get(0).tags().get("x")); - Assertions.assertEquals("vfadmws", model.value().get(0).properties().inventoryItemId()); - Assertions.assertEquals("r", model.value().get(0).properties().uuid()); - Assertions.assertEquals("xpvgo", model.value().get(0).properties().vmmServerId()); - Assertions.assertEquals("ooxdjebwpuc", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("fvovbvmeuecivy", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals("akeqs", model.value().get(0).location()); + Assertions.assertEquals("bzqqedqytbciq", model.value().get(0).tags().get("ouf")); + Assertions.assertEquals("wnzlljfmppeeb", model.value().get(0).properties().inventoryItemId()); + Assertions.assertEquals("gxsabkyq", model.value().get(0).properties().uuid()); + Assertions.assertEquals("ujitcjcz", model.value().get(0).properties().vmmServerId()); + Assertions.assertEquals("tynqgoul", model.value().get(0).extendedLocation().type()); + Assertions.assertEquals("dlikwyqkgfgibma", model.value().get(0).extendedLocation().name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudPropertiesTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudPropertiesTests.java index 6fb887667bf0..b1dba4fae5d7 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudPropertiesTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -12,21 +12,21 @@ public final class CloudPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudProperties model = BinaryData.fromString( - "{\"inventoryItemId\":\"dvxzbncblylpst\",\"uuid\":\"hh\",\"vmmServerId\":\"rzdzucerscdnt\",\"cloudName\":\"vfiwjmygtdss\",\"cloudCapacity\":{\"cpuCount\":4029880181936290822,\"memoryMB\":2056289881259732229,\"vmCount\":3002295961372287593},\"storageQoSPolicies\":[{\"name\":\"qsemwabne\",\"id\":\"hhszh\",\"iopsMaximum\":6111204244847646570,\"iopsMinimum\":6033840789921327792,\"bandwidthLimit\":2247461655033792564,\"policyId\":\"wmbesldnkw\"}],\"provisioningState\":\"Succeeded\"}") + "{\"inventoryItemId\":\"xofpdvhpfxxypi\",\"uuid\":\"nmayhuybb\",\"vmmServerId\":\"odepoogin\",\"cloudName\":\"amiheognarxz\",\"cloudCapacity\":{\"cpuCount\":2309881013133917021,\"memoryMB\":6633907010036268496,\"vmCount\":499757830084683995},\"storageQoSPolicies\":[{\"name\":\"ciqihnhung\",\"id\":\"jzrnf\",\"iopsMaximum\":7935280975021078838,\"iopsMinimum\":642697020628687872,\"bandwidthLimit\":1756077940432608188,\"policyId\":\"zfkufubljofx\"}],\"provisioningState\":\"Deleting\"}") .toObject(CloudProperties.class); - Assertions.assertEquals("dvxzbncblylpst", model.inventoryItemId()); - Assertions.assertEquals("hh", model.uuid()); - Assertions.assertEquals("rzdzucerscdnt", model.vmmServerId()); + Assertions.assertEquals("xofpdvhpfxxypi", model.inventoryItemId()); + Assertions.assertEquals("nmayhuybb", model.uuid()); + Assertions.assertEquals("odepoogin", model.vmmServerId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CloudProperties model = new CloudProperties().withInventoryItemId("dvxzbncblylpst") - .withUuid("hh") - .withVmmServerId("rzdzucerscdnt"); + CloudProperties model = new CloudProperties().withInventoryItemId("xofpdvhpfxxypi") + .withUuid("nmayhuybb") + .withVmmServerId("odepoogin"); model = BinaryData.fromObject(model).toObject(CloudProperties.class); - Assertions.assertEquals("dvxzbncblylpst", model.inventoryItemId()); - Assertions.assertEquals("hh", model.uuid()); - Assertions.assertEquals("rzdzucerscdnt", model.vmmServerId()); + Assertions.assertEquals("xofpdvhpfxxypi", model.inventoryItemId()); + Assertions.assertEquals("nmayhuybb", model.uuid()); + Assertions.assertEquals("odepoogin", model.vmmServerId()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudTagsUpdateTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudTagsUpdateTests.java index 6558a4444b35..4720f41e907b 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudTagsUpdateTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudTagsUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -13,18 +13,18 @@ public final class CloudTagsUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CloudTagsUpdate model = BinaryData.fromString( - "{\"tags\":{\"lahb\":\"fttsttk\",\"qtgqqqxhrnxr\":\"actxtgzukxitm\",\"okqdzfvaz\":\"cpjuisa\",\"ajlkatnw\":\"vjlfrqtt\"}}") - .toObject(CloudTagsUpdate.class); - Assertions.assertEquals("fttsttk", model.tags().get("lahb")); + CloudTagsUpdate model + = BinaryData.fromString("{\"tags\":{\"skcqvkocrcjd\":\"clxxwrljdo\",\"lssai\":\"wtnhxbnjbiksqr\"}}") + .toObject(CloudTagsUpdate.class); + Assertions.assertEquals("clxxwrljdo", model.tags().get("skcqvkocrcjd")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CloudTagsUpdate model = new CloudTagsUpdate().withTags( - mapOf("lahb", "fttsttk", "qtgqqqxhrnxr", "actxtgzukxitm", "okqdzfvaz", "cpjuisa", "ajlkatnw", "vjlfrqtt")); + CloudTagsUpdate model + = new CloudTagsUpdate().withTags(mapOf("skcqvkocrcjd", "clxxwrljdo", "lssai", "wtnhxbnjbiksqr")); model = BinaryData.fromObject(model).toObject(CloudTagsUpdate.class); - Assertions.assertEquals("fttsttk", model.tags().get("lahb")); + Assertions.assertEquals("clxxwrljdo", model.tags().get("skcqvkocrcjd")); } // Use "Map.of" if available diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudsCreateOrUpdateMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudsCreateOrUpdateMockTests.java index 1de594c9d999..a2fdf7cf65fc 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudsCreateOrUpdateMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudsCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,7 +9,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.Cloud; import com.azure.resourcemanager.scvmm.models.CloudProperties; import com.azure.resourcemanager.scvmm.models.ExtendedLocation; @@ -25,33 +25,34 @@ public final class CloudsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"inventoryItemId\":\"vpbdbzqgq\",\"uuid\":\"hedsvqwthmkyib\",\"vmmServerId\":\"sihsgqcwdhohsd\",\"cloudName\":\"cdzsu\",\"cloudCapacity\":{\"cpuCount\":7117215511818462498,\"memoryMB\":6915667068183243162,\"vmCount\":7808079684010366581},\"storageQoSPolicies\":[{\"name\":\"pcvhdbevwqqxeys\",\"id\":\"nqzi\",\"iopsMaximum\":4259363860416490102,\"iopsMinimum\":1183436721296067733,\"bandwidthLimit\":4864080345534775106,\"policyId\":\"xeqoc\"},{\"name\":\"mygvkzqkj\",\"id\":\"okbzef\",\"iopsMaximum\":2200731602352647038,\"iopsMinimum\":8813876269554898921,\"bandwidthLimit\":4509675475426678163,\"policyId\":\"e\"},{\"name\":\"q\",\"id\":\"kwv\",\"iopsMaximum\":5672897057063193378,\"iopsMinimum\":1846786260892387923,\"bandwidthLimit\":4435864913823432479,\"policyId\":\"xzmqpnodawop\"},{\"name\":\"ewjptmcg\",\"id\":\"ostzelndlatu\",\"iopsMaximum\":6922803194395266051,\"iopsMinimum\":879063471631285932,\"bandwidthLimit\":8308748747055589302,\"policyId\":\"hrbbpneqvcwwyy\"}],\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"chpp\",\"name\":\"rsnm\"},\"location\":\"ayzejnhlbkpbz\",\"tags\":{\"echndbnwieholew\":\"iljhahz\",\"efqsfapaqtferrqw\":\"wiuub\",\"kmfx\":\"x\"},\"id\":\"pjwogqqno\",\"name\":\"pud\",\"type\":\"dabtqwp\"}"; + = "{\"properties\":{\"inventoryItemId\":\"hsasbhu\",\"uuid\":\"pohyuemslynsqyr\",\"vmmServerId\":\"oobrlttyms\",\"cloudName\":\"ygqdnfwqzdz\",\"cloudCapacity\":{\"cpuCount\":1556043116493772567,\"memoryMB\":6405621697730161014,\"vmCount\":8809199142384262726},\"storageQoSPolicies\":[{\"name\":\"ijouwivkxoyzunb\",\"id\":\"xrtikvcpwpgclr\",\"iopsMaximum\":6730804470286938055,\"iopsMinimum\":7967732133967586112,\"bandwidthLimit\":5451887377472245987,\"policyId\":\"nxpmyyefrpmpdnq\"}],\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"waoqvmmb\",\"name\":\"qfr\"},\"location\":\"lkzmegnitgvkxl\",\"tags\":{\"gcealzxwh\":\"drf\",\"yqhlwigdivbkbx\":\"ansym\",\"wasqvdaeyyg\":\"omfaj\",\"zkgimsid\":\"xakjsqzhzb\"},\"id\":\"asi\",\"name\":\"ddyvvjskgfmo\",\"type\":\"wa\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); Cloud response = manager.clouds() - .define("hpc") - .withRegion("uciqdsme") - .withExistingResourceGroup("lzo") - .withExtendedLocation(new ExtendedLocation().withType("ypoq").withName("hlqhykprlpy")) - .withTags(mapOf("asiibmiybnnust", "tdfuxt", "nmgixh", "nlj", "oudorhcgyyp", "mavmq", "hu", "otwypundmb")) - .withProperties(new CloudProperties().withInventoryItemId("mdxotngfdgu") - .withUuid("yzihgrkyuizabsn") - .withVmmServerId("pphoj")) + .define("wpfaj") + .withRegion("rxgkne") + .withExistingResourceGroup("lkb") + .withExtendedLocation(new ExtendedLocation().withType("jcivmmg").withName("cf")) + .withTags(mapOf("oxgsgbpfgzdjtx", "inzqodfvpgs", "qvlgafcqusrdvetn", "zflbqvg", "uzhyrmewipmvekdx", + "sdtutnwlduyc")) + .withProperties(new CloudProperties().withInventoryItemId("ltlwtjjguktalhs") + .withUuid("kcdmxzrpoaimln") + .withVmmServerId("aaomylweazu")) .create(); - Assertions.assertEquals("ayzejnhlbkpbz", response.location()); - Assertions.assertEquals("iljhahz", response.tags().get("echndbnwieholew")); - Assertions.assertEquals("vpbdbzqgq", response.properties().inventoryItemId()); - Assertions.assertEquals("hedsvqwthmkyib", response.properties().uuid()); - Assertions.assertEquals("sihsgqcwdhohsd", response.properties().vmmServerId()); - Assertions.assertEquals("chpp", response.extendedLocation().type()); - Assertions.assertEquals("rsnm", response.extendedLocation().name()); + Assertions.assertEquals("lkzmegnitgvkxl", response.location()); + Assertions.assertEquals("drf", response.tags().get("gcealzxwh")); + Assertions.assertEquals("hsasbhu", response.properties().inventoryItemId()); + Assertions.assertEquals("pohyuemslynsqyr", response.properties().uuid()); + Assertions.assertEquals("oobrlttyms", response.properties().vmmServerId()); + Assertions.assertEquals("waoqvmmb", response.extendedLocation().type()); + Assertions.assertEquals("qfr", response.extendedLocation().name()); } // Use "Map.of" if available diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudsGetByResourceGroupWithResponseMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudsGetByResourceGroupWithResponseMockTests.java index eb42aeaf6304..2e2d5de43e9f 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudsGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,7 +9,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.Cloud; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,25 +21,25 @@ public final class CloudsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"inventoryItemId\":\"izbfhfovvacq\",\"uuid\":\"tuodxeszabbelaw\",\"vmmServerId\":\"ua\",\"cloudName\":\"zkwrrwoyc\",\"cloudCapacity\":{\"cpuCount\":3200915566855533052,\"memoryMB\":2884775904635449436,\"vmCount\":2467395859679855860},\"storageQoSPolicies\":[{\"name\":\"ywuhpsvfuur\",\"id\":\"lwexxwl\",\"iopsMaximum\":5454533877839303334,\"iopsMinimum\":9199175945719514627,\"bandwidthLimit\":6869025053356818243,\"policyId\":\"gepqtybbwwpg\"},{\"name\":\"k\",\"id\":\"zyvli\",\"iopsMaximum\":7764041210336820295,\"iopsMinimum\":8287274670039182556,\"bandwidthLimit\":848870221890738563,\"policyId\":\"nxm\"},{\"name\":\"uxswqrntvl\",\"id\":\"jpsttexoq\",\"iopsMaximum\":5287210425103137929,\"iopsMinimum\":5284910564957842889,\"bandwidthLimit\":62183573876209376,\"policyId\":\"uncuw\"}],\"provisioningState\":\"Provisioning\"},\"extendedLocation\":{\"type\":\"kcdqzhlct\",\"name\":\"unqndyfpchrqb\"},\"location\":\"jrcg\",\"tags\":{\"qqoli\":\"dcwboxjum\",\"aiouaubrjt\":\"r\",\"fuojrngif\":\"oq\"},\"id\":\"rzpasccbiuimzdly\",\"name\":\"dfqwmkyoq\",\"type\":\"fdvruz\"}"; + = "{\"properties\":{\"inventoryItemId\":\"ur\",\"uuid\":\"laecxndticok\",\"vmmServerId\":\"zmlqtmldgxo\",\"cloudName\":\"irclnpk\",\"cloudCapacity\":{\"cpuCount\":8297039045609901437,\"memoryMB\":4767053638441284929,\"vmCount\":2638896199399411626},\"storageQoSPolicies\":[{\"name\":\"vjlboxqvk\",\"id\":\"mxho\",\"iopsMaximum\":1283948358684815684,\"iopsMinimum\":8975628624340233031,\"bandwidthLimit\":2742511706808371729,\"policyId\":\"mbnraauzzp\"}],\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"ysdzhez\",\"name\":\"vaiqyuvvf\"},\"location\":\"kphhq\",\"tags\":{\"uyav\":\"vyl\",\"tijfybvp\":\"uwmncs\",\"b\":\"ekrsgs\"},\"id\":\"huzqgn\",\"name\":\"dgkynscliqhzvhxn\",\"type\":\"omtkub\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); Cloud response = manager.clouds() - .getByResourceGroupWithResponse("xcudchxgsr", "oldforobw", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("fvaawzqa", "f", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jrcg", response.location()); - Assertions.assertEquals("dcwboxjum", response.tags().get("qqoli")); - Assertions.assertEquals("izbfhfovvacq", response.properties().inventoryItemId()); - Assertions.assertEquals("tuodxeszabbelaw", response.properties().uuid()); - Assertions.assertEquals("ua", response.properties().vmmServerId()); - Assertions.assertEquals("kcdqzhlct", response.extendedLocation().type()); - Assertions.assertEquals("unqndyfpchrqb", response.extendedLocation().name()); + Assertions.assertEquals("kphhq", response.location()); + Assertions.assertEquals("vyl", response.tags().get("uyav")); + Assertions.assertEquals("ur", response.properties().inventoryItemId()); + Assertions.assertEquals("laecxndticok", response.properties().uuid()); + Assertions.assertEquals("zmlqtmldgxo", response.properties().vmmServerId()); + Assertions.assertEquals("ysdzhez", response.extendedLocation().type()); + Assertions.assertEquals("vaiqyuvvf", response.extendedLocation().name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudsListByResourceGroupMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudsListByResourceGroupMockTests.java index 5ef7956cdb1d..93769eeb0b6a 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudsListByResourceGroupMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudsListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -10,7 +10,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.Cloud; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,24 +22,23 @@ public final class CloudsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"inventoryItemId\":\"wm\",\"uuid\":\"mebwjscjpah\",\"vmmServerId\":\"veabfqxnmwmqtib\",\"cloudName\":\"ijddtvqc\",\"cloudCapacity\":{\"cpuCount\":3995165957523237174,\"memoryMB\":4810009338488600409,\"vmCount\":3344718342128535077},\"storageQoSPolicies\":[{\"name\":\"eekpndz\",\"id\":\"pmudqmeqwig\",\"iopsMaximum\":1602038748333470502,\"iopsMinimum\":2895883377575243380,\"bandwidthLimit\":191813532014871887,\"policyId\":\"e\"},{\"name\":\"pmzznrtffya\",\"id\":\"tmhheioqa\",\"iopsMaximum\":730726349973993242,\"iopsMinimum\":7801083553230678005,\"bandwidthLimit\":4758857143001364501,\"policyId\":\"xpdlcgqlsis\"},{\"name\":\"qfrddgam\",\"id\":\"hiosrsjuiv\",\"iopsMaximum\":455092351262610963,\"iopsMinimum\":572361619606348416,\"bandwidthLimit\":7426719311659683930,\"policyId\":\"hcz\"},{\"name\":\"rxzbujr\",\"id\":\"hqvwrevkhgnlnzon\",\"iopsMaximum\":432499304266915638,\"iopsMinimum\":2005313689678276388,\"bandwidthLimit\":6253741023246690907,\"policyId\":\"jtszcof\"}],\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"tdhgbjkvrelj\",\"name\":\"murvzm\"},\"location\":\"vuanashcxlp\",\"tags\":{\"zsdbccxjmon\":\"rbdkelvidiz\",\"uqj\":\"dgnwncypuuwwlt\"},\"id\":\"tzenk\",\"name\":\"if\",\"type\":\"zhmkdasvflyh\"}]}"; + = "{\"value\":[{\"properties\":{\"inventoryItemId\":\"zxhi\",\"uuid\":\"rbbcevq\",\"vmmServerId\":\"tltdhlfkqojpy\",\"cloudName\":\"gtrd\",\"cloudCapacity\":{\"cpuCount\":3498296046488814783,\"memoryMB\":8776785011455694995,\"vmCount\":6054984412383572813},\"storageQoSPolicies\":[{\"name\":\"ysuxmprafwgck\",\"id\":\"cxvdfffwafqrouda\",\"iopsMaximum\":5249211644397946556,\"iopsMinimum\":344434821403021626,\"bandwidthLimit\":2567537558648922186,\"policyId\":\"unzo\"},{\"name\":\"dhcxgkmoy\",\"id\":\"dyuib\",\"iopsMaximum\":2557149039383671323,\"iopsMinimum\":2086600607092923630,\"bandwidthLimit\":4187703770591831791,\"policyId\":\"vfcjnaeoisrvhmg\"}],\"provisioningState\":\"Updating\"},\"extendedLocation\":{\"type\":\"ukiscvwmzhw\",\"name\":\"efaxvxilc\"},\"location\":\"gnhnzeyq\",\"tags\":{\"dbeesmie\":\"jfzqlqhycavodgg\",\"wqfbylyrfgiagt\":\"nlrariaawiuagy\",\"zjvusfzldmo\":\"ojocqwogf\",\"own\":\"uxylfsbtkadpy\"},\"id\":\"tgkbugrjqctojc\",\"name\":\"isofieypefojyqd\",\"type\":\"cuplcplcwkhih\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.clouds().listByResourceGroup("fuzboyjathwtzolb", com.azure.core.util.Context.NONE); + PagedIterable response = manager.clouds().listByResourceGroup("tppn", com.azure.core.util.Context.NONE); - Assertions.assertEquals("vuanashcxlp", response.iterator().next().location()); - Assertions.assertEquals("rbdkelvidiz", response.iterator().next().tags().get("zsdbccxjmon")); - Assertions.assertEquals("wm", response.iterator().next().properties().inventoryItemId()); - Assertions.assertEquals("mebwjscjpah", response.iterator().next().properties().uuid()); - Assertions.assertEquals("veabfqxnmwmqtib", response.iterator().next().properties().vmmServerId()); - Assertions.assertEquals("tdhgbjkvrelj", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("murvzm", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals("gnhnzeyq", response.iterator().next().location()); + Assertions.assertEquals("jfzqlqhycavodgg", response.iterator().next().tags().get("dbeesmie")); + Assertions.assertEquals("zxhi", response.iterator().next().properties().inventoryItemId()); + Assertions.assertEquals("rbbcevq", response.iterator().next().properties().uuid()); + Assertions.assertEquals("tltdhlfkqojpy", response.iterator().next().properties().vmmServerId()); + Assertions.assertEquals("ukiscvwmzhw", response.iterator().next().extendedLocation().type()); + Assertions.assertEquals("efaxvxilc", response.iterator().next().extendedLocation().name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudsListMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudsListMockTests.java index 42a9a58e3b4b..2a1107ab744f 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudsListMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/CloudsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -10,7 +10,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.Cloud; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,23 +22,23 @@ public final class CloudsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"inventoryItemId\":\"vbroylaxxu\",\"uuid\":\"disdosfjbjsvgj\",\"vmmServerId\":\"hryvy\",\"cloudName\":\"t\",\"cloudCapacity\":{\"cpuCount\":87313434350967654,\"memoryMB\":4633131497917723717,\"vmCount\":3545804393254840755},\"storageQoSPolicies\":[{\"name\":\"tmvpdvjdhtt\",\"id\":\"efedxihchrphkm\",\"iopsMaximum\":3787352834540927110,\"iopsMinimum\":3614573403784565190,\"bandwidthLimit\":2282885407091220390,\"policyId\":\"bg\"},{\"name\":\"kylkdghrj\",\"id\":\"utlwxezwzhok\",\"iopsMaximum\":7624149688717867785,\"iopsMinimum\":2062475772346184475,\"bandwidthLimit\":5204919757963226438,\"policyId\":\"hgppipifhpfeoa\"},{\"name\":\"gcxtxj\",\"id\":\"heafidlt\",\"iopsMaximum\":2005438621034770208,\"iopsMinimum\":5739341399228629925,\"bandwidthLimit\":3530960182442104157,\"policyId\":\"h\"},{\"name\":\"ftxfkf\",\"id\":\"gpr\",\"iopsMaximum\":2543866141895923842,\"iopsMinimum\":5566902972165714794,\"bandwidthLimit\":7370264401437151122,\"policyId\":\"tgdqohmcwsldriz\"}],\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"bra\",\"name\":\"libph\"},\"location\":\"zmizakakan\",\"tags\":{\"joylh\":\"dnjzh\"},\"id\":\"lmuoyxprimrsopte\",\"name\":\"cjmeislstvasy\",\"type\":\"wxdzaumweoohgu\"}]}"; + = "{\"value\":[{\"properties\":{\"inventoryItemId\":\"hzdsqtzbsrgnow\",\"uuid\":\"hfgmvecactxm\",\"vmmServerId\":\"teyowclu\",\"cloudName\":\"vekqvgqo\",\"cloudCapacity\":{\"cpuCount\":2106648754409404282,\"memoryMB\":5876039921440092751,\"vmCount\":6985401659827260093},\"storageQoSPolicies\":[{\"name\":\"kfxcvhrfs\",\"id\":\"uagrttikteusqc\",\"iopsMaximum\":9209886410663760135,\"iopsMinimum\":6751807886056090415,\"bandwidthLimit\":639173288435171246,\"policyId\":\"affmmfblcqc\"},{\"name\":\"bgq\",\"id\":\"rtalmet\",\"iopsMaximum\":5036411923058739652,\"iopsMinimum\":4960961854353669285,\"bandwidthLimit\":2990565410160748386,\"policyId\":\"hrmooi\"}],\"provisioningState\":\"Accepted\"},\"extendedLocation\":{\"type\":\"ypxiutcxap\",\"name\":\"y\"},\"location\":\"etoge\",\"tags\":{\"jcjbt\":\"xslhvnhlabrqnkk\",\"qbeitpkxztmoob\":\"gaehvvibrxjjst\"},\"id\":\"lftidgfcwqmpim\",\"name\":\"qxzhem\",\"type\":\"yhohujswtwkozzwc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.clouds().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("zmizakakan", response.iterator().next().location()); - Assertions.assertEquals("dnjzh", response.iterator().next().tags().get("joylh")); - Assertions.assertEquals("vbroylaxxu", response.iterator().next().properties().inventoryItemId()); - Assertions.assertEquals("disdosfjbjsvgj", response.iterator().next().properties().uuid()); - Assertions.assertEquals("hryvy", response.iterator().next().properties().vmmServerId()); - Assertions.assertEquals("bra", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("libph", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals("etoge", response.iterator().next().location()); + Assertions.assertEquals("xslhvnhlabrqnkk", response.iterator().next().tags().get("jcjbt")); + Assertions.assertEquals("hzdsqtzbsrgnow", response.iterator().next().properties().inventoryItemId()); + Assertions.assertEquals("hfgmvecactxm", response.iterator().next().properties().uuid()); + Assertions.assertEquals("teyowclu", response.iterator().next().properties().vmmServerId()); + Assertions.assertEquals("ypxiutcxap", response.iterator().next().extendedLocation().type()); + Assertions.assertEquals("y", response.iterator().next().extendedLocation().name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/ExtendedLocationTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/ExtendedLocationTests.java index a18e18ebec92..17f4777dfcd8 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/ExtendedLocationTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/ExtendedLocationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,17 +11,17 @@ public final class ExtendedLocationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExtendedLocation model - = BinaryData.fromString("{\"type\":\"mexgstxgcp\",\"name\":\"gmaajrm\"}").toObject(ExtendedLocation.class); - Assertions.assertEquals("mexgstxgcp", model.type()); - Assertions.assertEquals("gmaajrm", model.name()); + ExtendedLocation model = BinaryData.fromString("{\"type\":\"pikxwczbyscnpqxu\",\"name\":\"vyq\"}") + .toObject(ExtendedLocation.class); + Assertions.assertEquals("pikxwczbyscnpqxu", model.type()); + Assertions.assertEquals("vyq", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExtendedLocation model = new ExtendedLocation().withType("mexgstxgcp").withName("gmaajrm"); + ExtendedLocation model = new ExtendedLocation().withType("pikxwczbyscnpqxu").withName("vyq"); model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("mexgstxgcp", model.type()); - Assertions.assertEquals("gmaajrm", model.name()); + Assertions.assertEquals("pikxwczbyscnpqxu", model.type()); + Assertions.assertEquals("vyq", model.name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/ExtensionResourceTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/ExtensionResourceTests.java new file mode 100644 index 000000000000..0b55cb3bb52d --- /dev/null +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/ExtensionResourceTests.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.scvmm.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.scvmm.models.ExtensionResource; + +public final class ExtensionResourceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExtensionResource model + = BinaryData.fromString("{\"id\":\"epbqpcrfkbw\",\"name\":\"csnjvcdwxlpqekft\",\"type\":\"khtj\"}") + .toObject(ExtensionResource.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExtensionResource model = new ExtensionResource(); + model = BinaryData.fromObject(model).toObject(ExtensionResource.class); + } +} diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsDeleteWithResponseMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsDeleteWithResponseMockTests.java index 495e021d60d5..f7b24bd031a3 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsDeleteWithResponseMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/GuestAgentsDeleteWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,7 +9,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; @@ -22,12 +22,12 @@ public void testDeleteWithResponse() throws Exception { HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.guestAgents().deleteWithResponse("aaomylweazu", com.azure.core.util.Context.NONE); + manager.guestAgents().deleteWithResponse("hvn", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/HardwareProfileTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/HardwareProfileTests.java index a9888219042e..616d1be0214e 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/HardwareProfileTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/HardwareProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -14,30 +14,30 @@ public final class HardwareProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HardwareProfile model = BinaryData.fromString( - "{\"memoryMB\":1950851050,\"cpuCount\":1983903346,\"limitCpuForMigration\":\"true\",\"dynamicMemoryEnabled\":\"false\",\"dynamicMemoryMaxMB\":2056372142,\"dynamicMemoryMinMB\":1492414283,\"isHighlyAvailable\":\"true\"}") + "{\"memoryMB\":1483667739,\"cpuCount\":485662234,\"limitCpuForMigration\":\"true\",\"dynamicMemoryEnabled\":\"false\",\"dynamicMemoryMaxMB\":2106281603,\"dynamicMemoryMinMB\":342609300,\"isHighlyAvailable\":\"false\"}") .toObject(HardwareProfile.class); - Assertions.assertEquals(1950851050, model.memoryMB()); - Assertions.assertEquals(1983903346, model.cpuCount()); + Assertions.assertEquals(1483667739, model.memoryMB()); + Assertions.assertEquals(485662234, model.cpuCount()); Assertions.assertEquals(LimitCpuForMigration.TRUE, model.limitCpuForMigration()); Assertions.assertEquals(DynamicMemoryEnabled.FALSE, model.dynamicMemoryEnabled()); - Assertions.assertEquals(2056372142, model.dynamicMemoryMaxMB()); - Assertions.assertEquals(1492414283, model.dynamicMemoryMinMB()); + Assertions.assertEquals(2106281603, model.dynamicMemoryMaxMB()); + Assertions.assertEquals(342609300, model.dynamicMemoryMinMB()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HardwareProfile model = new HardwareProfile().withMemoryMB(1950851050) - .withCpuCount(1983903346) + HardwareProfile model = new HardwareProfile().withMemoryMB(1483667739) + .withCpuCount(485662234) .withLimitCpuForMigration(LimitCpuForMigration.TRUE) .withDynamicMemoryEnabled(DynamicMemoryEnabled.FALSE) - .withDynamicMemoryMaxMB(2056372142) - .withDynamicMemoryMinMB(1492414283); + .withDynamicMemoryMaxMB(2106281603) + .withDynamicMemoryMinMB(342609300); model = BinaryData.fromObject(model).toObject(HardwareProfile.class); - Assertions.assertEquals(1950851050, model.memoryMB()); - Assertions.assertEquals(1983903346, model.cpuCount()); + Assertions.assertEquals(1483667739, model.memoryMB()); + Assertions.assertEquals(485662234, model.cpuCount()); Assertions.assertEquals(LimitCpuForMigration.TRUE, model.limitCpuForMigration()); Assertions.assertEquals(DynamicMemoryEnabled.FALSE, model.dynamicMemoryEnabled()); - Assertions.assertEquals(2056372142, model.dynamicMemoryMaxMB()); - Assertions.assertEquals(1492414283, model.dynamicMemoryMinMB()); + Assertions.assertEquals(2106281603, model.dynamicMemoryMaxMB()); + Assertions.assertEquals(342609300, model.dynamicMemoryMinMB()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/HardwareProfileUpdateTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/HardwareProfileUpdateTests.java index e9b909f7c7e0..d8757545d4b7 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/HardwareProfileUpdateTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/HardwareProfileUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -14,30 +14,30 @@ public final class HardwareProfileUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HardwareProfileUpdate model = BinaryData.fromString( - "{\"memoryMB\":330627677,\"cpuCount\":1964386727,\"limitCpuForMigration\":\"false\",\"dynamicMemoryEnabled\":\"false\",\"dynamicMemoryMaxMB\":8313214,\"dynamicMemoryMinMB\":5520044}") + "{\"memoryMB\":596533166,\"cpuCount\":748250954,\"limitCpuForMigration\":\"true\",\"dynamicMemoryEnabled\":\"false\",\"dynamicMemoryMaxMB\":536315027,\"dynamicMemoryMinMB\":549450060}") .toObject(HardwareProfileUpdate.class); - Assertions.assertEquals(330627677, model.memoryMB()); - Assertions.assertEquals(1964386727, model.cpuCount()); - Assertions.assertEquals(LimitCpuForMigration.FALSE, model.limitCpuForMigration()); + Assertions.assertEquals(596533166, model.memoryMB()); + Assertions.assertEquals(748250954, model.cpuCount()); + Assertions.assertEquals(LimitCpuForMigration.TRUE, model.limitCpuForMigration()); Assertions.assertEquals(DynamicMemoryEnabled.FALSE, model.dynamicMemoryEnabled()); - Assertions.assertEquals(8313214, model.dynamicMemoryMaxMB()); - Assertions.assertEquals(5520044, model.dynamicMemoryMinMB()); + Assertions.assertEquals(536315027, model.dynamicMemoryMaxMB()); + Assertions.assertEquals(549450060, model.dynamicMemoryMinMB()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HardwareProfileUpdate model = new HardwareProfileUpdate().withMemoryMB(330627677) - .withCpuCount(1964386727) - .withLimitCpuForMigration(LimitCpuForMigration.FALSE) + HardwareProfileUpdate model = new HardwareProfileUpdate().withMemoryMB(596533166) + .withCpuCount(748250954) + .withLimitCpuForMigration(LimitCpuForMigration.TRUE) .withDynamicMemoryEnabled(DynamicMemoryEnabled.FALSE) - .withDynamicMemoryMaxMB(8313214) - .withDynamicMemoryMinMB(5520044); + .withDynamicMemoryMaxMB(536315027) + .withDynamicMemoryMinMB(549450060); model = BinaryData.fromObject(model).toObject(HardwareProfileUpdate.class); - Assertions.assertEquals(330627677, model.memoryMB()); - Assertions.assertEquals(1964386727, model.cpuCount()); - Assertions.assertEquals(LimitCpuForMigration.FALSE, model.limitCpuForMigration()); + Assertions.assertEquals(596533166, model.memoryMB()); + Assertions.assertEquals(748250954, model.cpuCount()); + Assertions.assertEquals(LimitCpuForMigration.TRUE, model.limitCpuForMigration()); Assertions.assertEquals(DynamicMemoryEnabled.FALSE, model.dynamicMemoryEnabled()); - Assertions.assertEquals(8313214, model.dynamicMemoryMaxMB()); - Assertions.assertEquals(5520044, model.dynamicMemoryMinMB()); + Assertions.assertEquals(536315027, model.dynamicMemoryMaxMB()); + Assertions.assertEquals(549450060, model.dynamicMemoryMinMB()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/HttpProxyConfigurationTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/HttpProxyConfigurationTests.java index 80b81654de9e..e1c051ae4ecb 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/HttpProxyConfigurationTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/HttpProxyConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -12,14 +12,14 @@ public final class HttpProxyConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HttpProxyConfiguration model - = BinaryData.fromString("{\"httpsProxy\":\"cgygev\"}").toObject(HttpProxyConfiguration.class); - Assertions.assertEquals("cgygev", model.httpsProxy()); + = BinaryData.fromString("{\"httpsProxy\":\"qddrihpfhoqcaae\"}").toObject(HttpProxyConfiguration.class); + Assertions.assertEquals("qddrihpfhoqcaae", model.httpsProxy()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HttpProxyConfiguration model = new HttpProxyConfiguration().withHttpsProxy("cgygev"); + HttpProxyConfiguration model = new HttpProxyConfiguration().withHttpsProxy("qddrihpfhoqcaae"); model = BinaryData.fromObject(model).toObject(HttpProxyConfiguration.class); - Assertions.assertEquals("cgygev", model.httpsProxy()); + Assertions.assertEquals("qddrihpfhoqcaae", model.httpsProxy()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InfrastructureProfileTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InfrastructureProfileTests.java index bbe67cf5cf25..8f63cc8bfb9c 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InfrastructureProfileTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InfrastructureProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -12,39 +12,39 @@ public final class InfrastructureProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InfrastructureProfile model = BinaryData.fromString( - "{\"inventoryItemId\":\"muouqfp\",\"vmmServerId\":\"zw\",\"cloudId\":\"g\",\"templateId\":\"tnwu\",\"vmName\":\"gazxuf\",\"uuid\":\"uckyf\",\"lastRestoredVMCheckpoint\":{\"parentCheckpointID\":\"fidfvzw\",\"checkpointID\":\"uht\",\"name\":\"wisdkft\",\"description\":\"xmnteiwaop\"},\"checkpoints\":[{\"parentCheckpointID\":\"jcmmxdcufufsrp\",\"checkpointID\":\"zidnsezcxtbzsgfy\",\"name\":\"sne\",\"description\":\"dwzjeiach\"},{\"parentCheckpointID\":\"osfln\",\"checkpointID\":\"sfqpteehz\",\"name\":\"ypyqrimzinp\",\"description\":\"wjdk\"},{\"parentCheckpointID\":\"soodqxhcrmnoh\",\"checkpointID\":\"ckwhds\",\"name\":\"fiyipjxsqwpgrj\",\"description\":\"norcjxvsnbyxqab\"},{\"parentCheckpointID\":\"ocpcy\",\"checkpointID\":\"urzafb\",\"name\":\"j\",\"description\":\"btoqcjmkljavbqid\"}],\"checkpointType\":\"ajzyul\",\"generation\":144447336,\"biosGuid\":\"jkrlkhbzhfepg\"}") + "{\"inventoryItemId\":\"gogczhonnxkrlgny\",\"vmmServerId\":\"ossxk\",\"cloudId\":\"thrrgh\",\"templateId\":\"bdhqxvcxgf\",\"vmName\":\"dsofbshrns\",\"uuid\":\"uswdv\",\"lastRestoredVMCheckpoint\":{\"parentCheckpointID\":\"bycnunvjsrtkf\",\"checkpointID\":\"nopqgikyzirtx\",\"name\":\"uxzejntpsew\",\"description\":\"oi\"},\"checkpoints\":[{\"parentCheckpointID\":\"rydxtqm\",\"checkpointID\":\"ox\",\"name\":\"ggufhyaomtb\",\"description\":\"havgrvk\"}],\"checkpointType\":\"ovjzhpjbibgjmfx\",\"generation\":1832898132,\"biosGuid\":\"cluyovwxnbkf\"}") .toObject(InfrastructureProfile.class); - Assertions.assertEquals("muouqfp", model.inventoryItemId()); - Assertions.assertEquals("zw", model.vmmServerId()); - Assertions.assertEquals("g", model.cloudId()); - Assertions.assertEquals("tnwu", model.templateId()); - Assertions.assertEquals("gazxuf", model.vmName()); - Assertions.assertEquals("uckyf", model.uuid()); - Assertions.assertEquals("ajzyul", model.checkpointType()); - Assertions.assertEquals(144447336, model.generation()); - Assertions.assertEquals("jkrlkhbzhfepg", model.biosGuid()); + Assertions.assertEquals("gogczhonnxkrlgny", model.inventoryItemId()); + Assertions.assertEquals("ossxk", model.vmmServerId()); + Assertions.assertEquals("thrrgh", model.cloudId()); + Assertions.assertEquals("bdhqxvcxgf", model.templateId()); + Assertions.assertEquals("dsofbshrns", model.vmName()); + Assertions.assertEquals("uswdv", model.uuid()); + Assertions.assertEquals("ovjzhpjbibgjmfx", model.checkpointType()); + Assertions.assertEquals(1832898132, model.generation()); + Assertions.assertEquals("cluyovwxnbkf", model.biosGuid()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InfrastructureProfile model = new InfrastructureProfile().withInventoryItemId("muouqfp") - .withVmmServerId("zw") - .withCloudId("g") - .withTemplateId("tnwu") - .withVmName("gazxuf") - .withUuid("uckyf") - .withCheckpointType("ajzyul") - .withGeneration(144447336) - .withBiosGuid("jkrlkhbzhfepg"); + InfrastructureProfile model = new InfrastructureProfile().withInventoryItemId("gogczhonnxkrlgny") + .withVmmServerId("ossxk") + .withCloudId("thrrgh") + .withTemplateId("bdhqxvcxgf") + .withVmName("dsofbshrns") + .withUuid("uswdv") + .withCheckpointType("ovjzhpjbibgjmfx") + .withGeneration(1832898132) + .withBiosGuid("cluyovwxnbkf"); model = BinaryData.fromObject(model).toObject(InfrastructureProfile.class); - Assertions.assertEquals("muouqfp", model.inventoryItemId()); - Assertions.assertEquals("zw", model.vmmServerId()); - Assertions.assertEquals("g", model.cloudId()); - Assertions.assertEquals("tnwu", model.templateId()); - Assertions.assertEquals("gazxuf", model.vmName()); - Assertions.assertEquals("uckyf", model.uuid()); - Assertions.assertEquals("ajzyul", model.checkpointType()); - Assertions.assertEquals(144447336, model.generation()); - Assertions.assertEquals("jkrlkhbzhfepg", model.biosGuid()); + Assertions.assertEquals("gogczhonnxkrlgny", model.inventoryItemId()); + Assertions.assertEquals("ossxk", model.vmmServerId()); + Assertions.assertEquals("thrrgh", model.cloudId()); + Assertions.assertEquals("bdhqxvcxgf", model.templateId()); + Assertions.assertEquals("dsofbshrns", model.vmName()); + Assertions.assertEquals("uswdv", model.uuid()); + Assertions.assertEquals("ovjzhpjbibgjmfx", model.checkpointType()); + Assertions.assertEquals(1832898132, model.generation()); + Assertions.assertEquals("cluyovwxnbkf", model.biosGuid()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InfrastructureProfileUpdateTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InfrastructureProfileUpdateTests.java index 426c2f0abff8..f2653915c286 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InfrastructureProfileUpdateTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InfrastructureProfileUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,15 +11,15 @@ public final class InfrastructureProfileUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - InfrastructureProfileUpdate model = BinaryData.fromString("{\"checkpointType\":\"wkuofoskghsauu\"}") - .toObject(InfrastructureProfileUpdate.class); - Assertions.assertEquals("wkuofoskghsauu", model.checkpointType()); + InfrastructureProfileUpdate model + = BinaryData.fromString("{\"checkpointType\":\"xk\"}").toObject(InfrastructureProfileUpdate.class); + Assertions.assertEquals("xk", model.checkpointType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InfrastructureProfileUpdate model = new InfrastructureProfileUpdate().withCheckpointType("wkuofoskghsauu"); + InfrastructureProfileUpdate model = new InfrastructureProfileUpdate().withCheckpointType("xk"); model = BinaryData.fromObject(model).toObject(InfrastructureProfileUpdate.class); - Assertions.assertEquals("wkuofoskghsauu", model.checkpointType()); + Assertions.assertEquals("xk", model.checkpointType()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemDetailsTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemDetailsTests.java index 94cdc36534f1..b6ee81c18145 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemDetailsTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -12,18 +12,18 @@ public final class InventoryItemDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InventoryItemDetails model - = BinaryData.fromString("{\"inventoryItemId\":\"ril\",\"inventoryItemName\":\"apeewchpxlkt\"}") + = BinaryData.fromString("{\"inventoryItemId\":\"gofel\",\"inventoryItemName\":\"grqmqhldvrii\"}") .toObject(InventoryItemDetails.class); - Assertions.assertEquals("ril", model.inventoryItemId()); - Assertions.assertEquals("apeewchpxlkt", model.inventoryItemName()); + Assertions.assertEquals("gofel", model.inventoryItemId()); + Assertions.assertEquals("grqmqhldvrii", model.inventoryItemName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { InventoryItemDetails model - = new InventoryItemDetails().withInventoryItemId("ril").withInventoryItemName("apeewchpxlkt"); + = new InventoryItemDetails().withInventoryItemId("gofel").withInventoryItemName("grqmqhldvrii"); model = BinaryData.fromObject(model).toObject(InventoryItemDetails.class); - Assertions.assertEquals("ril", model.inventoryItemId()); - Assertions.assertEquals("apeewchpxlkt", model.inventoryItemName()); + Assertions.assertEquals("gofel", model.inventoryItemId()); + Assertions.assertEquals("grqmqhldvrii", model.inventoryItemName()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemInnerTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemInnerTests.java index a9a7cfc5cfbc..6b1b5e56bd28 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemInnerTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -13,16 +13,16 @@ public final class InventoryItemInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InventoryItemInner model = BinaryData.fromString( - "{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"i\",\"uuid\":\"fhoqca\",\"inventoryItemName\":\"wdaomdjvlpjxxkzb\",\"provisioningState\":\"Provisioning\"},\"kind\":\"eivsiykzkdnc\",\"id\":\"xonbzoggculapz\",\"name\":\"y\",\"type\":\"pgogtqxepny\"}") + "{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"racstwity\",\"uuid\":\"evxccedcp\",\"inventoryItemName\":\"dyodnwzxltj\",\"provisioningState\":\"Updating\"},\"kind\":\"ltiugcxnavv\",\"id\":\"qiby\",\"name\":\"unyowxwl\",\"type\":\"djrkvfgbvfvpd\"}") .toObject(InventoryItemInner.class); - Assertions.assertEquals("eivsiykzkdnc", model.kind()); + Assertions.assertEquals("ltiugcxnavv", model.kind()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { InventoryItemInner model - = new InventoryItemInner().withProperties(new InventoryItemProperties()).withKind("eivsiykzkdnc"); + = new InventoryItemInner().withProperties(new InventoryItemProperties()).withKind("ltiugcxnavv"); model = BinaryData.fromObject(model).toObject(InventoryItemInner.class); - Assertions.assertEquals("eivsiykzkdnc", model.kind()); + Assertions.assertEquals("ltiugcxnavv", model.kind()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemListResultTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemListResultTests.java index 2b7a88c59c4d..114fce8e2bca 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemListResultTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemListResultTests.java @@ -1,19 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.scvmm.models.InventoryItemListResult; +import com.azure.resourcemanager.scvmm.implementation.models.InventoryItemListResult; import org.junit.jupiter.api.Assertions; public final class InventoryItemListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InventoryItemListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"lma\",\"uuid\":\"tcyohpfkyrk\",\"inventoryItemName\":\"dg\",\"provisioningState\":\"Failed\"},\"kind\":\"jkmnwq\",\"id\":\"obaiyhddviaceg\",\"name\":\"n\",\"type\":\"ntfpmvmemfnc\"},{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"vvbalx\",\"uuid\":\"lchpodbzevwrdn\",\"inventoryItemName\":\"ukuv\",\"provisioningState\":\"Updating\"},\"kind\":\"wsmystuluqypf\",\"id\":\"lerchpq\",\"name\":\"mfpjbabw\",\"type\":\"dfc\"}],\"nextLink\":\"spuunnoxyhkxgq\"}") + "{\"value\":[{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"al\",\"uuid\":\"fk\",\"inventoryItemName\":\"vsexsowuelu\",\"provisioningState\":\"Accepted\"},\"kind\":\"hhxvrhmzkwpj\",\"id\":\"wspughftqsxhqx\",\"name\":\"j\",\"type\":\"ukndxdigrjgu\"},{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"dmsyqtfihwhbo\",\"uuid\":\"ingamvp\",\"inventoryItemName\":\"o\",\"provisioningState\":\"Provisioning\"},\"kind\":\"udphqamvdkfwyn\",\"id\":\"vtbvkayh\",\"name\":\"tnvyqiatkzwp\",\"type\":\"npwzcjaes\"}],\"nextLink\":\"v\"}") .toObject(InventoryItemListResult.class); - Assertions.assertEquals("jkmnwq", model.value().get(0).kind()); + Assertions.assertEquals("hhxvrhmzkwpj", model.value().get(0).kind()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemPropertiesTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemPropertiesTests.java index 4791760e0604..4e0c2ddb7328 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemPropertiesTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,7 +11,7 @@ public final class InventoryItemPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InventoryItemProperties model = BinaryData.fromString( - "{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"fuajly\",\"uuid\":\"lvofqzhvfcibyfmo\",\"inventoryItemName\":\"xrkjpvdw\",\"provisioningState\":\"Accepted\"}") + "{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"daciz\",\"uuid\":\"q\",\"inventoryItemName\":\"krribdeibqi\",\"provisioningState\":\"Failed\"}") .toObject(InventoryItemProperties.class); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsCreateWithResponseMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsCreateWithResponseMockTests.java index 97d1a1fdccf3..4ef14d34745a 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsCreateWithResponseMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsCreateWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,7 +9,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.InventoryItem; import com.azure.resourcemanager.scvmm.models.InventoryItemProperties; import java.nio.charset.StandardCharsets; @@ -22,22 +22,22 @@ public final class InventoryItemsCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"eftkwqe\",\"uuid\":\"mvss\",\"inventoryItemName\":\"aepwamcxtcz\",\"provisioningState\":\"Provisioning\"},\"kind\":\"uknijduyye\",\"id\":\"ydjfb\",\"name\":\"c\",\"type\":\"v\"}"; + = "{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"zlanrupdwvnph\",\"uuid\":\"zqtpjhmq\",\"inventoryItemName\":\"v\",\"provisioningState\":\"Accepted\"},\"kind\":\"iwdcxsmlzzhzd\",\"id\":\"etlgydlhqvlnnpx\",\"name\":\"b\",\"type\":\"fiqgeaar\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); InventoryItem response = manager.inventoryItems() - .define("mghihp") - .withExistingVmmServer("cxnafbwqrooh", "uovmaonurjt") + .define("dxfzzzwyjaf") + .withExistingVmmServer("pcrrk", "lawjmjsmwrok") .withProperties(new InventoryItemProperties()) - .withKind("eukdqkkyih") + .withKind("fpafolpymwamxq") .create(); - Assertions.assertEquals("uknijduyye", response.kind()); + Assertions.assertEquals("iwdcxsmlzzhzd", response.kind()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsDeleteWithResponseMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsDeleteWithResponseMockTests.java index da8371ecd41c..6a88f848e8e5 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsDeleteWithResponseMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsDeleteWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,7 +9,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; @@ -22,13 +22,13 @@ public void testDeleteWithResponse() throws Exception { HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); manager.inventoryItems() - .deleteWithResponse("vnynkb", "etnjuhpsprkz", "aupia", com.azure.core.util.Context.NONE); + .deleteWithResponse("gfggcvkyylizrzbj", "sfxsf", "ztlvtmvagbwidqlv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsGetWithResponseMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsGetWithResponseMockTests.java index e88b95778aa8..5958c92e5ab1 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsGetWithResponseMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,7 +9,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.InventoryItem; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,19 +21,19 @@ public final class InventoryItemsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"og\",\"uuid\":\"zyvneezaifghtmo\",\"inventoryItemName\":\"tlffhzbkr\",\"provisioningState\":\"Canceled\"},\"kind\":\"avfqnvhnqoewdogi\",\"id\":\"tesypvidbztjh\",\"name\":\"t\",\"type\":\"b\"}"; + = "{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"iwfbrkwpzdqtvhcs\",\"uuid\":\"daqaxsi\",\"inventoryItemName\":\"etgbebjfulb\",\"provisioningState\":\"Provisioning\"},\"kind\":\"h\",\"id\":\"pnfpubntnbat\",\"name\":\"viqsowsaaelcattc\",\"type\":\"uhplrvkmjcwmjv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); InventoryItem response = manager.inventoryItems() - .getWithResponse("b", "vnwsw", "txkyctwwgzwxjlm", com.azure.core.util.Context.NONE) + .getWithResponse("tjewlpxuzzj", "nrefqyh", "otoihiqa", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("avfqnvhnqoewdogi", response.kind()); + Assertions.assertEquals("h", response.kind()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsListByVmmServerMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsListByVmmServerMockTests.java index 97a670337028..ab4274cc7dfd 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsListByVmmServerMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/InventoryItemsListByVmmServerMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -10,7 +10,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.InventoryItem; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,18 +22,18 @@ public final class InventoryItemsListByVmmServerMockTests { @Test public void testListByVmmServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"ziven\",\"uuid\":\"pmeyyvpkpatlbijp\",\"inventoryItemName\":\"sksrfhfvolmknbn\",\"provisioningState\":\"Deleting\"},\"kind\":\"ommpvfqaw\",\"id\":\"gbrt\",\"name\":\"uiaclkiexhajlfn\",\"type\":\"hiqfyuttdiy\"}]}"; + = "{\"value\":[{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"iblkujr\",\"uuid\":\"fojuidjpuuyj\",\"inventoryItemName\":\"ejikzoeovvtzejet\",\"provisioningState\":\"Succeeded\"},\"kind\":\"tikyj\",\"id\":\"k\",\"name\":\"bqzolxr\",\"type\":\"vhqjwtrhtgvg\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.inventoryItems().listByVmmServer("mzvlazipbh", "wvqsgny", com.azure.core.util.Context.NONE); + = manager.inventoryItems().listByVmmServer("ukoveofi", "rvjfnmjmvlw", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ommpvfqaw", response.iterator().next().kind()); + Assertions.assertEquals("tikyj", response.iterator().next().kind()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/NetworkInterfaceTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/NetworkInterfaceTests.java index 0cbf99deffc0..ea228e280fec 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/NetworkInterfaceTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/NetworkInterfaceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -13,33 +13,33 @@ public final class NetworkInterfaceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkInterface model = BinaryData.fromString( - "{\"name\":\"si\",\"displayName\":\"evcciqihnhun\",\"ipv4Addresses\":[\"jzrnf\",\"gxg\",\"spemvtzfk\",\"fublj\"],\"ipv6Addresses\":[\"qeof\",\"aeqjhqjbasvms\",\"jqul\",\"gsntnbybkzgcwr\"],\"macAddress\":\"lxxwrljdouskc\",\"virtualNetworkId\":\"kocrcjdkwtnhx\",\"networkName\":\"jbiksqrglssai\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"ljfmppee\"}") + "{\"name\":\"ni\",\"displayName\":\"x\",\"ipv4Addresses\":[\"py\",\"gklwn\",\"nhjdauw\",\"vylwzbtdhxuj\"],\"ipv6Addresses\":[\"mpowuwpr\"],\"macAddress\":\"lve\",\"virtualNetworkId\":\"lupj\",\"networkName\":\"hfxobbcswsrtj\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"ewtghfgblcgw\"}") .toObject(NetworkInterface.class); - Assertions.assertEquals("si", model.name()); - Assertions.assertEquals("lxxwrljdouskc", model.macAddress()); - Assertions.assertEquals("kocrcjdkwtnhx", model.virtualNetworkId()); - Assertions.assertEquals(AllocationMethod.DYNAMIC, model.ipv4AddressType()); + Assertions.assertEquals("ni", model.name()); + Assertions.assertEquals("lve", model.macAddress()); + Assertions.assertEquals("lupj", model.virtualNetworkId()); + Assertions.assertEquals(AllocationMethod.STATIC, model.ipv4AddressType()); Assertions.assertEquals(AllocationMethod.STATIC, model.ipv6AddressType()); Assertions.assertEquals(AllocationMethod.STATIC, model.macAddressType()); - Assertions.assertEquals("ljfmppee", model.nicId()); + Assertions.assertEquals("ewtghfgblcgw", model.nicId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkInterface model = new NetworkInterface().withName("si") - .withMacAddress("lxxwrljdouskc") - .withVirtualNetworkId("kocrcjdkwtnhx") - .withIpv4AddressType(AllocationMethod.DYNAMIC) + NetworkInterface model = new NetworkInterface().withName("ni") + .withMacAddress("lve") + .withVirtualNetworkId("lupj") + .withIpv4AddressType(AllocationMethod.STATIC) .withIpv6AddressType(AllocationMethod.STATIC) .withMacAddressType(AllocationMethod.STATIC) - .withNicId("ljfmppee"); + .withNicId("ewtghfgblcgw"); model = BinaryData.fromObject(model).toObject(NetworkInterface.class); - Assertions.assertEquals("si", model.name()); - Assertions.assertEquals("lxxwrljdouskc", model.macAddress()); - Assertions.assertEquals("kocrcjdkwtnhx", model.virtualNetworkId()); - Assertions.assertEquals(AllocationMethod.DYNAMIC, model.ipv4AddressType()); + Assertions.assertEquals("ni", model.name()); + Assertions.assertEquals("lve", model.macAddress()); + Assertions.assertEquals("lupj", model.virtualNetworkId()); + Assertions.assertEquals(AllocationMethod.STATIC, model.ipv4AddressType()); Assertions.assertEquals(AllocationMethod.STATIC, model.ipv6AddressType()); Assertions.assertEquals(AllocationMethod.STATIC, model.macAddressType()); - Assertions.assertEquals("ljfmppee", model.nicId()); + Assertions.assertEquals("ewtghfgblcgw", model.nicId()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/NetworkInterfaceUpdateTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/NetworkInterfaceUpdateTests.java index 808db74768c0..2a75463f3ad1 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/NetworkInterfaceUpdateTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/NetworkInterfaceUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -13,33 +13,33 @@ public final class NetworkInterfaceUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkInterfaceUpdate model = BinaryData.fromString( - "{\"name\":\"xodpuozmyzydagfu\",\"macAddress\":\"bezy\",\"virtualNetworkId\":\"okktwhrdxw\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"ureximoryocfs\"}") + "{\"name\":\"cwrwfs\",\"macAddress\":\"fnynszqujizdvoqy\",\"virtualNetworkId\":\"byowbblgyavutp\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"msksbp\"}") .toObject(NetworkInterfaceUpdate.class); - Assertions.assertEquals("xodpuozmyzydagfu", model.name()); - Assertions.assertEquals("bezy", model.macAddress()); - Assertions.assertEquals("okktwhrdxw", model.virtualNetworkId()); + Assertions.assertEquals("cwrwfs", model.name()); + Assertions.assertEquals("fnynszqujizdvoqy", model.macAddress()); + Assertions.assertEquals("byowbblgyavutp", model.virtualNetworkId()); Assertions.assertEquals(AllocationMethod.DYNAMIC, model.ipv4AddressType()); Assertions.assertEquals(AllocationMethod.DYNAMIC, model.ipv6AddressType()); Assertions.assertEquals(AllocationMethod.STATIC, model.macAddressType()); - Assertions.assertEquals("ureximoryocfs", model.nicId()); + Assertions.assertEquals("msksbp", model.nicId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkInterfaceUpdate model = new NetworkInterfaceUpdate().withName("xodpuozmyzydagfu") - .withMacAddress("bezy") - .withVirtualNetworkId("okktwhrdxw") + NetworkInterfaceUpdate model = new NetworkInterfaceUpdate().withName("cwrwfs") + .withMacAddress("fnynszqujizdvoqy") + .withVirtualNetworkId("byowbblgyavutp") .withIpv4AddressType(AllocationMethod.DYNAMIC) .withIpv6AddressType(AllocationMethod.DYNAMIC) .withMacAddressType(AllocationMethod.STATIC) - .withNicId("ureximoryocfs"); + .withNicId("msksbp"); model = BinaryData.fromObject(model).toObject(NetworkInterfaceUpdate.class); - Assertions.assertEquals("xodpuozmyzydagfu", model.name()); - Assertions.assertEquals("bezy", model.macAddress()); - Assertions.assertEquals("okktwhrdxw", model.virtualNetworkId()); + Assertions.assertEquals("cwrwfs", model.name()); + Assertions.assertEquals("fnynszqujizdvoqy", model.macAddress()); + Assertions.assertEquals("byowbblgyavutp", model.virtualNetworkId()); Assertions.assertEquals(AllocationMethod.DYNAMIC, model.ipv4AddressType()); Assertions.assertEquals(AllocationMethod.DYNAMIC, model.ipv6AddressType()); Assertions.assertEquals(AllocationMethod.STATIC, model.macAddressType()); - Assertions.assertEquals("ureximoryocfs", model.nicId()); + Assertions.assertEquals("msksbp", model.nicId()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/NetworkProfileTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/NetworkProfileTests.java index 021f39a7fd63..128b58ecc9ac 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/NetworkProfileTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/NetworkProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -15,48 +15,48 @@ public final class NetworkProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkProfile model = BinaryData.fromString( - "{\"networkInterfaces\":[{\"name\":\"zwuxzd\",\"displayName\":\"a\",\"ipv4Addresses\":[\"hmwhfpmrqo\",\"mt\",\"kknryrtihf\",\"tijbpzvgnwzsymgl\"],\"ipv6Addresses\":[\"cyzkohdbihanuf\",\"fcbjysagithxqha\",\"ifpikxwczby\",\"cnpqxuhivyqniwby\"],\"macAddress\":\"k\",\"virtualNetworkId\":\"dumjgrtfwvuk\",\"networkName\":\"audccsnhs\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Dynamic\",\"nicId\":\"ryhtnapczwlokjy\"},{\"name\":\"kkvnipjox\",\"displayName\":\"nchgej\",\"ipv4Addresses\":[\"dmailzydehojw\",\"ahuxinpm\",\"njaqwixjspro\"],\"ipv6Addresses\":[\"putegjvwmfd\",\"t\",\"cmdv\",\"jhulsuuvmkjo\"],\"macAddress\":\"rwfndiod\",\"virtualNetworkId\":\"slwejdpvw\",\"networkName\":\"oqpsoa\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"j\"},{\"name\":\"hbcryffdfdosyge\",\"displayName\":\"aojakhmsbzjhcrz\",\"ipv4Addresses\":[\"phlxa\",\"lthqtrgqjbp\",\"zfsinzgvf\"],\"ipv6Addresses\":[\"wzo\",\"xjtfelluwfzit\",\"np\",\"qfpjk\"],\"macAddress\":\"xofpdvhpfxxypi\",\"virtualNetworkId\":\"nmayhuybb\",\"networkName\":\"odepoogin\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"gnarxzxtheo\"}]}") + "{\"networkInterfaces\":[{\"name\":\"yvblmhvkzu\",\"displayName\":\"xvvy\",\"ipv4Addresses\":[\"opbyrqufegxu\"],\"ipv6Addresses\":[\"fbn\"],\"macAddress\":\"mctlpdngitv\",\"virtualNetworkId\":\"mhrixkwmyijejve\",\"networkName\":\"hbpnaixexccbd\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"drrvqahqkght\"},{\"name\":\"ijnhyjsvfycxzbf\",\"displayName\":\"owvrvmtgjqppyos\",\"ipv4Addresses\":[\"nzm\"],\"ipv6Addresses\":[\"fipns\",\"kmcwaekrrjreafx\"],\"macAddress\":\"gumhjglikkxws\",\"virtualNetworkId\":\"lbqpvuzlmvfelf\",\"networkName\":\"gplcrpwjxeznoigb\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Dynamic\",\"nicId\":\"nbsazejjoqkag\"},{\"name\":\"sxtta\",\"displayName\":\"zxnfaaz\",\"ipv4Addresses\":[\"tnkdmkqj\",\"lwuenvrkp\"],\"ipv6Addresses\":[\"aibrebqaaysjkixq\",\"nqttezl\",\"fffiak\",\"jpqqmted\"],\"macAddress\":\"mmji\",\"virtualNetworkId\":\"eozphv\",\"networkName\":\"uyqncygupkvipmd\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Dynamic\",\"nicId\":\"vzhfstotxhoj\"}]}") .toObject(NetworkProfile.class); - Assertions.assertEquals("zwuxzd", model.networkInterfaces().get(0).name()); - Assertions.assertEquals("k", model.networkInterfaces().get(0).macAddress()); - Assertions.assertEquals("dumjgrtfwvuk", model.networkInterfaces().get(0).virtualNetworkId()); - Assertions.assertEquals(AllocationMethod.STATIC, model.networkInterfaces().get(0).ipv4AddressType()); - Assertions.assertEquals(AllocationMethod.DYNAMIC, model.networkInterfaces().get(0).ipv6AddressType()); - Assertions.assertEquals(AllocationMethod.DYNAMIC, model.networkInterfaces().get(0).macAddressType()); - Assertions.assertEquals("ryhtnapczwlokjy", model.networkInterfaces().get(0).nicId()); + Assertions.assertEquals("yvblmhvkzu", model.networkInterfaces().get(0).name()); + Assertions.assertEquals("mctlpdngitv", model.networkInterfaces().get(0).macAddress()); + Assertions.assertEquals("mhrixkwmyijejve", model.networkInterfaces().get(0).virtualNetworkId()); + Assertions.assertEquals(AllocationMethod.DYNAMIC, model.networkInterfaces().get(0).ipv4AddressType()); + Assertions.assertEquals(AllocationMethod.STATIC, model.networkInterfaces().get(0).ipv6AddressType()); + Assertions.assertEquals(AllocationMethod.STATIC, model.networkInterfaces().get(0).macAddressType()); + Assertions.assertEquals("drrvqahqkght", model.networkInterfaces().get(0).nicId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkProfile model = new NetworkProfile().withNetworkInterfaces(Arrays.asList( - new NetworkInterface().withName("zwuxzd") - .withMacAddress("k") - .withVirtualNetworkId("dumjgrtfwvuk") + new NetworkInterface().withName("yvblmhvkzu") + .withMacAddress("mctlpdngitv") + .withVirtualNetworkId("mhrixkwmyijejve") + .withIpv4AddressType(AllocationMethod.DYNAMIC) + .withIpv6AddressType(AllocationMethod.STATIC) + .withMacAddressType(AllocationMethod.STATIC) + .withNicId("drrvqahqkght"), + new NetworkInterface().withName("ijnhyjsvfycxzbf") + .withMacAddress("gumhjglikkxws") + .withVirtualNetworkId("lbqpvuzlmvfelf") .withIpv4AddressType(AllocationMethod.STATIC) .withIpv6AddressType(AllocationMethod.DYNAMIC) .withMacAddressType(AllocationMethod.DYNAMIC) - .withNicId("ryhtnapczwlokjy"), - new NetworkInterface().withName("kkvnipjox") - .withMacAddress("rwfndiod") - .withVirtualNetworkId("slwejdpvw") + .withNicId("nbsazejjoqkag"), + new NetworkInterface().withName("sxtta") + .withMacAddress("mmji") + .withVirtualNetworkId("eozphv") .withIpv4AddressType(AllocationMethod.DYNAMIC) - .withIpv6AddressType(AllocationMethod.STATIC) - .withMacAddressType(AllocationMethod.DYNAMIC) - .withNicId("j"), - new NetworkInterface().withName("hbcryffdfdosyge") - .withMacAddress("xofpdvhpfxxypi") - .withVirtualNetworkId("nmayhuybb") - .withIpv4AddressType(AllocationMethod.STATIC) .withIpv6AddressType(AllocationMethod.DYNAMIC) - .withMacAddressType(AllocationMethod.STATIC) - .withNicId("gnarxzxtheo"))); + .withMacAddressType(AllocationMethod.DYNAMIC) + .withNicId("vzhfstotxhoj"))); model = BinaryData.fromObject(model).toObject(NetworkProfile.class); - Assertions.assertEquals("zwuxzd", model.networkInterfaces().get(0).name()); - Assertions.assertEquals("k", model.networkInterfaces().get(0).macAddress()); - Assertions.assertEquals("dumjgrtfwvuk", model.networkInterfaces().get(0).virtualNetworkId()); - Assertions.assertEquals(AllocationMethod.STATIC, model.networkInterfaces().get(0).ipv4AddressType()); - Assertions.assertEquals(AllocationMethod.DYNAMIC, model.networkInterfaces().get(0).ipv6AddressType()); - Assertions.assertEquals(AllocationMethod.DYNAMIC, model.networkInterfaces().get(0).macAddressType()); - Assertions.assertEquals("ryhtnapczwlokjy", model.networkInterfaces().get(0).nicId()); + Assertions.assertEquals("yvblmhvkzu", model.networkInterfaces().get(0).name()); + Assertions.assertEquals("mctlpdngitv", model.networkInterfaces().get(0).macAddress()); + Assertions.assertEquals("mhrixkwmyijejve", model.networkInterfaces().get(0).virtualNetworkId()); + Assertions.assertEquals(AllocationMethod.DYNAMIC, model.networkInterfaces().get(0).ipv4AddressType()); + Assertions.assertEquals(AllocationMethod.STATIC, model.networkInterfaces().get(0).ipv6AddressType()); + Assertions.assertEquals(AllocationMethod.STATIC, model.networkInterfaces().get(0).macAddressType()); + Assertions.assertEquals("drrvqahqkght", model.networkInterfaces().get(0).nicId()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/NetworkProfileUpdateTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/NetworkProfileUpdateTests.java index 4826dc0975e4..1233bc25c5d9 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/NetworkProfileUpdateTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/NetworkProfileUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -15,34 +15,48 @@ public final class NetworkProfileUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkProfileUpdate model = BinaryData.fromString( - "{\"networkInterfaces\":[{\"name\":\"ae\",\"macAddress\":\"fhyhltrpmopjmcma\",\"virtualNetworkId\":\"okth\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"fcp\"}]}") + "{\"networkInterfaces\":[{\"name\":\"kokwbqplhlvnu\",\"macAddress\":\"pzlrphw\",\"virtualNetworkId\":\"oldweyuqdu\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"biorktal\"},{\"name\":\"jhhgdnhxmsi\",\"macAddress\":\"omi\",\"virtualNetworkId\":\"xggdufi\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"ofjchvcyyysf\"},{\"name\":\"otcubi\",\"macAddress\":\"uipwoqonmacje\",\"virtualNetworkId\":\"izsh\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Dynamic\",\"nicId\":\"fgmblrrilbywdxsm\"}]}") .toObject(NetworkProfileUpdate.class); - Assertions.assertEquals("ae", model.networkInterfaces().get(0).name()); - Assertions.assertEquals("fhyhltrpmopjmcma", model.networkInterfaces().get(0).macAddress()); - Assertions.assertEquals("okth", model.networkInterfaces().get(0).virtualNetworkId()); + Assertions.assertEquals("kokwbqplhlvnu", model.networkInterfaces().get(0).name()); + Assertions.assertEquals("pzlrphw", model.networkInterfaces().get(0).macAddress()); + Assertions.assertEquals("oldweyuqdu", model.networkInterfaces().get(0).virtualNetworkId()); Assertions.assertEquals(AllocationMethod.DYNAMIC, model.networkInterfaces().get(0).ipv4AddressType()); Assertions.assertEquals(AllocationMethod.STATIC, model.networkInterfaces().get(0).ipv6AddressType()); - Assertions.assertEquals(AllocationMethod.STATIC, model.networkInterfaces().get(0).macAddressType()); - Assertions.assertEquals("fcp", model.networkInterfaces().get(0).nicId()); + Assertions.assertEquals(AllocationMethod.DYNAMIC, model.networkInterfaces().get(0).macAddressType()); + Assertions.assertEquals("biorktal", model.networkInterfaces().get(0).nicId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkProfileUpdate model - = new NetworkProfileUpdate().withNetworkInterfaces(Arrays.asList(new NetworkInterfaceUpdate().withName("ae") - .withMacAddress("fhyhltrpmopjmcma") - .withVirtualNetworkId("okth") + NetworkProfileUpdate model = new NetworkProfileUpdate().withNetworkInterfaces(Arrays.asList( + new NetworkInterfaceUpdate().withName("kokwbqplhlvnu") + .withMacAddress("pzlrphw") + .withVirtualNetworkId("oldweyuqdu") .withIpv4AddressType(AllocationMethod.DYNAMIC) .withIpv6AddressType(AllocationMethod.STATIC) + .withMacAddressType(AllocationMethod.DYNAMIC) + .withNicId("biorktal"), + new NetworkInterfaceUpdate().withName("jhhgdnhxmsi") + .withMacAddress("omi") + .withVirtualNetworkId("xggdufi") + .withIpv4AddressType(AllocationMethod.STATIC) + .withIpv6AddressType(AllocationMethod.DYNAMIC) .withMacAddressType(AllocationMethod.STATIC) - .withNicId("fcp"))); + .withNicId("ofjchvcyyysf"), + new NetworkInterfaceUpdate().withName("otcubi") + .withMacAddress("uipwoqonmacje") + .withVirtualNetworkId("izsh") + .withIpv4AddressType(AllocationMethod.DYNAMIC) + .withIpv6AddressType(AllocationMethod.DYNAMIC) + .withMacAddressType(AllocationMethod.DYNAMIC) + .withNicId("fgmblrrilbywdxsm"))); model = BinaryData.fromObject(model).toObject(NetworkProfileUpdate.class); - Assertions.assertEquals("ae", model.networkInterfaces().get(0).name()); - Assertions.assertEquals("fhyhltrpmopjmcma", model.networkInterfaces().get(0).macAddress()); - Assertions.assertEquals("okth", model.networkInterfaces().get(0).virtualNetworkId()); + Assertions.assertEquals("kokwbqplhlvnu", model.networkInterfaces().get(0).name()); + Assertions.assertEquals("pzlrphw", model.networkInterfaces().get(0).macAddress()); + Assertions.assertEquals("oldweyuqdu", model.networkInterfaces().get(0).virtualNetworkId()); Assertions.assertEquals(AllocationMethod.DYNAMIC, model.networkInterfaces().get(0).ipv4AddressType()); Assertions.assertEquals(AllocationMethod.STATIC, model.networkInterfaces().get(0).ipv6AddressType()); - Assertions.assertEquals(AllocationMethod.STATIC, model.networkInterfaces().get(0).macAddressType()); - Assertions.assertEquals("fcp", model.networkInterfaces().get(0).nicId()); + Assertions.assertEquals(AllocationMethod.DYNAMIC, model.networkInterfaces().get(0).macAddressType()); + Assertions.assertEquals("biorktal", model.networkInterfaces().get(0).nicId()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/OperationDisplayTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/OperationDisplayTests.java index 1f0dad009903..1c79aae27595 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/OperationDisplayTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/OperationDisplayTests.java @@ -1,18 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.scvmm.models.OperationDisplay; +import org.junit.jupiter.api.Assertions; public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData - .fromString( - "{\"provider\":\"gg\",\"resource\":\"bfs\",\"operation\":\"rbu\",\"description\":\"cvpnazzmhjrunmpx\"}") + OperationDisplay model = BinaryData.fromString( + "{\"provider\":\"cdm\",\"resource\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"description\":\"kknryrtihf\"}") .toObject(OperationDisplay.class); + Assertions.assertEquals("cdm", model.provider()); + Assertions.assertEquals("rcryuanzwuxzdxta", model.resource()); + Assertions.assertEquals("lhmwhfpmrqobm", model.operation()); + Assertions.assertEquals("kknryrtihf", model.description()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/OperationInnerTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/OperationInnerTests.java index 3b4ddee8d253..decca3f1001f 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/OperationInnerTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/OperationInnerTests.java @@ -1,17 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.scvmm.fluent.models.OperationInner; +import com.azure.resourcemanager.scvmm.models.ActionType; +import org.junit.jupiter.api.Assertions; public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationInner model = BinaryData.fromString( - "{\"name\":\"pvecxgodeb\",\"isDataAction\":false,\"display\":{\"provider\":\"bmpukgriwflz\",\"resource\":\"bxzpuzycisp\",\"operation\":\"zahmgkbrpyydhibn\",\"description\":\"qkpikadrgvtqagnb\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") + "{\"name\":\"nygj\",\"isDataAction\":true,\"display\":{\"provider\":\"eqsrdeupewnwreit\",\"resource\":\"yflusarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") .toObject(OperationInner.class); + Assertions.assertEquals("eqsrdeupewnwreit", model.display().provider()); + Assertions.assertEquals("yflusarhmofc", model.display().resource()); + Assertions.assertEquals("smy", model.display().operation()); + Assertions.assertEquals("kdtmlxhekuk", model.display().description()); + Assertions.assertEquals(ActionType.INTERNAL, model.actionType()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/OperationListResultTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/OperationListResultTests.java index 991393632ac2..86e534725f69 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/OperationListResultTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/OperationListResultTests.java @@ -1,17 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.scvmm.models.OperationListResult; +import com.azure.resourcemanager.scvmm.implementation.models.OperationListResult; +import com.azure.resourcemanager.scvmm.models.ActionType; +import org.junit.jupiter.api.Assertions; public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"kix\",\"isDataAction\":false,\"display\":{\"provider\":\"eputtmrywnuzoqf\",\"resource\":\"yqzrnkcqvyxlw\",\"operation\":\"lsicohoqqnwv\",\"description\":\"yav\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"mmqhgyxzkonocuk\",\"isDataAction\":false,\"display\":{\"provider\":\"xuconu\",\"resource\":\"zf\",\"operation\":\"eyp\",\"description\":\"rmjmwvvjektc\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"lrsf\",\"isDataAction\":false,\"display\":{\"provider\":\"v\",\"resource\":\"dqgbiqylihkaetc\",\"operation\":\"vfcivfsnkymuc\",\"description\":\"hjfbebrjcxe\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"ttxfvjr\",\"isDataAction\":false,\"display\":{\"provider\":\"xepcyvahfn\",\"resource\":\"kyqxjvuujqgidokg\",\"operation\":\"jyoxgvclt\",\"description\":\"sncghkjeszz\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"xfvgxbfsmxne\"}") + "{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"fpownoizhwlr\",\"isDataAction\":false,\"display\":{\"provider\":\"oqijgkdmbpaz\",\"resource\":\"bc\",\"operation\":\"pdznrbtcqqjnqgl\",\"description\":\"gnufoooj\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"esaagdfm\",\"isDataAction\":true,\"display\":{\"provider\":\"j\",\"resource\":\"ifkwmrvktsizntoc\",\"operation\":\"a\",\"description\":\"ajpsquc\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"kfo\"}") .toObject(OperationListResult.class); + Assertions.assertEquals("pybczmehmtzopb", model.value().get(0).display().provider()); + Assertions.assertEquals("h", model.value().get(0).display().resource()); + Assertions.assertEquals("pidgsybbejhphoyc", model.value().get(0).display().operation()); + Assertions.assertEquals("xaobhdxbmtqioqjz", model.value().get(0).display().description()); + Assertions.assertEquals(ActionType.INTERNAL, model.value().get(0).actionType()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/OperationsListMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/OperationsListMockTests.java index 9e058a45439f..dd1495bdd006 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/OperationsListMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/OperationsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -10,10 +10,12 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; +import com.azure.resourcemanager.scvmm.models.ActionType; import com.azure.resourcemanager.scvmm.models.Operation; 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; @@ -21,16 +23,21 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"immbcx\",\"isDataAction\":true,\"display\":{\"provider\":\"orxvxcjzhqiz\",\"resource\":\"pxtgqscjav\",\"operation\":\"juhdqazkmtgguwpi\",\"description\":\"ajc\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"xonbzoggculapz\",\"isDataAction\":true,\"display\":{\"provider\":\"ogtqxepnylbf\",\"resource\":\"jlyjtlvofq\",\"operation\":\"vfcibyfmowux\",\"description\":\"jpvd\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); + Assertions.assertEquals("ogtqxepnylbf", response.iterator().next().display().provider()); + Assertions.assertEquals("jlyjtlvofq", response.iterator().next().display().resource()); + Assertions.assertEquals("vfcibyfmowux", response.iterator().next().display().operation()); + Assertions.assertEquals("jpvd", response.iterator().next().display().description()); + Assertions.assertEquals(ActionType.INTERNAL, response.iterator().next().actionType()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StopVirtualMachineOptionsTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StopVirtualMachineOptionsTests.java index 34a7584f8d96..030ca4a3f8b9 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StopVirtualMachineOptionsTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StopVirtualMachineOptionsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -13,14 +13,14 @@ public final class StopVirtualMachineOptionsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StopVirtualMachineOptions model - = BinaryData.fromString("{\"skipShutdown\":\"false\"}").toObject(StopVirtualMachineOptions.class); - Assertions.assertEquals(SkipShutdown.FALSE, model.skipShutdown()); + = BinaryData.fromString("{\"skipShutdown\":\"true\"}").toObject(StopVirtualMachineOptions.class); + Assertions.assertEquals(SkipShutdown.TRUE, model.skipShutdown()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StopVirtualMachineOptions model = new StopVirtualMachineOptions().withSkipShutdown(SkipShutdown.FALSE); + StopVirtualMachineOptions model = new StopVirtualMachineOptions().withSkipShutdown(SkipShutdown.TRUE); model = BinaryData.fromObject(model).toObject(StopVirtualMachineOptions.class); - Assertions.assertEquals(SkipShutdown.FALSE, model.skipShutdown()); + Assertions.assertEquals(SkipShutdown.TRUE, model.skipShutdown()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StorageProfileTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StorageProfileTests.java index 2ad2c09cfcad..088df981cd5b 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StorageProfileTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StorageProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -16,59 +16,55 @@ public final class StorageProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageProfile model = BinaryData.fromString( - "{\"disks\":[{\"name\":\"xsabkyqdu\",\"displayName\":\"itcjczdz\",\"diskId\":\"ndhkrw\",\"diskSizeGB\":881924894,\"maxDiskSizeGB\":176871010,\"bus\":1872271759,\"lun\":223251370,\"busType\":\"vwrwj\",\"vhdType\":\"usnhutje\",\"volumeType\":\"mrldhu\",\"vhdFormatType\":\"zzd\",\"templateDiskId\":\"qxhocdgeablgphut\",\"storageQoSPolicy\":{\"name\":\"dvkaozw\",\"id\":\"ftyhxhurokf\"},\"createDiffDisk\":\"false\"},{\"name\":\"lniwpwcukjfkgiaw\",\"displayName\":\"lryplwckbasyy\",\"diskId\":\"ddhsgcbacphe\",\"diskSizeGB\":370872808,\"maxDiskSizeGB\":2065161762,\"bus\":2116203102,\"lun\":813482060,\"busType\":\"l\",\"vhdType\":\"dlikwyqkgfgibma\",\"volumeType\":\"akeqs\",\"vhdFormatType\":\"yb\",\"templateDiskId\":\"qedqytbciqfoufl\",\"storageQoSPolicy\":{\"name\":\"kzsmodm\",\"id\":\"ougpbkwt\"},\"createDiffDisk\":\"false\"}]}") + "{\"disks\":[{\"name\":\"pelmcuvhixbjxyf\",\"displayName\":\"yl\",\"diskId\":\"ool\",\"diskSizeGB\":1240689127,\"maxDiskSizeGB\":320221155,\"bus\":156092628,\"lun\":1511616464,\"busType\":\"nujrywvtyl\",\"vhdType\":\"pncur\",\"volumeType\":\"iwii\",\"vhdFormatType\":\"tywubxcbihwq\",\"templateDiskId\":\"fdntwjchrdgoih\",\"storageQoSPolicy\":{\"name\":\"wct\",\"id\":\"dzjlu\"},\"createDiffDisk\":\"true\"},{\"name\":\"lwg\",\"displayName\":\"tsbwtovvtgse\",\"diskId\":\"qfi\",\"diskSizeGB\":257068718,\"maxDiskSizeGB\":1223110676,\"bus\":757625911,\"lun\":2046119653,\"busType\":\"nepttwqmsni\",\"vhdType\":\"cdm\",\"volumeType\":\"r\",\"vhdFormatType\":\"lpijnkrxfrd\",\"templateDiskId\":\"c\",\"storageQoSPolicy\":{\"name\":\"izzronasxiftozqy\",\"id\":\"f\"},\"createDiffDisk\":\"true\"}]}") .toObject(StorageProfile.class); - Assertions.assertEquals("xsabkyqdu", model.disks().get(0).name()); - Assertions.assertEquals("ndhkrw", model.disks().get(0).diskId()); - Assertions.assertEquals(881924894, model.disks().get(0).diskSizeGB()); - Assertions.assertEquals(1872271759, model.disks().get(0).bus()); - Assertions.assertEquals(223251370, model.disks().get(0).lun()); - Assertions.assertEquals("vwrwj", model.disks().get(0).busType()); - Assertions.assertEquals("usnhutje", model.disks().get(0).vhdType()); - Assertions.assertEquals("qxhocdgeablgphut", model.disks().get(0).templateDiskId()); - Assertions.assertEquals("dvkaozw", model.disks().get(0).storageQosPolicy().name()); - Assertions.assertEquals("ftyhxhurokf", model.disks().get(0).storageQosPolicy().id()); - Assertions.assertEquals(CreateDiffDisk.FALSE, model.disks().get(0).createDiffDisk()); + Assertions.assertEquals("pelmcuvhixbjxyf", model.disks().get(0).name()); + Assertions.assertEquals("ool", model.disks().get(0).diskId()); + Assertions.assertEquals(1240689127, model.disks().get(0).diskSizeGB()); + Assertions.assertEquals(156092628, model.disks().get(0).bus()); + Assertions.assertEquals(1511616464, model.disks().get(0).lun()); + Assertions.assertEquals("nujrywvtyl", model.disks().get(0).busType()); + Assertions.assertEquals("pncur", model.disks().get(0).vhdType()); + Assertions.assertEquals("fdntwjchrdgoih", model.disks().get(0).templateDiskId()); + Assertions.assertEquals("wct", model.disks().get(0).storageQosPolicy().name()); + Assertions.assertEquals("dzjlu", model.disks().get(0).storageQosPolicy().id()); + Assertions.assertEquals(CreateDiffDisk.TRUE, model.disks().get(0).createDiffDisk()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StorageProfile model - = new StorageProfile() - .withDisks( - Arrays.asList( - new VirtualDisk().withName("xsabkyqdu") - .withDiskId("ndhkrw") - .withDiskSizeGB(881924894) - .withBus(1872271759) - .withLun(223251370) - .withBusType("vwrwj") - .withVhdType("usnhutje") - .withTemplateDiskId("qxhocdgeablgphut") - .withStorageQosPolicy( - new StorageQosPolicyDetails().withName("dvkaozw").withId("ftyhxhurokf")) - .withCreateDiffDisk(CreateDiffDisk.FALSE), - new VirtualDisk().withName("lniwpwcukjfkgiaw") - .withDiskId("ddhsgcbacphe") - .withDiskSizeGB(370872808) - .withBus(2116203102) - .withLun(813482060) - .withBusType("l") - .withVhdType("dlikwyqkgfgibma") - .withTemplateDiskId("qedqytbciqfoufl") - .withStorageQosPolicy(new StorageQosPolicyDetails().withName("kzsmodm").withId("ougpbkwt")) - .withCreateDiffDisk(CreateDiffDisk.FALSE))); + StorageProfile model = new StorageProfile().withDisks(Arrays.asList( + new VirtualDisk().withName("pelmcuvhixbjxyf") + .withDiskId("ool") + .withDiskSizeGB(1240689127) + .withBus(156092628) + .withLun(1511616464) + .withBusType("nujrywvtyl") + .withVhdType("pncur") + .withTemplateDiskId("fdntwjchrdgoih") + .withStorageQosPolicy(new StorageQosPolicyDetails().withName("wct").withId("dzjlu")) + .withCreateDiffDisk(CreateDiffDisk.TRUE), + new VirtualDisk().withName("lwg") + .withDiskId("qfi") + .withDiskSizeGB(257068718) + .withBus(757625911) + .withLun(2046119653) + .withBusType("nepttwqmsni") + .withVhdType("cdm") + .withTemplateDiskId("c") + .withStorageQosPolicy(new StorageQosPolicyDetails().withName("izzronasxiftozqy").withId("f")) + .withCreateDiffDisk(CreateDiffDisk.TRUE))); model = BinaryData.fromObject(model).toObject(StorageProfile.class); - Assertions.assertEquals("xsabkyqdu", model.disks().get(0).name()); - Assertions.assertEquals("ndhkrw", model.disks().get(0).diskId()); - Assertions.assertEquals(881924894, model.disks().get(0).diskSizeGB()); - Assertions.assertEquals(1872271759, model.disks().get(0).bus()); - Assertions.assertEquals(223251370, model.disks().get(0).lun()); - Assertions.assertEquals("vwrwj", model.disks().get(0).busType()); - Assertions.assertEquals("usnhutje", model.disks().get(0).vhdType()); - Assertions.assertEquals("qxhocdgeablgphut", model.disks().get(0).templateDiskId()); - Assertions.assertEquals("dvkaozw", model.disks().get(0).storageQosPolicy().name()); - Assertions.assertEquals("ftyhxhurokf", model.disks().get(0).storageQosPolicy().id()); - Assertions.assertEquals(CreateDiffDisk.FALSE, model.disks().get(0).createDiffDisk()); + Assertions.assertEquals("pelmcuvhixbjxyf", model.disks().get(0).name()); + Assertions.assertEquals("ool", model.disks().get(0).diskId()); + Assertions.assertEquals(1240689127, model.disks().get(0).diskSizeGB()); + Assertions.assertEquals(156092628, model.disks().get(0).bus()); + Assertions.assertEquals(1511616464, model.disks().get(0).lun()); + Assertions.assertEquals("nujrywvtyl", model.disks().get(0).busType()); + Assertions.assertEquals("pncur", model.disks().get(0).vhdType()); + Assertions.assertEquals("fdntwjchrdgoih", model.disks().get(0).templateDiskId()); + Assertions.assertEquals("wct", model.disks().get(0).storageQosPolicy().name()); + Assertions.assertEquals("dzjlu", model.disks().get(0).storageQosPolicy().id()); + Assertions.assertEquals(CreateDiffDisk.TRUE, model.disks().get(0).createDiffDisk()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StorageProfileUpdateTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StorageProfileUpdateTests.java index 282e0075487d..554d39cf4a1f 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StorageProfileUpdateTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StorageProfileUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -15,39 +15,39 @@ public final class StorageProfileUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageProfileUpdate model = BinaryData.fromString( - "{\"disks\":[{\"name\":\"mddystkiiux\",\"diskId\":\"yudxorrqnbp\",\"diskSizeGB\":999035629,\"bus\":2085551487,\"lun\":2041227856,\"busType\":\"rvkdvjsllrm\",\"vhdType\":\"d\",\"storageQoSPolicy\":{\"name\":\"t\",\"id\":\"n\"}}]}") + "{\"disks\":[{\"name\":\"oljxkcgx\",\"diskId\":\"xsffgcviz\",\"diskSizeGB\":546640275,\"bus\":27871888,\"lun\":94477387,\"busType\":\"youpfgfbkj\",\"vhdType\":\"dyhgkfminsg\",\"storageQoSPolicy\":{\"name\":\"fttsttk\",\"id\":\"ahbqactxtgzuk\"}}]}") .toObject(StorageProfileUpdate.class); - Assertions.assertEquals("mddystkiiux", model.disks().get(0).name()); - Assertions.assertEquals("yudxorrqnbp", model.disks().get(0).diskId()); - Assertions.assertEquals(999035629, model.disks().get(0).diskSizeGB()); - Assertions.assertEquals(2085551487, model.disks().get(0).bus()); - Assertions.assertEquals(2041227856, model.disks().get(0).lun()); - Assertions.assertEquals("rvkdvjsllrm", model.disks().get(0).busType()); - Assertions.assertEquals("d", model.disks().get(0).vhdType()); - Assertions.assertEquals("t", model.disks().get(0).storageQosPolicy().name()); - Assertions.assertEquals("n", model.disks().get(0).storageQosPolicy().id()); + Assertions.assertEquals("oljxkcgx", model.disks().get(0).name()); + Assertions.assertEquals("xsffgcviz", model.disks().get(0).diskId()); + Assertions.assertEquals(546640275, model.disks().get(0).diskSizeGB()); + Assertions.assertEquals(27871888, model.disks().get(0).bus()); + Assertions.assertEquals(94477387, model.disks().get(0).lun()); + Assertions.assertEquals("youpfgfbkj", model.disks().get(0).busType()); + Assertions.assertEquals("dyhgkfminsg", model.disks().get(0).vhdType()); + Assertions.assertEquals("fttsttk", model.disks().get(0).storageQosPolicy().name()); + Assertions.assertEquals("ahbqactxtgzuk", model.disks().get(0).storageQosPolicy().id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StorageProfileUpdate model - = new StorageProfileUpdate().withDisks(Arrays.asList(new VirtualDiskUpdate().withName("mddystkiiux") - .withDiskId("yudxorrqnbp") - .withDiskSizeGB(999035629) - .withBus(2085551487) - .withLun(2041227856) - .withBusType("rvkdvjsllrm") - .withVhdType("d") - .withStorageQosPolicy(new StorageQosPolicyDetails().withName("t").withId("n")))); + = new StorageProfileUpdate().withDisks(Arrays.asList(new VirtualDiskUpdate().withName("oljxkcgx") + .withDiskId("xsffgcviz") + .withDiskSizeGB(546640275) + .withBus(27871888) + .withLun(94477387) + .withBusType("youpfgfbkj") + .withVhdType("dyhgkfminsg") + .withStorageQosPolicy(new StorageQosPolicyDetails().withName("fttsttk").withId("ahbqactxtgzuk")))); model = BinaryData.fromObject(model).toObject(StorageProfileUpdate.class); - Assertions.assertEquals("mddystkiiux", model.disks().get(0).name()); - Assertions.assertEquals("yudxorrqnbp", model.disks().get(0).diskId()); - Assertions.assertEquals(999035629, model.disks().get(0).diskSizeGB()); - Assertions.assertEquals(2085551487, model.disks().get(0).bus()); - Assertions.assertEquals(2041227856, model.disks().get(0).lun()); - Assertions.assertEquals("rvkdvjsllrm", model.disks().get(0).busType()); - Assertions.assertEquals("d", model.disks().get(0).vhdType()); - Assertions.assertEquals("t", model.disks().get(0).storageQosPolicy().name()); - Assertions.assertEquals("n", model.disks().get(0).storageQosPolicy().id()); + Assertions.assertEquals("oljxkcgx", model.disks().get(0).name()); + Assertions.assertEquals("xsffgcviz", model.disks().get(0).diskId()); + Assertions.assertEquals(546640275, model.disks().get(0).diskSizeGB()); + Assertions.assertEquals(27871888, model.disks().get(0).bus()); + Assertions.assertEquals(94477387, model.disks().get(0).lun()); + Assertions.assertEquals("youpfgfbkj", model.disks().get(0).busType()); + Assertions.assertEquals("dyhgkfminsg", model.disks().get(0).vhdType()); + Assertions.assertEquals("fttsttk", model.disks().get(0).storageQosPolicy().name()); + Assertions.assertEquals("ahbqactxtgzuk", model.disks().get(0).storageQosPolicy().id()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StorageQosPolicyDetailsTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StorageQosPolicyDetailsTests.java index abdf4992d054..9266ad3b299c 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StorageQosPolicyDetailsTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StorageQosPolicyDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,17 +11,17 @@ public final class StorageQosPolicyDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - StorageQosPolicyDetails model = BinaryData.fromString("{\"name\":\"bnwbxgjvtbvpyssz\",\"id\":\"rujqg\"}") + StorageQosPolicyDetails model = BinaryData.fromString("{\"name\":\"vu\",\"id\":\"hzovawjvzunlut\"}") .toObject(StorageQosPolicyDetails.class); - Assertions.assertEquals("bnwbxgjvtbvpyssz", model.name()); - Assertions.assertEquals("rujqg", model.id()); + Assertions.assertEquals("vu", model.name()); + Assertions.assertEquals("hzovawjvzunlut", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StorageQosPolicyDetails model = new StorageQosPolicyDetails().withName("bnwbxgjvtbvpyssz").withId("rujqg"); + StorageQosPolicyDetails model = new StorageQosPolicyDetails().withName("vu").withId("hzovawjvzunlut"); model = BinaryData.fromObject(model).toObject(StorageQosPolicyDetails.class); - Assertions.assertEquals("bnwbxgjvtbvpyssz", model.name()); - Assertions.assertEquals("rujqg", model.id()); + Assertions.assertEquals("vu", model.name()); + Assertions.assertEquals("hzovawjvzunlut", model.id()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StorageQosPolicyTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StorageQosPolicyTests.java index 46b07e701412..efc4329c98c8 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StorageQosPolicyTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/StorageQosPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -12,30 +12,13 @@ public final class StorageQosPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageQosPolicy model = BinaryData.fromString( - "{\"name\":\"konzmnsik\",\"id\":\"kqze\",\"iopsMaximum\":4891735483783264620,\"iopsMinimum\":3222886554645871935,\"bandwidthLimit\":2941591087358508203,\"policyId\":\"hvhgureod\"}") + "{\"name\":\"asvm\",\"id\":\"jqul\",\"iopsMaximum\":4088655533498643157,\"iopsMinimum\":4775816449202065722,\"bandwidthLimit\":2526759619318985814,\"policyId\":\"gc\"}") .toObject(StorageQosPolicy.class); - Assertions.assertEquals("konzmnsik", model.name()); - Assertions.assertEquals("kqze", model.id()); - Assertions.assertEquals(4891735483783264620L, model.iopsMaximum()); - Assertions.assertEquals(3222886554645871935L, model.iopsMinimum()); - Assertions.assertEquals(2941591087358508203L, model.bandwidthLimit()); - Assertions.assertEquals("hvhgureod", model.policyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageQosPolicy model = new StorageQosPolicy().withName("konzmnsik") - .withId("kqze") - .withIopsMaximum(4891735483783264620L) - .withIopsMinimum(3222886554645871935L) - .withBandwidthLimit(2941591087358508203L) - .withPolicyId("hvhgureod"); - model = BinaryData.fromObject(model).toObject(StorageQosPolicy.class); - Assertions.assertEquals("konzmnsik", model.name()); - Assertions.assertEquals("kqze", model.id()); - Assertions.assertEquals(4891735483783264620L, model.iopsMaximum()); - Assertions.assertEquals(3222886554645871935L, model.iopsMinimum()); - Assertions.assertEquals(2941591087358508203L, model.bandwidthLimit()); - Assertions.assertEquals("hvhgureod", model.policyId()); + Assertions.assertEquals("asvm", model.name()); + Assertions.assertEquals("jqul", model.id()); + Assertions.assertEquals(4088655533498643157L, model.iopsMaximum()); + Assertions.assertEquals(4775816449202065722L, model.iopsMinimum()); + Assertions.assertEquals(2526759619318985814L, model.bandwidthLimit()); + Assertions.assertEquals("gc", model.policyId()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualDiskTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualDiskTests.java index 904ba797e335..e39d4d66f8b1 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualDiskTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualDiskTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -14,44 +14,44 @@ public final class VirtualDiskTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualDisk model = BinaryData.fromString( - "{\"name\":\"uqktap\",\"displayName\":\"wgcu\",\"diskId\":\"tumkdosvqwhbm\",\"diskSizeGB\":1497620633,\"maxDiskSizeGB\":398280406,\"bus\":1089342550,\"lun\":763703494,\"busType\":\"bmbexppbhtqqro\",\"vhdType\":\"p\",\"volumeType\":\"s\",\"vhdFormatType\":\"gbquxigj\",\"templateDiskId\":\"gzjaoyfhrtxilne\",\"storageQoSPolicy\":{\"name\":\"jysvl\",\"id\":\"uvfqawrlyxwj\"},\"createDiffDisk\":\"false\"}") + "{\"name\":\"vlvqhjkbegi\",\"displayName\":\"nmxiebwwaloayqc\",\"diskId\":\"rtzju\",\"diskSizeGB\":47396428,\"maxDiskSizeGB\":598094792,\"bus\":1235130312,\"lun\":1961357126,\"busType\":\"ngmtsavjcb\",\"vhdType\":\"xqpsrknftguv\",\"volumeType\":\"uhprwmdyvxqt\",\"vhdFormatType\":\"riwwroy\",\"templateDiskId\":\"exrmcqibycnojvk\",\"storageQoSPolicy\":{\"name\":\"fqsgzvahapjy\",\"id\":\"pvgqzcjrvxdjzlm\"},\"createDiffDisk\":\"false\"}") .toObject(VirtualDisk.class); - Assertions.assertEquals("uqktap", model.name()); - Assertions.assertEquals("tumkdosvqwhbm", model.diskId()); - Assertions.assertEquals(1497620633, model.diskSizeGB()); - Assertions.assertEquals(1089342550, model.bus()); - Assertions.assertEquals(763703494, model.lun()); - Assertions.assertEquals("bmbexppbhtqqro", model.busType()); - Assertions.assertEquals("p", model.vhdType()); - Assertions.assertEquals("gzjaoyfhrtxilne", model.templateDiskId()); - Assertions.assertEquals("jysvl", model.storageQosPolicy().name()); - Assertions.assertEquals("uvfqawrlyxwj", model.storageQosPolicy().id()); + Assertions.assertEquals("vlvqhjkbegi", model.name()); + Assertions.assertEquals("rtzju", model.diskId()); + Assertions.assertEquals(47396428, model.diskSizeGB()); + Assertions.assertEquals(1235130312, model.bus()); + Assertions.assertEquals(1961357126, model.lun()); + Assertions.assertEquals("ngmtsavjcb", model.busType()); + Assertions.assertEquals("xqpsrknftguv", model.vhdType()); + Assertions.assertEquals("exrmcqibycnojvk", model.templateDiskId()); + Assertions.assertEquals("fqsgzvahapjy", model.storageQosPolicy().name()); + Assertions.assertEquals("pvgqzcjrvxdjzlm", model.storageQosPolicy().id()); Assertions.assertEquals(CreateDiffDisk.FALSE, model.createDiffDisk()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualDisk model = new VirtualDisk().withName("uqktap") - .withDiskId("tumkdosvqwhbm") - .withDiskSizeGB(1497620633) - .withBus(1089342550) - .withLun(763703494) - .withBusType("bmbexppbhtqqro") - .withVhdType("p") - .withTemplateDiskId("gzjaoyfhrtxilne") - .withStorageQosPolicy(new StorageQosPolicyDetails().withName("jysvl").withId("uvfqawrlyxwj")) + VirtualDisk model = new VirtualDisk().withName("vlvqhjkbegi") + .withDiskId("rtzju") + .withDiskSizeGB(47396428) + .withBus(1235130312) + .withLun(1961357126) + .withBusType("ngmtsavjcb") + .withVhdType("xqpsrknftguv") + .withTemplateDiskId("exrmcqibycnojvk") + .withStorageQosPolicy(new StorageQosPolicyDetails().withName("fqsgzvahapjy").withId("pvgqzcjrvxdjzlm")) .withCreateDiffDisk(CreateDiffDisk.FALSE); model = BinaryData.fromObject(model).toObject(VirtualDisk.class); - Assertions.assertEquals("uqktap", model.name()); - Assertions.assertEquals("tumkdosvqwhbm", model.diskId()); - Assertions.assertEquals(1497620633, model.diskSizeGB()); - Assertions.assertEquals(1089342550, model.bus()); - Assertions.assertEquals(763703494, model.lun()); - Assertions.assertEquals("bmbexppbhtqqro", model.busType()); - Assertions.assertEquals("p", model.vhdType()); - Assertions.assertEquals("gzjaoyfhrtxilne", model.templateDiskId()); - Assertions.assertEquals("jysvl", model.storageQosPolicy().name()); - Assertions.assertEquals("uvfqawrlyxwj", model.storageQosPolicy().id()); + Assertions.assertEquals("vlvqhjkbegi", model.name()); + Assertions.assertEquals("rtzju", model.diskId()); + Assertions.assertEquals(47396428, model.diskSizeGB()); + Assertions.assertEquals(1235130312, model.bus()); + Assertions.assertEquals(1961357126, model.lun()); + Assertions.assertEquals("ngmtsavjcb", model.busType()); + Assertions.assertEquals("xqpsrknftguv", model.vhdType()); + Assertions.assertEquals("exrmcqibycnojvk", model.templateDiskId()); + Assertions.assertEquals("fqsgzvahapjy", model.storageQosPolicy().name()); + Assertions.assertEquals("pvgqzcjrvxdjzlm", model.storageQosPolicy().id()); Assertions.assertEquals(CreateDiffDisk.FALSE, model.createDiffDisk()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualDiskUpdateTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualDiskUpdateTests.java index d3676dff3177..b4af697fd319 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualDiskUpdateTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualDiskUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -13,38 +13,38 @@ public final class VirtualDiskUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualDiskUpdate model = BinaryData.fromString( - "{\"name\":\"lexxbczwtru\",\"diskId\":\"qzbqjvsov\",\"diskSizeGB\":1785684937,\"bus\":1778259828,\"lun\":1485053733,\"busType\":\"kwlhzdo\",\"vhdType\":\"xjmflbvv\",\"storageQoSPolicy\":{\"name\":\"rkcciwwzjuqk\",\"id\":\"sa\"}}") + "{\"name\":\"tmmqtgqqqxhrn\",\"diskId\":\"xcpjuisavokqdzf\",\"diskSizeGB\":1042869569,\"bus\":2015132564,\"lun\":225909755,\"busType\":\"rqttbajlkatnw\",\"vhdType\":\"iopid\",\"storageQoSPolicy\":{\"name\":\"fku\",\"id\":\"cxkdmligovi\"}}") .toObject(VirtualDiskUpdate.class); - Assertions.assertEquals("lexxbczwtru", model.name()); - Assertions.assertEquals("qzbqjvsov", model.diskId()); - Assertions.assertEquals(1785684937, model.diskSizeGB()); - Assertions.assertEquals(1778259828, model.bus()); - Assertions.assertEquals(1485053733, model.lun()); - Assertions.assertEquals("kwlhzdo", model.busType()); - Assertions.assertEquals("xjmflbvv", model.vhdType()); - Assertions.assertEquals("rkcciwwzjuqk", model.storageQosPolicy().name()); - Assertions.assertEquals("sa", model.storageQosPolicy().id()); + Assertions.assertEquals("tmmqtgqqqxhrn", model.name()); + Assertions.assertEquals("xcpjuisavokqdzf", model.diskId()); + Assertions.assertEquals(1042869569, model.diskSizeGB()); + Assertions.assertEquals(2015132564, model.bus()); + Assertions.assertEquals(225909755, model.lun()); + Assertions.assertEquals("rqttbajlkatnw", model.busType()); + Assertions.assertEquals("iopid", model.vhdType()); + Assertions.assertEquals("fku", model.storageQosPolicy().name()); + Assertions.assertEquals("cxkdmligovi", model.storageQosPolicy().id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualDiskUpdate model = new VirtualDiskUpdate().withName("lexxbczwtru") - .withDiskId("qzbqjvsov") - .withDiskSizeGB(1785684937) - .withBus(1778259828) - .withLun(1485053733) - .withBusType("kwlhzdo") - .withVhdType("xjmflbvv") - .withStorageQosPolicy(new StorageQosPolicyDetails().withName("rkcciwwzjuqk").withId("sa")); + VirtualDiskUpdate model = new VirtualDiskUpdate().withName("tmmqtgqqqxhrn") + .withDiskId("xcpjuisavokqdzf") + .withDiskSizeGB(1042869569) + .withBus(2015132564) + .withLun(225909755) + .withBusType("rqttbajlkatnw") + .withVhdType("iopid") + .withStorageQosPolicy(new StorageQosPolicyDetails().withName("fku").withId("cxkdmligovi")); model = BinaryData.fromObject(model).toObject(VirtualDiskUpdate.class); - Assertions.assertEquals("lexxbczwtru", model.name()); - Assertions.assertEquals("qzbqjvsov", model.diskId()); - Assertions.assertEquals(1785684937, model.diskSizeGB()); - Assertions.assertEquals(1778259828, model.bus()); - Assertions.assertEquals(1485053733, model.lun()); - Assertions.assertEquals("kwlhzdo", model.busType()); - Assertions.assertEquals("xjmflbvv", model.vhdType()); - Assertions.assertEquals("rkcciwwzjuqk", model.storageQosPolicy().name()); - Assertions.assertEquals("sa", model.storageQosPolicy().id()); + Assertions.assertEquals("tmmqtgqqqxhrn", model.name()); + Assertions.assertEquals("xcpjuisavokqdzf", model.diskId()); + Assertions.assertEquals(1042869569, model.diskSizeGB()); + Assertions.assertEquals(2015132564, model.bus()); + Assertions.assertEquals(225909755, model.lun()); + Assertions.assertEquals("rqttbajlkatnw", model.busType()); + Assertions.assertEquals("iopid", model.vhdType()); + Assertions.assertEquals("fku", model.storageQosPolicy().name()); + Assertions.assertEquals("cxkdmligovi", model.storageQosPolicy().id()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineCreateCheckpointTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineCreateCheckpointTests.java index 80eb03b877bc..2df36013876a 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineCreateCheckpointTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineCreateCheckpointTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,19 +11,18 @@ public final class VirtualMachineCreateCheckpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualMachineCreateCheckpoint model - = BinaryData.fromString("{\"name\":\"jmvxie\",\"description\":\"ugidyjrr\"}") - .toObject(VirtualMachineCreateCheckpoint.class); - Assertions.assertEquals("jmvxie", model.name()); - Assertions.assertEquals("ugidyjrr", model.description()); + VirtualMachineCreateCheckpoint model = BinaryData.fromString("{\"name\":\"wt\",\"description\":\"kxn\"}") + .toObject(VirtualMachineCreateCheckpoint.class); + Assertions.assertEquals("wt", model.name()); + Assertions.assertEquals("kxn", model.description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineCreateCheckpoint model - = new VirtualMachineCreateCheckpoint().withName("jmvxie").withDescription("ugidyjrr"); + = new VirtualMachineCreateCheckpoint().withName("wt").withDescription("kxn"); model = BinaryData.fromObject(model).toObject(VirtualMachineCreateCheckpoint.class); - Assertions.assertEquals("jmvxie", model.name()); - Assertions.assertEquals("ugidyjrr", model.description()); + Assertions.assertEquals("wt", model.name()); + Assertions.assertEquals("kxn", model.description()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineDeleteCheckpointTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineDeleteCheckpointTests.java index 85ee7e7c1499..fb61433d59e6 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineDeleteCheckpointTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineDeleteCheckpointTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -12,14 +12,14 @@ public final class VirtualMachineDeleteCheckpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineDeleteCheckpoint model - = BinaryData.fromString("{\"id\":\"y\"}").toObject(VirtualMachineDeleteCheckpoint.class); - Assertions.assertEquals("y", model.id()); + = BinaryData.fromString("{\"id\":\"dabg\"}").toObject(VirtualMachineDeleteCheckpoint.class); + Assertions.assertEquals("dabg", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualMachineDeleteCheckpoint model = new VirtualMachineDeleteCheckpoint().withId("y"); + VirtualMachineDeleteCheckpoint model = new VirtualMachineDeleteCheckpoint().withId("dabg"); model = BinaryData.fromObject(model).toObject(VirtualMachineDeleteCheckpoint.class); - Assertions.assertEquals("y", model.id()); + Assertions.assertEquals("dabg", model.id()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstanceUpdatePropertiesTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstanceUpdatePropertiesTests.java index dac6c305e750..6af58cd629d4 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstanceUpdatePropertiesTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstanceUpdatePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -24,112 +24,123 @@ public final class VirtualMachineInstanceUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInstanceUpdateProperties model = BinaryData.fromString( - "{\"availabilitySets\":[{\"id\":\"jampmngnzscxaqw\",\"name\":\"chcbonqvpkvlrxnj\"},{\"id\":\"seiphe\",\"name\":\"lokeyy\"},{\"id\":\"nj\",\"name\":\"lwtgrhpdj\"}],\"hardwareProfile\":{\"memoryMB\":1270874920,\"cpuCount\":1786348929,\"limitCpuForMigration\":\"false\",\"dynamicMemoryEnabled\":\"true\",\"dynamicMemoryMaxMB\":958851014,\"dynamicMemoryMinMB\":184362773},\"networkProfile\":{\"networkInterfaces\":[{\"name\":\"hb\",\"macAddress\":\"hejjz\",\"virtualNetworkId\":\"dudgwdslfhot\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"bjnpg\"},{\"name\":\"ftadehxnltyfs\",\"macAddress\":\"pusuesn\",\"virtualNetworkId\":\"dejbavo\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"tbqvudw\"}]},\"storageProfile\":{\"disks\":[{\"name\":\"vo\",\"diskId\":\"ujjugwdkcglh\",\"diskSizeGB\":1950035591,\"bus\":3147535,\"lun\":24046342,\"busType\":\"gdtjixhbkuofqwey\",\"vhdType\":\"menevfyexfwh\",\"storageQoSPolicy\":{\"name\":\"i\",\"id\":\"yvdcsitynnaa\"}},{\"name\":\"ectehf\",\"diskId\":\"scjeypv\",\"diskSizeGB\":1363658384,\"bus\":902064602,\"lun\":177141497,\"busType\":\"c\",\"vhdType\":\"efovgmk\",\"storageQoSPolicy\":{\"name\":\"eyyvxyqjpkcat\",\"id\":\"ngj\"}}]},\"infrastructureProfile\":{\"checkpointType\":\"czsqpjhvm\"}}") + "{\"availabilitySets\":[{\"id\":\"ltfnhtbaxkgx\",\"name\":\"rc\"}],\"hardwareProfile\":{\"memoryMB\":479149992,\"cpuCount\":2090411231,\"limitCpuForMigration\":\"true\",\"dynamicMemoryEnabled\":\"true\",\"dynamicMemoryMaxMB\":1794429860,\"dynamicMemoryMinMB\":1007815098},\"networkProfile\":{\"networkInterfaces\":[{\"name\":\"lgzi\",\"macAddress\":\"hostgktstvdxecl\",\"virtualNetworkId\":\"dqbcvhzlhplod\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"bum\"},{\"name\":\"xtrqjfs\",\"macAddress\":\"mbtxhwgf\",\"virtualNetworkId\":\"rtawcoezb\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Dynamic\",\"nicId\":\"dyg\"},{\"name\":\"okkqfqjbvleo\",\"macAddress\":\"ml\",\"virtualNetworkId\":\"qtqzfavyv\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Dynamic\",\"nicId\":\"euayjkqabqgzsles\"},{\"name\":\"bhernntiew\",\"macAddress\":\"cv\",\"virtualNetworkId\":\"uwrbehwagoh\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"emvvhm\"}]},\"storageProfile\":{\"disks\":[{\"name\":\"futacoebjvewzc\",\"diskId\":\"nmwcpmgu\",\"diskSizeGB\":607473544,\"bus\":1984994243,\"lun\":1430460397,\"busType\":\"ctkahzov\",\"vhdType\":\"j\",\"storageQoSPolicy\":{\"name\":\"xxpshneeku\",\"id\":\"gs\"}},{\"name\":\"ubkwdle\",\"diskId\":\"d\",\"diskSizeGB\":203229589,\"bus\":1171802077,\"lun\":168697362,\"busType\":\"pjuohminyfl\",\"vhdType\":\"rwm\",\"storageQoSPolicy\":{\"name\":\"wpklvxw\",\"id\":\"gdxpg\"}}]},\"infrastructureProfile\":{\"checkpointType\":\"hiszepnnbjcrxgib\"}}") .toObject(VirtualMachineInstanceUpdateProperties.class); - Assertions.assertEquals("jampmngnzscxaqw", model.availabilitySets().get(0).id()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.availabilitySets().get(0).name()); - Assertions.assertEquals(1270874920, model.hardwareProfile().memoryMB()); - Assertions.assertEquals(1786348929, model.hardwareProfile().cpuCount()); - Assertions.assertEquals(LimitCpuForMigration.FALSE, model.hardwareProfile().limitCpuForMigration()); + Assertions.assertEquals("ltfnhtbaxkgx", model.availabilitySets().get(0).id()); + Assertions.assertEquals("rc", model.availabilitySets().get(0).name()); + Assertions.assertEquals(479149992, model.hardwareProfile().memoryMB()); + Assertions.assertEquals(2090411231, model.hardwareProfile().cpuCount()); + Assertions.assertEquals(LimitCpuForMigration.TRUE, model.hardwareProfile().limitCpuForMigration()); Assertions.assertEquals(DynamicMemoryEnabled.TRUE, model.hardwareProfile().dynamicMemoryEnabled()); - Assertions.assertEquals(958851014, model.hardwareProfile().dynamicMemoryMaxMB()); - Assertions.assertEquals(184362773, model.hardwareProfile().dynamicMemoryMinMB()); - Assertions.assertEquals("hb", model.networkProfile().networkInterfaces().get(0).name()); - Assertions.assertEquals("hejjz", model.networkProfile().networkInterfaces().get(0).macAddress()); - Assertions.assertEquals("dudgwdslfhot", model.networkProfile().networkInterfaces().get(0).virtualNetworkId()); + Assertions.assertEquals(1794429860, model.hardwareProfile().dynamicMemoryMaxMB()); + Assertions.assertEquals(1007815098, model.hardwareProfile().dynamicMemoryMinMB()); + Assertions.assertEquals("lgzi", model.networkProfile().networkInterfaces().get(0).name()); + Assertions.assertEquals("hostgktstvdxecl", model.networkProfile().networkInterfaces().get(0).macAddress()); + Assertions.assertEquals("dqbcvhzlhplod", model.networkProfile().networkInterfaces().get(0).virtualNetworkId()); Assertions.assertEquals(AllocationMethod.STATIC, model.networkProfile().networkInterfaces().get(0).ipv4AddressType()); Assertions.assertEquals(AllocationMethod.STATIC, model.networkProfile().networkInterfaces().get(0).ipv6AddressType()); Assertions.assertEquals(AllocationMethod.STATIC, model.networkProfile().networkInterfaces().get(0).macAddressType()); - Assertions.assertEquals("bjnpg", model.networkProfile().networkInterfaces().get(0).nicId()); - Assertions.assertEquals("vo", model.storageProfile().disks().get(0).name()); - Assertions.assertEquals("ujjugwdkcglh", model.storageProfile().disks().get(0).diskId()); - Assertions.assertEquals(1950035591, model.storageProfile().disks().get(0).diskSizeGB()); - Assertions.assertEquals(3147535, model.storageProfile().disks().get(0).bus()); - Assertions.assertEquals(24046342, model.storageProfile().disks().get(0).lun()); - Assertions.assertEquals("gdtjixhbkuofqwey", model.storageProfile().disks().get(0).busType()); - Assertions.assertEquals("menevfyexfwh", model.storageProfile().disks().get(0).vhdType()); - Assertions.assertEquals("i", model.storageProfile().disks().get(0).storageQosPolicy().name()); - Assertions.assertEquals("yvdcsitynnaa", model.storageProfile().disks().get(0).storageQosPolicy().id()); - Assertions.assertEquals("czsqpjhvm", model.infrastructureProfile().checkpointType()); + Assertions.assertEquals("bum", model.networkProfile().networkInterfaces().get(0).nicId()); + Assertions.assertEquals("futacoebjvewzc", model.storageProfile().disks().get(0).name()); + Assertions.assertEquals("nmwcpmgu", model.storageProfile().disks().get(0).diskId()); + Assertions.assertEquals(607473544, model.storageProfile().disks().get(0).diskSizeGB()); + Assertions.assertEquals(1984994243, model.storageProfile().disks().get(0).bus()); + Assertions.assertEquals(1430460397, model.storageProfile().disks().get(0).lun()); + Assertions.assertEquals("ctkahzov", model.storageProfile().disks().get(0).busType()); + Assertions.assertEquals("j", model.storageProfile().disks().get(0).vhdType()); + Assertions.assertEquals("xxpshneeku", model.storageProfile().disks().get(0).storageQosPolicy().name()); + Assertions.assertEquals("gs", model.storageProfile().disks().get(0).storageQosPolicy().id()); + Assertions.assertEquals("hiszepnnbjcrxgib", model.infrastructureProfile().checkpointType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineInstanceUpdateProperties model = new VirtualMachineInstanceUpdateProperties() - .withAvailabilitySets( - Arrays.asList(new AvailabilitySetListItem().withId("jampmngnzscxaqw").withName("chcbonqvpkvlrxnj"), - new AvailabilitySetListItem().withId("seiphe").withName("lokeyy"), - new AvailabilitySetListItem().withId("nj").withName("lwtgrhpdj"))) - .withHardwareProfile(new HardwareProfileUpdate().withMemoryMB(1270874920) - .withCpuCount(1786348929) - .withLimitCpuForMigration(LimitCpuForMigration.FALSE) + .withAvailabilitySets(Arrays.asList(new AvailabilitySetListItem().withId("ltfnhtbaxkgx").withName("rc"))) + .withHardwareProfile(new HardwareProfileUpdate().withMemoryMB(479149992) + .withCpuCount(2090411231) + .withLimitCpuForMigration(LimitCpuForMigration.TRUE) .withDynamicMemoryEnabled(DynamicMemoryEnabled.TRUE) - .withDynamicMemoryMaxMB(958851014) - .withDynamicMemoryMinMB(184362773)) + .withDynamicMemoryMaxMB(1794429860) + .withDynamicMemoryMinMB(1007815098)) .withNetworkProfile(new NetworkProfileUpdate().withNetworkInterfaces(Arrays.asList( - new NetworkInterfaceUpdate().withName("hb") - .withMacAddress("hejjz") - .withVirtualNetworkId("dudgwdslfhot") + new NetworkInterfaceUpdate().withName("lgzi") + .withMacAddress("hostgktstvdxecl") + .withVirtualNetworkId("dqbcvhzlhplod") .withIpv4AddressType(AllocationMethod.STATIC) .withIpv6AddressType(AllocationMethod.STATIC) .withMacAddressType(AllocationMethod.STATIC) - .withNicId("bjnpg"), - new NetworkInterfaceUpdate().withName("ftadehxnltyfs") - .withMacAddress("pusuesn") - .withVirtualNetworkId("dejbavo") + .withNicId("bum"), + new NetworkInterfaceUpdate().withName("xtrqjfs") + .withMacAddress("mbtxhwgf") + .withVirtualNetworkId("rtawcoezb") .withIpv4AddressType(AllocationMethod.STATIC) .withIpv6AddressType(AllocationMethod.DYNAMIC) + .withMacAddressType(AllocationMethod.DYNAMIC) + .withNicId("dyg"), + new NetworkInterfaceUpdate().withName("okkqfqjbvleo") + .withMacAddress("ml") + .withVirtualNetworkId("qtqzfavyv") + .withIpv4AddressType(AllocationMethod.STATIC) + .withIpv6AddressType(AllocationMethod.DYNAMIC) + .withMacAddressType(AllocationMethod.DYNAMIC) + .withNicId("euayjkqabqgzsles"), + new NetworkInterfaceUpdate().withName("bhernntiew") + .withMacAddress("cv") + .withVirtualNetworkId("uwrbehwagoh") + .withIpv4AddressType(AllocationMethod.DYNAMIC) + .withIpv6AddressType(AllocationMethod.DYNAMIC) .withMacAddressType(AllocationMethod.STATIC) - .withNicId("tbqvudw")))) + .withNicId("emvvhm")))) .withStorageProfile(new StorageProfileUpdate().withDisks(Arrays.asList( - new VirtualDiskUpdate().withName("vo") - .withDiskId("ujjugwdkcglh") - .withDiskSizeGB(1950035591) - .withBus(3147535) - .withLun(24046342) - .withBusType("gdtjixhbkuofqwey") - .withVhdType("menevfyexfwh") - .withStorageQosPolicy(new StorageQosPolicyDetails().withName("i").withId("yvdcsitynnaa")), - new VirtualDiskUpdate().withName("ectehf") - .withDiskId("scjeypv") - .withDiskSizeGB(1363658384) - .withBus(902064602) - .withLun(177141497) - .withBusType("c") - .withVhdType("efovgmk") - .withStorageQosPolicy(new StorageQosPolicyDetails().withName("eyyvxyqjpkcat").withId("ngj"))))) - .withInfrastructureProfile(new InfrastructureProfileUpdate().withCheckpointType("czsqpjhvm")); + new VirtualDiskUpdate().withName("futacoebjvewzc") + .withDiskId("nmwcpmgu") + .withDiskSizeGB(607473544) + .withBus(1984994243) + .withLun(1430460397) + .withBusType("ctkahzov") + .withVhdType("j") + .withStorageQosPolicy(new StorageQosPolicyDetails().withName("xxpshneeku").withId("gs")), + new VirtualDiskUpdate().withName("ubkwdle") + .withDiskId("d") + .withDiskSizeGB(203229589) + .withBus(1171802077) + .withLun(168697362) + .withBusType("pjuohminyfl") + .withVhdType("rwm") + .withStorageQosPolicy(new StorageQosPolicyDetails().withName("wpklvxw").withId("gdxpg"))))) + .withInfrastructureProfile(new InfrastructureProfileUpdate().withCheckpointType("hiszepnnbjcrxgib")); model = BinaryData.fromObject(model).toObject(VirtualMachineInstanceUpdateProperties.class); - Assertions.assertEquals("jampmngnzscxaqw", model.availabilitySets().get(0).id()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.availabilitySets().get(0).name()); - Assertions.assertEquals(1270874920, model.hardwareProfile().memoryMB()); - Assertions.assertEquals(1786348929, model.hardwareProfile().cpuCount()); - Assertions.assertEquals(LimitCpuForMigration.FALSE, model.hardwareProfile().limitCpuForMigration()); + Assertions.assertEquals("ltfnhtbaxkgx", model.availabilitySets().get(0).id()); + Assertions.assertEquals("rc", model.availabilitySets().get(0).name()); + Assertions.assertEquals(479149992, model.hardwareProfile().memoryMB()); + Assertions.assertEquals(2090411231, model.hardwareProfile().cpuCount()); + Assertions.assertEquals(LimitCpuForMigration.TRUE, model.hardwareProfile().limitCpuForMigration()); Assertions.assertEquals(DynamicMemoryEnabled.TRUE, model.hardwareProfile().dynamicMemoryEnabled()); - Assertions.assertEquals(958851014, model.hardwareProfile().dynamicMemoryMaxMB()); - Assertions.assertEquals(184362773, model.hardwareProfile().dynamicMemoryMinMB()); - Assertions.assertEquals("hb", model.networkProfile().networkInterfaces().get(0).name()); - Assertions.assertEquals("hejjz", model.networkProfile().networkInterfaces().get(0).macAddress()); - Assertions.assertEquals("dudgwdslfhot", model.networkProfile().networkInterfaces().get(0).virtualNetworkId()); + Assertions.assertEquals(1794429860, model.hardwareProfile().dynamicMemoryMaxMB()); + Assertions.assertEquals(1007815098, model.hardwareProfile().dynamicMemoryMinMB()); + Assertions.assertEquals("lgzi", model.networkProfile().networkInterfaces().get(0).name()); + Assertions.assertEquals("hostgktstvdxecl", model.networkProfile().networkInterfaces().get(0).macAddress()); + Assertions.assertEquals("dqbcvhzlhplod", model.networkProfile().networkInterfaces().get(0).virtualNetworkId()); Assertions.assertEquals(AllocationMethod.STATIC, model.networkProfile().networkInterfaces().get(0).ipv4AddressType()); Assertions.assertEquals(AllocationMethod.STATIC, model.networkProfile().networkInterfaces().get(0).ipv6AddressType()); Assertions.assertEquals(AllocationMethod.STATIC, model.networkProfile().networkInterfaces().get(0).macAddressType()); - Assertions.assertEquals("bjnpg", model.networkProfile().networkInterfaces().get(0).nicId()); - Assertions.assertEquals("vo", model.storageProfile().disks().get(0).name()); - Assertions.assertEquals("ujjugwdkcglh", model.storageProfile().disks().get(0).diskId()); - Assertions.assertEquals(1950035591, model.storageProfile().disks().get(0).diskSizeGB()); - Assertions.assertEquals(3147535, model.storageProfile().disks().get(0).bus()); - Assertions.assertEquals(24046342, model.storageProfile().disks().get(0).lun()); - Assertions.assertEquals("gdtjixhbkuofqwey", model.storageProfile().disks().get(0).busType()); - Assertions.assertEquals("menevfyexfwh", model.storageProfile().disks().get(0).vhdType()); - Assertions.assertEquals("i", model.storageProfile().disks().get(0).storageQosPolicy().name()); - Assertions.assertEquals("yvdcsitynnaa", model.storageProfile().disks().get(0).storageQosPolicy().id()); - Assertions.assertEquals("czsqpjhvm", model.infrastructureProfile().checkpointType()); + Assertions.assertEquals("bum", model.networkProfile().networkInterfaces().get(0).nicId()); + Assertions.assertEquals("futacoebjvewzc", model.storageProfile().disks().get(0).name()); + Assertions.assertEquals("nmwcpmgu", model.storageProfile().disks().get(0).diskId()); + Assertions.assertEquals(607473544, model.storageProfile().disks().get(0).diskSizeGB()); + Assertions.assertEquals(1984994243, model.storageProfile().disks().get(0).bus()); + Assertions.assertEquals(1430460397, model.storageProfile().disks().get(0).lun()); + Assertions.assertEquals("ctkahzov", model.storageProfile().disks().get(0).busType()); + Assertions.assertEquals("j", model.storageProfile().disks().get(0).vhdType()); + Assertions.assertEquals("xxpshneeku", model.storageProfile().disks().get(0).storageQosPolicy().name()); + Assertions.assertEquals("gs", model.storageProfile().disks().get(0).storageQosPolicy().id()); + Assertions.assertEquals("hiszepnnbjcrxgib", model.infrastructureProfile().checkpointType()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstanceUpdateTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstanceUpdateTests.java index 55e80cb18bd3..0861cb423710 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstanceUpdateTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInstanceUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -25,39 +25,39 @@ public final class VirtualMachineInstanceUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInstanceUpdate model = BinaryData.fromString( - "{\"properties\":{\"availabilitySets\":[{\"id\":\"rlovmclwhijcoej\",\"name\":\"bzaqsqsycbkbfk\"},{\"id\":\"kdkexxp\",\"name\":\"fmxa\"},{\"id\":\"fjpgddtocjjxhvp\",\"name\":\"uexhdzx\"},{\"id\":\"qeojnxqbzvddntw\",\"name\":\"eic\"}],\"hardwareProfile\":{\"memoryMB\":1604770276,\"cpuCount\":537336258,\"limitCpuForMigration\":\"true\",\"dynamicMemoryEnabled\":\"false\",\"dynamicMemoryMaxMB\":2037494020,\"dynamicMemoryMinMB\":2040818894},\"networkProfile\":{\"networkInterfaces\":[{\"name\":\"yd\",\"macAddress\":\"lmjthjq\",\"virtualNetworkId\":\"pyeicxm\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Dynamic\",\"nicId\":\"hix\"},{\"name\":\"gdtopbobjogh\",\"macAddress\":\"w\",\"virtualNetworkId\":\"m\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"vtpgvdfgiotkf\"}]},\"storageProfile\":{\"disks\":[{\"name\":\"ln\",\"diskId\":\"lefgugnxk\",\"diskSizeGB\":1788312026,\"bus\":435751453,\"lun\":423857841,\"busType\":\"thz\",\"vhdType\":\"qdrabhjybigehoqf\",\"storageQoSPolicy\":{\"name\":\"skanyk\",\"id\":\"lcuiywgqywgndr\"}},{\"name\":\"nhzgpphrcgyn\",\"diskId\":\"cpecfvmmcoofs\",\"diskSizeGB\":1165207027,\"bus\":164546469,\"lun\":903903169,\"busType\":\"qjqabcypmivkwl\",\"vhdType\":\"vccfw\",\"storageQoSPolicy\":{\"name\":\"bacfionlebxetq\",\"id\":\"zxdpnqbqqw\"}}]},\"infrastructureProfile\":{\"checkpointType\":\"feallnwsu\"}}}") + "{\"properties\":{\"availabilitySets\":[{\"id\":\"frymsgaojfmwnc\",\"name\":\"mrfhirctymox\"}],\"hardwareProfile\":{\"memoryMB\":1311357803,\"cpuCount\":1701654181,\"limitCpuForMigration\":\"true\",\"dynamicMemoryEnabled\":\"false\",\"dynamicMemoryMaxMB\":422952763,\"dynamicMemoryMinMB\":1967043899},\"networkProfile\":{\"networkInterfaces\":[{\"name\":\"jlihhyus\",\"macAddress\":\"kasdvlm\",\"virtualNetworkId\":\"dgzxulucvpamrsr\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"sjnhn\"},{\"name\":\"xifqjzgxm\",\"macAddress\":\"ublwpcesutrg\",\"virtualNetworkId\":\"pauutpw\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Dynamic\",\"nicId\":\"g\"},{\"name\":\"pnfqntcyp\",\"macAddress\":\"jv\",\"virtualNetworkId\":\"imwkslircizj\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"cvlhv\"}]},\"storageProfile\":{\"disks\":[{\"name\":\"t\",\"diskId\":\"rtwnawjslbi\",\"diskSizeGB\":1632414232,\"bus\":1225451286,\"lun\":1848766300,\"busType\":\"tsf\",\"vhdType\":\"nbaeqphchqn\",\"storageQoSPolicy\":{\"name\":\"pxehuwrykqga\",\"id\":\"mvikl\"}},{\"name\":\"dvk\",\"diskId\":\"ejd\",\"diskSizeGB\":732496831,\"bus\":246152016,\"lun\":2045200930,\"busType\":\"hnjivo\",\"vhdType\":\"tnovqfzgemjdftul\",\"storageQoSPolicy\":{\"name\":\"duceamtmc\",\"id\":\"o\"}},{\"name\":\"jw\",\"diskId\":\"wqiok\",\"diskSizeGB\":373495652,\"bus\":1563475651,\"lun\":2133935833,\"busType\":\"sv\",\"vhdType\":\"jpr\",\"storageQoSPolicy\":{\"name\":\"cfzq\",\"id\":\"yxgtczh\"}}]},\"infrastructureProfile\":{\"checkpointType\":\"bsdshmkxmaehvbbx\"}}}") .toObject(VirtualMachineInstanceUpdate.class); - Assertions.assertEquals("rlovmclwhijcoej", model.properties().availabilitySets().get(0).id()); - Assertions.assertEquals("bzaqsqsycbkbfk", model.properties().availabilitySets().get(0).name()); - Assertions.assertEquals(1604770276, model.properties().hardwareProfile().memoryMB()); - Assertions.assertEquals(537336258, model.properties().hardwareProfile().cpuCount()); + Assertions.assertEquals("frymsgaojfmwnc", model.properties().availabilitySets().get(0).id()); + Assertions.assertEquals("mrfhirctymox", model.properties().availabilitySets().get(0).name()); + Assertions.assertEquals(1311357803, model.properties().hardwareProfile().memoryMB()); + Assertions.assertEquals(1701654181, model.properties().hardwareProfile().cpuCount()); Assertions.assertEquals(LimitCpuForMigration.TRUE, model.properties().hardwareProfile().limitCpuForMigration()); Assertions.assertEquals(DynamicMemoryEnabled.FALSE, model.properties().hardwareProfile().dynamicMemoryEnabled()); - Assertions.assertEquals(2037494020, model.properties().hardwareProfile().dynamicMemoryMaxMB()); - Assertions.assertEquals(2040818894, model.properties().hardwareProfile().dynamicMemoryMinMB()); - Assertions.assertEquals("yd", model.properties().networkProfile().networkInterfaces().get(0).name()); - Assertions.assertEquals("lmjthjq", model.properties().networkProfile().networkInterfaces().get(0).macAddress()); - Assertions.assertEquals("pyeicxm", + Assertions.assertEquals(422952763, model.properties().hardwareProfile().dynamicMemoryMaxMB()); + Assertions.assertEquals(1967043899, model.properties().hardwareProfile().dynamicMemoryMinMB()); + Assertions.assertEquals("jlihhyus", model.properties().networkProfile().networkInterfaces().get(0).name()); + Assertions.assertEquals("kasdvlm", model.properties().networkProfile().networkInterfaces().get(0).macAddress()); + Assertions.assertEquals("dgzxulucvpamrsr", model.properties().networkProfile().networkInterfaces().get(0).virtualNetworkId()); - Assertions.assertEquals(AllocationMethod.DYNAMIC, + Assertions.assertEquals(AllocationMethod.STATIC, model.properties().networkProfile().networkInterfaces().get(0).ipv4AddressType()); - Assertions.assertEquals(AllocationMethod.DYNAMIC, + Assertions.assertEquals(AllocationMethod.STATIC, model.properties().networkProfile().networkInterfaces().get(0).ipv6AddressType()); - Assertions.assertEquals(AllocationMethod.DYNAMIC, + Assertions.assertEquals(AllocationMethod.STATIC, model.properties().networkProfile().networkInterfaces().get(0).macAddressType()); - Assertions.assertEquals("hix", model.properties().networkProfile().networkInterfaces().get(0).nicId()); - Assertions.assertEquals("ln", model.properties().storageProfile().disks().get(0).name()); - Assertions.assertEquals("lefgugnxk", model.properties().storageProfile().disks().get(0).diskId()); - Assertions.assertEquals(1788312026, model.properties().storageProfile().disks().get(0).diskSizeGB()); - Assertions.assertEquals(435751453, model.properties().storageProfile().disks().get(0).bus()); - Assertions.assertEquals(423857841, model.properties().storageProfile().disks().get(0).lun()); - Assertions.assertEquals("thz", model.properties().storageProfile().disks().get(0).busType()); - Assertions.assertEquals("qdrabhjybigehoqf", model.properties().storageProfile().disks().get(0).vhdType()); - Assertions.assertEquals("skanyk", model.properties().storageProfile().disks().get(0).storageQosPolicy().name()); - Assertions.assertEquals("lcuiywgqywgndr", - model.properties().storageProfile().disks().get(0).storageQosPolicy().id()); - Assertions.assertEquals("feallnwsu", model.properties().infrastructureProfile().checkpointType()); + Assertions.assertEquals("sjnhn", model.properties().networkProfile().networkInterfaces().get(0).nicId()); + Assertions.assertEquals("t", model.properties().storageProfile().disks().get(0).name()); + Assertions.assertEquals("rtwnawjslbi", model.properties().storageProfile().disks().get(0).diskId()); + Assertions.assertEquals(1632414232, model.properties().storageProfile().disks().get(0).diskSizeGB()); + Assertions.assertEquals(1225451286, model.properties().storageProfile().disks().get(0).bus()); + Assertions.assertEquals(1848766300, model.properties().storageProfile().disks().get(0).lun()); + Assertions.assertEquals("tsf", model.properties().storageProfile().disks().get(0).busType()); + Assertions.assertEquals("nbaeqphchqn", model.properties().storageProfile().disks().get(0).vhdType()); + Assertions.assertEquals("pxehuwrykqga", + model.properties().storageProfile().disks().get(0).storageQosPolicy().name()); + Assertions.assertEquals("mvikl", model.properties().storageProfile().disks().get(0).storageQosPolicy().id()); + Assertions.assertEquals("bsdshmkxmaehvbbx", model.properties().infrastructureProfile().checkpointType()); } @org.junit.jupiter.api.Test @@ -65,85 +65,92 @@ public void testSerialize() throws Exception { VirtualMachineInstanceUpdate model = new VirtualMachineInstanceUpdate().withProperties(new VirtualMachineInstanceUpdateProperties() .withAvailabilitySets( - Arrays.asList(new AvailabilitySetListItem().withId("rlovmclwhijcoej").withName("bzaqsqsycbkbfk"), - new AvailabilitySetListItem().withId("kdkexxp").withName("fmxa"), - new AvailabilitySetListItem().withId("fjpgddtocjjxhvp").withName("uexhdzx"), - new AvailabilitySetListItem().withId("qeojnxqbzvddntw").withName("eic"))) - .withHardwareProfile(new HardwareProfileUpdate().withMemoryMB(1604770276) - .withCpuCount(537336258) + Arrays.asList(new AvailabilitySetListItem().withId("frymsgaojfmwnc").withName("mrfhirctymox"))) + .withHardwareProfile(new HardwareProfileUpdate().withMemoryMB(1311357803) + .withCpuCount(1701654181) .withLimitCpuForMigration(LimitCpuForMigration.TRUE) .withDynamicMemoryEnabled(DynamicMemoryEnabled.FALSE) - .withDynamicMemoryMaxMB(2037494020) - .withDynamicMemoryMinMB(2040818894)) + .withDynamicMemoryMaxMB(422952763) + .withDynamicMemoryMinMB(1967043899)) .withNetworkProfile(new NetworkProfileUpdate().withNetworkInterfaces(Arrays.asList( - new NetworkInterfaceUpdate().withName("yd") - .withMacAddress("lmjthjq") - .withVirtualNetworkId("pyeicxm") - .withIpv4AddressType(AllocationMethod.DYNAMIC) - .withIpv6AddressType(AllocationMethod.DYNAMIC) - .withMacAddressType(AllocationMethod.DYNAMIC) - .withNicId("hix"), - new NetworkInterfaceUpdate().withName("gdtopbobjogh") - .withMacAddress("w") - .withVirtualNetworkId("m") + new NetworkInterfaceUpdate().withName("jlihhyus") + .withMacAddress("kasdvlm") + .withVirtualNetworkId("dgzxulucvpamrsr") .withIpv4AddressType(AllocationMethod.STATIC) - .withIpv6AddressType(AllocationMethod.DYNAMIC) + .withIpv6AddressType(AllocationMethod.STATIC) .withMacAddressType(AllocationMethod.STATIC) - .withNicId("vtpgvdfgiotkf")))) - .withStorageProfile( - new StorageProfileUpdate() - .withDisks( - Arrays.asList( - new VirtualDiskUpdate().withName("ln") - .withDiskId("lefgugnxk") - .withDiskSizeGB(1788312026) - .withBus(435751453) - .withLun(423857841) - .withBusType("thz") - .withVhdType("qdrabhjybigehoqf") - .withStorageQosPolicy( - new StorageQosPolicyDetails().withName("skanyk").withId("lcuiywgqywgndr")), - new VirtualDiskUpdate().withName("nhzgpphrcgyn") - .withDiskId("cpecfvmmcoofs") - .withDiskSizeGB(1165207027) - .withBus(164546469) - .withLun(903903169) - .withBusType("qjqabcypmivkwl") - .withVhdType("vccfw") - .withStorageQosPolicy(new StorageQosPolicyDetails().withName("bacfionlebxetq") - .withId("zxdpnqbqqw"))))) - .withInfrastructureProfile(new InfrastructureProfileUpdate().withCheckpointType("feallnwsu"))); + .withNicId("sjnhn"), + new NetworkInterfaceUpdate().withName("xifqjzgxm") + .withMacAddress("ublwpcesutrg") + .withVirtualNetworkId("pauutpw") + .withIpv4AddressType(AllocationMethod.STATIC) + .withIpv6AddressType(AllocationMethod.DYNAMIC) + .withMacAddressType(AllocationMethod.DYNAMIC) + .withNicId("g"), + new NetworkInterfaceUpdate().withName("pnfqntcyp") + .withMacAddress("jv") + .withVirtualNetworkId("imwkslircizj") + .withIpv4AddressType(AllocationMethod.DYNAMIC) + .withIpv6AddressType(AllocationMethod.STATIC) + .withMacAddressType(AllocationMethod.DYNAMIC) + .withNicId("cvlhv")))) + .withStorageProfile(new StorageProfileUpdate().withDisks(Arrays.asList( + new VirtualDiskUpdate().withName("t") + .withDiskId("rtwnawjslbi") + .withDiskSizeGB(1632414232) + .withBus(1225451286) + .withLun(1848766300) + .withBusType("tsf") + .withVhdType("nbaeqphchqn") + .withStorageQosPolicy(new StorageQosPolicyDetails().withName("pxehuwrykqga").withId("mvikl")), + new VirtualDiskUpdate().withName("dvk") + .withDiskId("ejd") + .withDiskSizeGB(732496831) + .withBus(246152016) + .withLun(2045200930) + .withBusType("hnjivo") + .withVhdType("tnovqfzgemjdftul") + .withStorageQosPolicy(new StorageQosPolicyDetails().withName("duceamtmc").withId("o")), + new VirtualDiskUpdate().withName("jw") + .withDiskId("wqiok") + .withDiskSizeGB(373495652) + .withBus(1563475651) + .withLun(2133935833) + .withBusType("sv") + .withVhdType("jpr") + .withStorageQosPolicy(new StorageQosPolicyDetails().withName("cfzq").withId("yxgtczh"))))) + .withInfrastructureProfile(new InfrastructureProfileUpdate().withCheckpointType("bsdshmkxmaehvbbx"))); model = BinaryData.fromObject(model).toObject(VirtualMachineInstanceUpdate.class); - Assertions.assertEquals("rlovmclwhijcoej", model.properties().availabilitySets().get(0).id()); - Assertions.assertEquals("bzaqsqsycbkbfk", model.properties().availabilitySets().get(0).name()); - Assertions.assertEquals(1604770276, model.properties().hardwareProfile().memoryMB()); - Assertions.assertEquals(537336258, model.properties().hardwareProfile().cpuCount()); + Assertions.assertEquals("frymsgaojfmwnc", model.properties().availabilitySets().get(0).id()); + Assertions.assertEquals("mrfhirctymox", model.properties().availabilitySets().get(0).name()); + Assertions.assertEquals(1311357803, model.properties().hardwareProfile().memoryMB()); + Assertions.assertEquals(1701654181, model.properties().hardwareProfile().cpuCount()); Assertions.assertEquals(LimitCpuForMigration.TRUE, model.properties().hardwareProfile().limitCpuForMigration()); Assertions.assertEquals(DynamicMemoryEnabled.FALSE, model.properties().hardwareProfile().dynamicMemoryEnabled()); - Assertions.assertEquals(2037494020, model.properties().hardwareProfile().dynamicMemoryMaxMB()); - Assertions.assertEquals(2040818894, model.properties().hardwareProfile().dynamicMemoryMinMB()); - Assertions.assertEquals("yd", model.properties().networkProfile().networkInterfaces().get(0).name()); - Assertions.assertEquals("lmjthjq", model.properties().networkProfile().networkInterfaces().get(0).macAddress()); - Assertions.assertEquals("pyeicxm", + Assertions.assertEquals(422952763, model.properties().hardwareProfile().dynamicMemoryMaxMB()); + Assertions.assertEquals(1967043899, model.properties().hardwareProfile().dynamicMemoryMinMB()); + Assertions.assertEquals("jlihhyus", model.properties().networkProfile().networkInterfaces().get(0).name()); + Assertions.assertEquals("kasdvlm", model.properties().networkProfile().networkInterfaces().get(0).macAddress()); + Assertions.assertEquals("dgzxulucvpamrsr", model.properties().networkProfile().networkInterfaces().get(0).virtualNetworkId()); - Assertions.assertEquals(AllocationMethod.DYNAMIC, + Assertions.assertEquals(AllocationMethod.STATIC, model.properties().networkProfile().networkInterfaces().get(0).ipv4AddressType()); - Assertions.assertEquals(AllocationMethod.DYNAMIC, + Assertions.assertEquals(AllocationMethod.STATIC, model.properties().networkProfile().networkInterfaces().get(0).ipv6AddressType()); - Assertions.assertEquals(AllocationMethod.DYNAMIC, + Assertions.assertEquals(AllocationMethod.STATIC, model.properties().networkProfile().networkInterfaces().get(0).macAddressType()); - Assertions.assertEquals("hix", model.properties().networkProfile().networkInterfaces().get(0).nicId()); - Assertions.assertEquals("ln", model.properties().storageProfile().disks().get(0).name()); - Assertions.assertEquals("lefgugnxk", model.properties().storageProfile().disks().get(0).diskId()); - Assertions.assertEquals(1788312026, model.properties().storageProfile().disks().get(0).diskSizeGB()); - Assertions.assertEquals(435751453, model.properties().storageProfile().disks().get(0).bus()); - Assertions.assertEquals(423857841, model.properties().storageProfile().disks().get(0).lun()); - Assertions.assertEquals("thz", model.properties().storageProfile().disks().get(0).busType()); - Assertions.assertEquals("qdrabhjybigehoqf", model.properties().storageProfile().disks().get(0).vhdType()); - Assertions.assertEquals("skanyk", model.properties().storageProfile().disks().get(0).storageQosPolicy().name()); - Assertions.assertEquals("lcuiywgqywgndr", - model.properties().storageProfile().disks().get(0).storageQosPolicy().id()); - Assertions.assertEquals("feallnwsu", model.properties().infrastructureProfile().checkpointType()); + Assertions.assertEquals("sjnhn", model.properties().networkProfile().networkInterfaces().get(0).nicId()); + Assertions.assertEquals("t", model.properties().storageProfile().disks().get(0).name()); + Assertions.assertEquals("rtwnawjslbi", model.properties().storageProfile().disks().get(0).diskId()); + Assertions.assertEquals(1632414232, model.properties().storageProfile().disks().get(0).diskSizeGB()); + Assertions.assertEquals(1225451286, model.properties().storageProfile().disks().get(0).bus()); + Assertions.assertEquals(1848766300, model.properties().storageProfile().disks().get(0).lun()); + Assertions.assertEquals("tsf", model.properties().storageProfile().disks().get(0).busType()); + Assertions.assertEquals("nbaeqphchqn", model.properties().storageProfile().disks().get(0).vhdType()); + Assertions.assertEquals("pxehuwrykqga", + model.properties().storageProfile().disks().get(0).storageQosPolicy().name()); + Assertions.assertEquals("mvikl", model.properties().storageProfile().disks().get(0).storageQosPolicy().id()); + Assertions.assertEquals("bsdshmkxmaehvbbx", model.properties().infrastructureProfile().checkpointType()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInventoryItemTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInventoryItemTests.java index 91e1ba79e026..9b2e11f27242 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInventoryItemTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineInventoryItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -14,21 +14,21 @@ public final class VirtualMachineInventoryItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInventoryItem model = BinaryData.fromString( - "{\"inventoryType\":\"VirtualMachine\",\"osType\":\"Windows\",\"osName\":\"iycslevuf\",\"osVersion\":\"tcktyhjtqedcgzu\",\"powerState\":\"mmrqz\",\"ipAddresses\":[\"jvpglydzgk\",\"vqeevtoep\",\"yutnwytpzdmov\",\"vf\"],\"cloud\":{\"inventoryItemId\":\"wzqa\",\"inventoryItemName\":\"lgzurig\"},\"biosGuid\":\"ecxn\",\"managedMachineResourceId\":\"icokpv\",\"managedResourceId\":\"lqtmldgxob\",\"uuid\":\"rclnpkc\",\"inventoryItemName\":\"yzriykhy\",\"provisioningState\":\"Accepted\"}") + "{\"inventoryType\":\"VirtualMachine\",\"osType\":\"Linux\",\"osName\":\"mfpgv\",\"osVersion\":\"ipaslthaqfxssmwu\",\"powerState\":\"bdsrez\",\"ipAddresses\":[\"hneuyowqkd\",\"ytisibir\",\"gpikpzimejza\"],\"cloud\":{\"inventoryItemId\":\"zxiavrm\",\"inventoryItemName\":\"onok\"},\"biosGuid\":\"rjqc\",\"managedMachineResourceId\":\"gzpfrla\",\"managedResourceId\":\"zrnw\",\"uuid\":\"indfpwpjyl\",\"inventoryItemName\":\"tlhflsjcdhszf\",\"provisioningState\":\"Created\"}") .toObject(VirtualMachineInventoryItem.class); - Assertions.assertEquals("jvpglydzgk", model.ipAddresses().get(0)); - Assertions.assertEquals("wzqa", model.cloud().inventoryItemId()); - Assertions.assertEquals("lgzurig", model.cloud().inventoryItemName()); + Assertions.assertEquals("hneuyowqkd", model.ipAddresses().get(0)); + Assertions.assertEquals("zxiavrm", model.cloud().inventoryItemId()); + Assertions.assertEquals("onok", model.cloud().inventoryItemName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualMachineInventoryItem model = new VirtualMachineInventoryItem() - .withIpAddresses(Arrays.asList("jvpglydzgk", "vqeevtoep", "yutnwytpzdmov", "vf")) - .withCloud(new InventoryItemDetails().withInventoryItemId("wzqa").withInventoryItemName("lgzurig")); + VirtualMachineInventoryItem model + = new VirtualMachineInventoryItem().withIpAddresses(Arrays.asList("hneuyowqkd", "ytisibir", "gpikpzimejza")) + .withCloud(new InventoryItemDetails().withInventoryItemId("zxiavrm").withInventoryItemName("onok")); model = BinaryData.fromObject(model).toObject(VirtualMachineInventoryItem.class); - Assertions.assertEquals("jvpglydzgk", model.ipAddresses().get(0)); - Assertions.assertEquals("wzqa", model.cloud().inventoryItemId()); - Assertions.assertEquals("lgzurig", model.cloud().inventoryItemName()); + Assertions.assertEquals("hneuyowqkd", model.ipAddresses().get(0)); + Assertions.assertEquals("zxiavrm", model.cloud().inventoryItemId()); + Assertions.assertEquals("onok", model.cloud().inventoryItemName()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineRestoreCheckpointTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineRestoreCheckpointTests.java index 173f49b9cb86..60f0dfad8e27 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineRestoreCheckpointTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineRestoreCheckpointTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -12,14 +12,14 @@ public final class VirtualMachineRestoreCheckpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineRestoreCheckpoint model - = BinaryData.fromString("{\"id\":\"lpbuxwgipwhonowk\"}").toObject(VirtualMachineRestoreCheckpoint.class); - Assertions.assertEquals("lpbuxwgipwhonowk", model.id()); + = BinaryData.fromString("{\"id\":\"udtjuewbc\"}").toObject(VirtualMachineRestoreCheckpoint.class); + Assertions.assertEquals("udtjuewbc", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualMachineRestoreCheckpoint model = new VirtualMachineRestoreCheckpoint().withId("lpbuxwgipwhonowk"); + VirtualMachineRestoreCheckpoint model = new VirtualMachineRestoreCheckpoint().withId("udtjuewbc"); model = BinaryData.fromObject(model).toObject(VirtualMachineRestoreCheckpoint.class); - Assertions.assertEquals("lpbuxwgipwhonowk", model.id()); + Assertions.assertEquals("udtjuewbc", model.id()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplateInnerTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplateInnerTests.java index e524d2bcdf40..ba03860b58eb 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplateInnerTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplateInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -16,33 +16,33 @@ public final class VirtualMachineTemplateInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineTemplateInner model = BinaryData.fromString( - "{\"properties\":{\"inventoryItemId\":\"rhneuyowq\",\"uuid\":\"wyt\",\"vmmServerId\":\"ib\",\"osType\":\"Linux\",\"osName\":\"pikpz\",\"computerName\":\"ejzanlfz\",\"memoryMB\":386879497,\"cpuCount\":1297052787,\"limitCpuForMigration\":\"true\",\"dynamicMemoryEnabled\":\"true\",\"isCustomizable\":\"false\",\"dynamicMemoryMaxMB\":185109829,\"dynamicMemoryMinMB\":988966310,\"isHighlyAvailable\":\"true\",\"generation\":1122267125,\"networkInterfaces\":[{\"name\":\"pfrlazsz\",\"displayName\":\"woiindf\",\"ipv4Addresses\":[\"jylwbtlhflsj\"],\"ipv6Addresses\":[\"szfjvfbgofelja\",\"rqmq\"],\"macAddress\":\"dvriiiojnal\",\"virtualNetworkId\":\"fk\",\"networkName\":\"vsexsowuelu\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"rhmzkwpj\"},{\"name\":\"wspughftqsxhqx\",\"displayName\":\"xukndxdigr\",\"ipv4Addresses\":[\"ufzdmsyq\",\"fi\",\"whbotzingamv\",\"phoszqz\"],\"ipv6Addresses\":[\"hqamvdkf\",\"ynwcvtbv\",\"ayhmtnvyqiatkz\",\"pcnp\"],\"macAddress\":\"cjaesgvvs\",\"virtualNetworkId\":\"yajguqfhwygzlv\",\"networkName\":\"kfxu\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"uh\"}],\"disks\":[{\"name\":\"qdpsqxqvpsvu\",\"displayName\":\"mgccelvezrypq\",\"diskId\":\"feo\",\"diskSizeGB\":1208971148,\"maxDiskSizeGB\":1007513685,\"bus\":835251373,\"lun\":137094818,\"busType\":\"bopgxedkowepbqp\",\"vhdType\":\"fkbw\",\"volumeType\":\"snjvcdwxlpqekftn\",\"vhdFormatType\":\"tjsyin\",\"templateDiskId\":\"fq\",\"storageQoSPolicy\":{\"name\":\"tdhtmdvyp\",\"id\":\"kdgszywkbirr\"},\"createDiffDisk\":\"true\"},{\"name\":\"lhkjoqrvqq\",\"displayName\":\"t\",\"diskId\":\"nrvgoupmfiibfgg\",\"diskSizeGB\":615385800,\"maxDiskSizeGB\":364570184,\"bus\":466932926,\"lun\":176109120,\"busType\":\"v\",\"vhdType\":\"k\",\"volumeType\":\"lqwjygvjayvblm\",\"vhdFormatType\":\"k\",\"templateDiskId\":\"hbxvvyhgsopbyrqu\",\"storageQoSPolicy\":{\"name\":\"xuvw\",\"id\":\"bnhlmc\"},\"createDiffDisk\":\"true\"}],\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"itvgbmhrixkwm\",\"name\":\"jejveg\"},\"location\":\"bpnaixexccbdre\",\"tags\":{\"qkghtpwijnhy\":\"cexdrrvqa\",\"owvrvmtgjqppyos\":\"svfycxzbfv\",\"sxkm\":\"ronzmyhgfip\"},\"id\":\"waekrrjreafxtsgu\",\"name\":\"hjglikk\",\"type\":\"wslolbqp\"}") + "{\"properties\":{\"inventoryItemId\":\"xhbkuofq\",\"uuid\":\"yk\",\"vmmServerId\":\"enevfyexfwhybci\",\"osType\":\"Other\",\"osName\":\"dcsi\",\"computerName\":\"nnaamdectehfiqsc\",\"memoryMB\":230831104,\"cpuCount\":796129419,\"limitCpuForMigration\":\"false\",\"dynamicMemoryEnabled\":\"false\",\"isCustomizable\":\"false\",\"dynamicMemoryMaxMB\":693587344,\"dynamicMemoryMinMB\":1290040732,\"isHighlyAvailable\":\"true\",\"generation\":130298647,\"networkInterfaces\":[{\"name\":\"kqsleyyvxy\",\"displayName\":\"pkc\",\"ipv4Addresses\":[\"pngjcrcczsqpjhvm\",\"ajvnysounqe\",\"a\",\"oaeupfhyhltrpmo\"],\"ipv6Addresses\":[\"cma\",\"u\",\"kthfui\",\"aodsfcpkv\"],\"macAddress\":\"dpuozmyz\",\"virtualNetworkId\":\"agfuaxbezyiu\",\"networkName\":\"ktwh\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"sm\"}],\"disks\":[{\"name\":\"exim\",\"displayName\":\"yocf\",\"diskId\":\"ksymd\",\"diskSizeGB\":830050857,\"maxDiskSizeGB\":1193107670,\"bus\":980316888,\"lun\":1173289641,\"busType\":\"qyud\",\"vhdType\":\"rrqnbpoczvyifqrv\",\"volumeType\":\"vjsllrmvvdfw\",\"vhdFormatType\":\"kpnpulexxbczwtr\",\"templateDiskId\":\"iqzbq\",\"storageQoSPolicy\":{\"name\":\"ovm\",\"id\":\"kacspkw\"},\"createDiffDisk\":\"false\"},{\"name\":\"obpxjmflbvvn\",\"displayName\":\"rkcciwwzjuqk\",\"diskId\":\"sa\",\"diskSizeGB\":1410521625,\"maxDiskSizeGB\":481973669,\"bus\":1163138760,\"lun\":627324313,\"busType\":\"ghsauuimjmvxied\",\"vhdType\":\"gidyjrrf\",\"volumeType\":\"aos\",\"vhdFormatType\":\"xc\",\"templateDiskId\":\"npc\",\"storageQoSPolicy\":{\"name\":\"cohslkev\",\"id\":\"ggzfbu\"},\"createDiffDisk\":\"false\"},{\"name\":\"faxkffeii\",\"displayName\":\"lvmezyvshxmzsbbz\",\"diskId\":\"gigr\",\"diskSizeGB\":830818996,\"maxDiskSizeGB\":849896725,\"bus\":433663195,\"lun\":1552581674,\"busType\":\"nspydptkoenkoukn\",\"vhdType\":\"dwtiukbldngkp\",\"volumeType\":\"ipazyxoegukgjnpi\",\"vhdFormatType\":\"gygev\",\"templateDiskId\":\"ntypmrbpizcdrqj\",\"storageQoSPolicy\":{\"name\":\"ydnfyhxdeoejz\",\"id\":\"w\"},\"createDiffDisk\":\"false\"},{\"name\":\"ttgzfbis\",\"displayName\":\"bkh\",\"diskId\":\"deyeamdphagalpbu\",\"diskSizeGB\":605545221,\"maxDiskSizeGB\":9013568,\"bus\":1260987021,\"lun\":1896517508,\"busType\":\"wkgshwa\",\"vhdType\":\"ixzbinjeputtmryw\",\"volumeType\":\"zoqftiyqzrnkcqvy\",\"vhdFormatType\":\"whzlsicohoq\",\"templateDiskId\":\"wvl\",\"storageQoSPolicy\":{\"name\":\"vwhheunmmqhgyx\",\"id\":\"onocukok\"},\"createDiffDisk\":\"true\"}],\"provisioningState\":\"Accepted\"},\"extendedLocation\":{\"type\":\"onuq\",\"name\":\"fkbey\"},\"location\":\"wrmjmwvvjektc\",\"tags\":{\"dqgbiqylihkaetc\":\"nhwlrsffrzpwvl\",\"ymuctqhjfbebrj\":\"tvfcivfsn\"},\"id\":\"xerf\",\"name\":\"wutttxfvjrbi\",\"type\":\"phxepcyvahf\"}") .toObject(VirtualMachineTemplateInner.class); - Assertions.assertEquals("bpnaixexccbdre", model.location()); - Assertions.assertEquals("cexdrrvqa", model.tags().get("qkghtpwijnhy")); - Assertions.assertEquals("rhneuyowq", model.properties().inventoryItemId()); - Assertions.assertEquals("wyt", model.properties().uuid()); - Assertions.assertEquals("ib", model.properties().vmmServerId()); - Assertions.assertEquals("itvgbmhrixkwm", model.extendedLocation().type()); - Assertions.assertEquals("jejveg", model.extendedLocation().name()); + Assertions.assertEquals("wrmjmwvvjektc", model.location()); + Assertions.assertEquals("nhwlrsffrzpwvl", model.tags().get("dqgbiqylihkaetc")); + Assertions.assertEquals("xhbkuofq", model.properties().inventoryItemId()); + Assertions.assertEquals("yk", model.properties().uuid()); + Assertions.assertEquals("enevfyexfwhybci", model.properties().vmmServerId()); + Assertions.assertEquals("onuq", model.extendedLocation().type()); + Assertions.assertEquals("fkbey", model.extendedLocation().name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualMachineTemplateInner model = new VirtualMachineTemplateInner().withLocation("bpnaixexccbdre") - .withTags(mapOf("qkghtpwijnhy", "cexdrrvqa", "owvrvmtgjqppyos", "svfycxzbfv", "sxkm", "ronzmyhgfip")) - .withProperties(new VirtualMachineTemplateProperties().withInventoryItemId("rhneuyowq") - .withUuid("wyt") - .withVmmServerId("ib")) - .withExtendedLocation(new ExtendedLocation().withType("itvgbmhrixkwm").withName("jejveg")); + VirtualMachineTemplateInner model = new VirtualMachineTemplateInner().withLocation("wrmjmwvvjektc") + .withTags(mapOf("dqgbiqylihkaetc", "nhwlrsffrzpwvl", "ymuctqhjfbebrj", "tvfcivfsn")) + .withProperties(new VirtualMachineTemplateProperties().withInventoryItemId("xhbkuofq") + .withUuid("yk") + .withVmmServerId("enevfyexfwhybci")) + .withExtendedLocation(new ExtendedLocation().withType("onuq").withName("fkbey")); model = BinaryData.fromObject(model).toObject(VirtualMachineTemplateInner.class); - Assertions.assertEquals("bpnaixexccbdre", model.location()); - Assertions.assertEquals("cexdrrvqa", model.tags().get("qkghtpwijnhy")); - Assertions.assertEquals("rhneuyowq", model.properties().inventoryItemId()); - Assertions.assertEquals("wyt", model.properties().uuid()); - Assertions.assertEquals("ib", model.properties().vmmServerId()); - Assertions.assertEquals("itvgbmhrixkwm", model.extendedLocation().type()); - Assertions.assertEquals("jejveg", model.extendedLocation().name()); + Assertions.assertEquals("wrmjmwvvjektc", model.location()); + Assertions.assertEquals("nhwlrsffrzpwvl", model.tags().get("dqgbiqylihkaetc")); + Assertions.assertEquals("xhbkuofq", model.properties().inventoryItemId()); + Assertions.assertEquals("yk", model.properties().uuid()); + Assertions.assertEquals("enevfyexfwhybci", model.properties().vmmServerId()); + Assertions.assertEquals("onuq", model.extendedLocation().type()); + Assertions.assertEquals("fkbey", model.extendedLocation().name()); } // Use "Map.of" if available diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplateInventoryItemTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplateInventoryItemTests.java index 0f216d0d6428..0b1b0a731bbe 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplateInventoryItemTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplateInventoryItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,7 +11,7 @@ public final class VirtualMachineTemplateInventoryItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineTemplateInventoryItem model = BinaryData.fromString( - "{\"inventoryType\":\"VirtualMachineTemplate\",\"cpuCount\":638538203,\"memoryMB\":156446182,\"osType\":\"Windows\",\"osName\":\"vkjlmxhom\",\"managedResourceId\":\"nhdwdigumbnra\",\"uuid\":\"zzp\",\"inventoryItemName\":\"a\",\"provisioningState\":\"Provisioning\"}") + "{\"inventoryType\":\"VirtualMachineTemplate\",\"cpuCount\":1574886958,\"memoryMB\":1625369627,\"osType\":\"Linux\",\"osName\":\"mokzhjjklf\",\"managedResourceId\":\"mouwqlgzrfzeey\",\"uuid\":\"izikayuhq\",\"inventoryItemName\":\"jbsybbqw\",\"provisioningState\":\"Succeeded\"}") .toObject(VirtualMachineTemplateInventoryItem.class); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplateListResultTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplateListResultTests.java index 14b5b5d38db4..bb062aa5a4cd 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplateListResultTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplateListResultTests.java @@ -1,25 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.scvmm.models.VirtualMachineTemplateListResult; +import com.azure.resourcemanager.scvmm.implementation.models.VirtualMachineTemplateListResult; import org.junit.jupiter.api.Assertions; public final class VirtualMachineTemplateListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineTemplateListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"inventoryItemId\":\"dagxtibqd\",\"uuid\":\"xwak\",\"vmmServerId\":\"gqxndlkzgxhuripl\",\"osType\":\"Linux\",\"osName\":\"xunkbebxmubyynt\",\"computerName\":\"rbqtkoie\",\"memoryMB\":1053107000,\"cpuCount\":921402224,\"limitCpuForMigration\":\"true\",\"dynamicMemoryEnabled\":\"true\",\"isCustomizable\":\"false\",\"dynamicMemoryMaxMB\":98779693,\"dynamicMemoryMinMB\":1887219641,\"isHighlyAvailable\":\"true\",\"generation\":284153241,\"networkInterfaces\":[{\"name\":\"bm\",\"displayName\":\"cjefuzmu\",\"ipv4Addresses\":[\"ttdumorppxebmnzb\",\"bhjpglkfgohdne\",\"el\"],\"ipv6Addresses\":[\"sdyhtozfikdowwq\"],\"macAddress\":\"v\",\"virtualNetworkId\":\"xclvit\",\"networkName\":\"qzonosggbhcohf\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"jutiiswacff\"}],\"disks\":[{\"name\":\"zewk\",\"displayName\":\"hqcrailvpnpp\",\"diskId\":\"flrwd\",\"diskSizeGB\":1982601986,\"maxDiskSizeGB\":1444401866,\"bus\":885184868,\"lun\":1095036678,\"busType\":\"agafcnihgwqap\",\"vhdType\":\"dgfbcvkcvqvpke\",\"volumeType\":\"cvdrhvoodsot\",\"vhdFormatType\":\"bzdopcj\",\"templateDiskId\":\"nhdldwmgxcx\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"true\"}],\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"type\":\"wuoegrpk\",\"name\":\"wniyqsluicpd\"},\"location\":\"kzzlvmbmpaxmodf\",\"tags\":{\"sbpfvmwyhr\":\"fy\"},\"id\":\"ouyftaakc\",\"name\":\"wiyzvqtmnubexkp\",\"type\":\"ksmond\"},{\"properties\":{\"inventoryItemId\":\"uxvypomgkopkwh\",\"uuid\":\"v\",\"vmmServerId\":\"jqg\",\"osType\":\"Other\",\"osName\":\"ocmbqfqvmkcxoza\",\"computerName\":\"helxprglya\",\"memoryMB\":1462356590,\"cpuCount\":1586709440,\"limitCpuForMigration\":\"false\",\"dynamicMemoryEnabled\":\"true\",\"isCustomizable\":\"false\",\"dynamicMemoryMaxMB\":465544934,\"dynamicMemoryMinMB\":1949252963,\"isHighlyAvailable\":\"true\",\"generation\":785036468,\"networkInterfaces\":[{\"name\":\"osx\",\"displayName\":\"qrhzoymibmrqyib\",\"ipv4Addresses\":[\"fluszdtm\",\"rkwofyyvoqa\"],\"ipv6Addresses\":[\"expbtg\",\"wbwo\",\"nwashrtd\"],\"macAddress\":\"cnqxwbpokulpi\",\"virtualNetworkId\":\"waasip\",\"networkName\":\"iobyu\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"wcciuqgbdbu\"}],\"disks\":[{\"name\":\"fbtkuwhhmhyk\",\"displayName\":\"oxafn\",\"diskId\":\"lpichk\",\"diskSizeGB\":1847154217,\"maxDiskSizeGB\":1638328793,\"bus\":1909436106,\"lun\":103737339,\"busType\":\"kkpwdreqnovvq\",\"vhdType\":\"vljxywsu\",\"volumeType\":\"yrs\",\"vhdFormatType\":\"sytgadgvraea\",\"templateDiskId\":\"e\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"true\"},{\"name\":\"rwlqu\",\"displayName\":\"jfqka\",\"diskId\":\"wiipfpub\",\"diskSizeGB\":1516044260,\"maxDiskSizeGB\":1113434704,\"bus\":254804801,\"lun\":1572357139,\"busType\":\"qkvpuvksgplsakn\",\"vhdType\":\"fsynljphuop\",\"volumeType\":\"dlqiyntorzih\",\"vhdFormatType\":\"osjswsr\",\"templateDiskId\":\"lyzrpzbchckqqzqi\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"false\"},{\"name\":\"uiizynke\",\"displayName\":\"atrwyhqmibzyh\",\"diskId\":\"tsmypyynpcdp\",\"diskSizeGB\":874382237,\"maxDiskSizeGB\":66905695,\"bus\":944462660,\"lun\":1547081847,\"busType\":\"abikns\",\"vhdType\":\"gj\",\"volumeType\":\"bldtlww\",\"vhdFormatType\":\"kdmtncvokotll\",\"templateDiskId\":\"yhgsy\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"false\"}],\"provisioningState\":\"Updating\"},\"extendedLocation\":{\"type\":\"dtbnnha\",\"name\":\"ocrkvcikh\"},\"location\":\"p\",\"tags\":{\"wggxkallat\":\"gxqquezik\",\"cjzkzivgvvcna\":\"elwuipi\",\"drd\":\"rhyrnxxmueed\"},\"id\":\"stkwqqtch\",\"name\":\"alm\",\"type\":\"mtdaa\"},{\"properties\":{\"inventoryItemId\":\"v\",\"uuid\":\"gpiohgwxrtfudxe\",\"vmmServerId\":\"gyqagvrvmnpkuk\",\"osType\":\"Windows\",\"osName\":\"dblx\",\"computerName\":\"imfnjhfjx\",\"memoryMB\":205109580,\"cpuCount\":1343784830,\"limitCpuForMigration\":\"false\",\"dynamicMemoryEnabled\":\"true\",\"isCustomizable\":\"false\",\"dynamicMemoryMaxMB\":1631223460,\"dynamicMemoryMinMB\":520152641,\"isHighlyAvailable\":\"true\",\"generation\":2032728059,\"networkInterfaces\":[{\"name\":\"eaivxwczel\",\"displayName\":\"irels\",\"ipv4Addresses\":[\"enwabfatk\",\"ddxbjhwuaanoz\"],\"ipv6Addresses\":[\"ph\",\"oulpjrv\",\"ag\",\"rvimjwosytxitcsk\"],\"macAddress\":\"k\",\"virtualNetworkId\":\"umiekkezzi\",\"networkName\":\"ly\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"ebdunyg\"},{\"name\":\"qidbqfatpxllrxcy\",\"displayName\":\"oadsuvar\",\"ipv4Addresses\":[\"dmjsjqb\",\"hhyxxrw\",\"yc\",\"duhpk\"],\"ipv6Addresses\":[\"ymareqnajxqugj\",\"ky\"],\"macAddress\":\"beddgssofw\",\"virtualNetworkId\":\"zqalkrmnjijpx\",\"networkName\":\"q\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"baaa\"}],\"disks\":[{\"name\":\"ayffim\",\"displayName\":\"rtuzqogs\",\"diskId\":\"nevfdnw\",\"diskSizeGB\":2059840008,\"maxDiskSizeGB\":377160768,\"bus\":1440499034,\"lun\":10547913,\"busType\":\"euzsoi\",\"vhdType\":\"ud\",\"volumeType\":\"rx\",\"vhdFormatType\":\"thzvaytdwkqbrqu\",\"templateDiskId\":\"axhexiilivp\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"true\"},{\"name\":\"q\",\"displayName\":\"qoaxoruzfgs\",\"diskId\":\"yfxrx\",\"diskSizeGB\":1104175771,\"maxDiskSizeGB\":2043686923,\"bus\":137172163,\"lun\":699446772,\"busType\":\"ezw\",\"vhdType\":\"nwxuqlcvydyp\",\"volumeType\":\"dooaojkniodko\",\"vhdFormatType\":\"bw\",\"templateDiskId\":\"jhemms\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"false\"},{\"name\":\"rodtjinfwjlfl\",\"displayName\":\"acjvefkd\",\"diskId\":\"oakggkfpag\",\"diskSizeGB\":577549105,\"maxDiskSizeGB\":1739461107,\"bus\":1784212142,\"lun\":1177485669,\"busType\":\"ylsyxkqjnsje\",\"vhdType\":\"tiagx\",\"volumeType\":\"sz\",\"vhdFormatType\":\"mpsbzkfzbeyv\",\"templateDiskId\":\"qi\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"false\"}],\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"type\":\"jxdxrbuukz\",\"name\":\"ewyhml\"},\"location\":\"aztz\",\"tags\":{\"fz\":\"ncckw\"},\"id\":\"whxxbuyqax\",\"name\":\"feqztppriol\",\"type\":\"or\"},{\"properties\":{\"inventoryItemId\":\"tolmncwsobqw\",\"uuid\":\"dbnw\",\"vmmServerId\":\"fhucqdpfuv\",\"osType\":\"Windows\",\"osName\":\"jjcanvxbvtv\",\"computerName\":\"utncorm\",\"memoryMB\":1945766703,\"cpuCount\":1218996877,\"limitCpuForMigration\":\"false\",\"dynamicMemoryEnabled\":\"false\",\"isCustomizable\":\"true\",\"dynamicMemoryMaxMB\":1364369199,\"dynamicMemoryMinMB\":2052668715,\"isHighlyAvailable\":\"true\",\"generation\":1902610413,\"networkInterfaces\":[{\"name\":\"nnqvsa\",\"displayName\":\"qntorudsgsahmkyc\",\"ipv4Addresses\":[\"uwjuetaeburuvdmo\",\"s\",\"zlxwabmqoefkifr\"],\"ipv6Addresses\":[\"u\",\"ujmqlgkfbtndoa\",\"n\",\"bjcntujitc\"],\"macAddress\":\"df\",\"virtualNetworkId\":\"waezkojvd\",\"networkName\":\"zfoqouicybxar\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"ciqopidoa\"},{\"name\":\"iodhkhazxkhnz\",\"displayName\":\"nlwntoe\",\"ipv4Addresses\":[\"dwbwhkszzcmrvexz\",\"vbtqgsfraoyzk\",\"owtlmnguxawqald\"],\"ipv6Addresses\":[\"uximerqfobw\",\"znkbykutwpfhpagm\"],\"macAddress\":\"skdsnfdsdoakg\",\"virtualNetworkId\":\"lmkk\",\"networkName\":\"vdlhewpusdsttwv\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Dynamic\",\"nicId\":\"cngqqmoakufgmjz\"},{\"name\":\"rdgrtw\",\"displayName\":\"nuuzkopbm\",\"ipv4Addresses\":[\"fdwoyuhh\",\"iuiefozbhdmsm\"],\"ipv6Addresses\":[\"qhoftrmaequiah\",\"icslfaoq\"],\"macAddress\":\"iyylhalnswhccsp\",\"virtualNetworkId\":\"aivwitqscywu\",\"networkName\":\"woluhczbwemhair\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"swe\"}],\"disks\":[{\"name\":\"dxggicccnxqhuexm\",\"displayName\":\"tlstvlzywem\",\"diskId\":\"rncsdtclu\",\"diskSizeGB\":2121256273,\"maxDiskSizeGB\":1137275627,\"bus\":1674447280,\"lun\":1861224364,\"busType\":\"gusl\",\"vhdType\":\"adcy\",\"volumeType\":\"ukyhejhzis\",\"vhdFormatType\":\"fpel\",\"templateDiskId\":\"p\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"true\"},{\"name\":\"pqvujzraehtwdwrf\",\"displayName\":\"wib\",\"diskId\":\"cdl\",\"diskSizeGB\":1538697515,\"maxDiskSizeGB\":523065183,\"bus\":206253573,\"lun\":137143614,\"busType\":\"stwit\",\"vhdType\":\"hevxcced\",\"volumeType\":\"nmdyodnwzxl\",\"vhdFormatType\":\"cvnhltiugc\",\"templateDiskId\":\"avvwxqi\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"true\"},{\"name\":\"y\",\"displayName\":\"xwlmdjr\",\"diskId\":\"fgbvfvpdbo\",\"diskSizeGB\":2095776205,\"maxDiskSizeGB\":1592823352,\"bus\":218756340,\"lun\":1933405509,\"busType\":\"krribdeibqi\",\"vhdType\":\"kghv\",\"volumeType\":\"dzwmkrefajpj\",\"vhdFormatType\":\"wkqnyhg\",\"templateDiskId\":\"j\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"true\"}],\"provisioningState\":\"Provisioning\"},\"extendedLocation\":{\"type\":\"sjabibs\",\"name\":\"tawfsdjpvkvp\"},\"location\":\"xbkzbzkdvncj\",\"tags\":{\"jjklff\":\"durgkakmokz\",\"bizikayuhq\":\"mouwqlgzrfzeey\",\"wrv\":\"bjbsybb\"},\"id\":\"ldgmfpgvmpip\",\"name\":\"slthaq\",\"type\":\"x\"}],\"nextLink\":\"mwutwbdsre\"}") + "{\"value\":[{\"properties\":{\"inventoryItemId\":\"mv\",\"uuid\":\"kgpwoz\",\"vmmServerId\":\"kfpbs\",\"osType\":\"Windows\",\"osName\":\"dxluu\",\"computerName\":\"ttouwaboekqvkel\",\"memoryMB\":604699248,\"cpuCount\":1207590142,\"limitCpuForMigration\":\"false\",\"dynamicMemoryEnabled\":\"false\",\"isCustomizable\":\"true\",\"dynamicMemoryMaxMB\":1504289199,\"dynamicMemoryMinMB\":1386938063,\"isHighlyAvailable\":\"true\",\"generation\":131354519,\"networkInterfaces\":[{\"name\":\"isxyawjoyaqcslyj\",\"displayName\":\"iidzyexzne\",\"ipv4Addresses\":[\"hnrztfol\",\"bnxknalaulppg\",\"dtpnapnyiropuhp\"],\"ipv6Addresses\":[\"pgylg\",\"git\",\"medjvcslynqwwncw\",\"zhxgktrmgucn\"],\"macAddress\":\"kteo\",\"virtualNetworkId\":\"lwptfdy\",\"networkName\":\"fqbuaceopzf\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"ppcqeqxolz\"},{\"name\":\"hzxct\",\"displayName\":\"gbkdmoizpos\",\"ipv4Addresses\":[\"rcfbunrm\",\"qjhhkxbpv\"],\"ipv6Addresses\":[\"jhxxjyn\"],\"macAddress\":\"divkrt\",\"virtualNetworkId\":\"bxqz\",\"networkName\":\"zjf\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"ivetvtcq\"},{\"name\":\"tdo\",\"displayName\":\"cbxvwvxyslqbh\",\"ipv4Addresses\":[\"obl\",\"tkblmpewww\",\"bkrvrnsvshqj\"],\"ipv6Addresses\":[\"crsbfovasr\"],\"macAddress\":\"v\",\"virtualNetworkId\":\"hsqfsubcgjbirxbp\",\"networkName\":\"srfbjfdtwss\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"bexilzznfqqnv\"}],\"disks\":[{\"name\":\"taruoujmkcj\",\"displayName\":\"qytjrybnwjewgd\",\"diskId\":\"ervnaenqpehi\",\"diskSizeGB\":1729172335,\"maxDiskSizeGB\":181978704,\"bus\":1553722584,\"lun\":1126761283,\"busType\":\"nzdndslgna\",\"vhdType\":\"igynduhavhqlk\",\"volumeType\":\"umaq\",\"vhdFormatType\":\"bgycduiertgccym\",\"templateDiskId\":\"olpsslqlf\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"true\"},{\"name\":\"bglzpswi\",\"displayName\":\"mcwyhzdxssadb\",\"diskId\":\"nvdfznuda\",\"diskSizeGB\":1616602527,\"maxDiskSizeGB\":722282959,\"bus\":11756294,\"lun\":364348069,\"busType\":\"ylpstdbhhxsrzdz\",\"vhdType\":\"erscdntne\",\"volumeType\":\"iwjmygtdssls\",\"vhdFormatType\":\"mweriofzpy\",\"templateDiskId\":\"emwabnet\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"false\"},{\"name\":\"h\",\"displayName\":\"plvwiwubmwmbes\",\"diskId\":\"nkww\",\"diskSizeGB\":363667258,\"maxDiskSizeGB\":1624421051,\"bus\":799059143,\"lun\":1248501015,\"busType\":\"aokonzmnsik\",\"vhdType\":\"kqze\",\"volumeType\":\"kdltfzxmhhvhg\",\"vhdFormatType\":\"eodkwobda\",\"templateDiskId\":\"tibqdxbxwakb\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"false\"},{\"name\":\"dlkzgxhuri\",\"displayName\":\"bpodxunkbebxm\",\"diskId\":\"yyntwl\",\"diskSizeGB\":2005326650,\"maxDiskSizeGB\":1915904679,\"bus\":1240053572,\"lun\":167603212,\"busType\":\"eotg\",\"vhdType\":\"l\",\"volumeType\":\"muwlauwzizxbm\",\"vhdFormatType\":\"cjefuzmu\",\"templateDiskId\":\"bttdumorppxe\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"true\"}],\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"hjpglkf\",\"name\":\"hdneuelfph\"},\"location\":\"yhtozfikdowwqu\",\"tags\":{\"lvithhqzonosgg\":\"zx\",\"ljuti\":\"hcohfwdsjnk\"},\"id\":\"swacffgdkzz\",\"name\":\"wkfvhqcrailvp\",\"type\":\"ppfufl\"},{\"properties\":{\"inventoryItemId\":\"mh\",\"uuid\":\"xyjrxsagafcnih\",\"vmmServerId\":\"qapnedgfbcv\",\"osType\":\"Linux\",\"osName\":\"vpk\",\"computerName\":\"dcvd\",\"memoryMB\":393734239,\"cpuCount\":943919605,\"limitCpuForMigration\":\"true\",\"dynamicMemoryEnabled\":\"true\",\"isCustomizable\":\"false\",\"dynamicMemoryMaxMB\":540707002,\"dynamicMemoryMinMB\":67092515,\"isHighlyAvailable\":\"true\",\"generation\":542490098,\"networkInterfaces\":[{\"name\":\"dldwmgxc\",\"displayName\":\"slpmutwuo\",\"ipv4Addresses\":[\"pkhjwni\",\"qsluicp\"],\"ipv6Addresses\":[\"kzzlvmbmpaxmodf\"],\"macAddress\":\"efyw\",\"virtualNetworkId\":\"pfvmwyhrfou\",\"networkName\":\"taakc\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"mnubexkpzksmond\"},{\"name\":\"quxvypomgkop\",\"displayName\":\"hojvpajqgxysmocm\",\"ipv4Addresses\":[\"qvmkcxo\"],\"ipv6Addresses\":[\"vhelxprglyatdd\",\"kcbcue\",\"rjxgciqib\"],\"macAddress\":\"osx\",\"virtualNetworkId\":\"qrhzoymibmrqyib\",\"networkName\":\"wfluszdt\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"yvoqa\"},{\"name\":\"iexpbtgiwbwo\",\"displayName\":\"washr\",\"ipv4Addresses\":[\"kcnqxwbpo\",\"ulpiuj\"],\"ipv6Addresses\":[\"sipqii\",\"byuqerpqlp\"],\"macAddress\":\"cciuqgbdbutau\",\"virtualNetworkId\":\"btkuwhh\",\"networkName\":\"ykojoxafnndlpic\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"yhbpkkpw\"}],\"disks\":[{\"name\":\"novvqfovljxy\",\"displayName\":\"uwsyrsndsytgadg\",\"diskId\":\"aeaeneqnzarrw\",\"diskSizeGB\":333965716,\"maxDiskSizeGB\":1564647724,\"bus\":1024305587,\"lun\":419659092,\"busType\":\"cewiipfpub\",\"vhdType\":\"bwwift\",\"volumeType\":\"qkvpuvksgplsakn\",\"vhdFormatType\":\"fsynljphuop\",\"templateDiskId\":\"dlqiyntorzih\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"true\"},{\"name\":\"swsrms\",\"displayName\":\"zrpzb\",\"diskId\":\"ckqqzqioxiysui\",\"diskSizeGB\":2121235922,\"maxDiskSizeGB\":696201454,\"bus\":486073857,\"lun\":1103335296,\"busType\":\"rwyhqmibzyhwitsm\",\"vhdType\":\"yynpcdpumnzgmwz\",\"volumeType\":\"abikns\",\"vhdFormatType\":\"gj\",\"templateDiskId\":\"bldtlww\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"true\"},{\"name\":\"tncvokot\",\"displayName\":\"xdy\",\"diskId\":\"syocogjltdtbnnha\",\"diskSizeGB\":168472048,\"maxDiskSizeGB\":703261916,\"bus\":1190564384,\"lun\":1256948297,\"busType\":\"hnvpamqgxq\",\"vhdType\":\"ezikywggxkal\",\"volumeType\":\"tmelw\",\"vhdFormatType\":\"piccjzkzivgv\",\"templateDiskId\":\"nayrhyrnxxmueedn\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"true\"}],\"provisioningState\":\"Deleting\"},\"extendedLocation\":{\"type\":\"wq\",\"name\":\"chea\"},\"location\":\"fmtdaaygdvwvgp\",\"tags\":{\"xrtfudxep\":\"g\",\"himdbl\":\"gyqagvrvmnpkuk\",\"hfjx\":\"gwimfn\"},\"id\":\"mszkkfo\",\"name\":\"rey\",\"type\":\"kzikfjawneaivxwc\"},{\"properties\":{\"inventoryItemId\":\"pcirelsfeaen\",\"uuid\":\"bfatklddxbjhwu\",\"vmmServerId\":\"nozj\",\"osType\":\"Other\",\"osName\":\"youlp\",\"computerName\":\"v\",\"memoryMB\":1536946764,\"cpuCount\":1986199851,\"limitCpuForMigration\":\"true\",\"dynamicMemoryEnabled\":\"false\",\"isCustomizable\":\"false\",\"dynamicMemoryMaxMB\":2140169496,\"dynamicMemoryMinMB\":861887507,\"isHighlyAvailable\":\"true\",\"generation\":835762361,\"networkInterfaces\":[{\"name\":\"k\",\"displayName\":\"umiekkezzi\",\"ipv4Addresses\":[\"yf\"],\"ipv6Addresses\":[\"gqggebdunygae\",\"idb\",\"fatpxllrxcyjmoa\"],\"macAddress\":\"uvarmywdmjsjq\",\"virtualNetworkId\":\"hhyxxrw\",\"networkName\":\"co\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"ymareqnajxqugj\"},{\"name\":\"ycubeddgs\",\"displayName\":\"fwqmzqalkrmn\",\"ipv4Addresses\":[\"pxacqqudfn\",\"yxbaaabjyvayf\"],\"ipv6Addresses\":[\"rzrtuzqogsex\"],\"macAddress\":\"vfdnwnwmewzsyyce\",\"virtualNetworkId\":\"soibjudpfrx\",\"networkName\":\"thzvaytdwkqbrqu\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"i\"},{\"name\":\"vpdtiirqtdqoa\",\"displayName\":\"r\",\"ipv4Addresses\":[\"gsquyfxrxxlept\",\"amxjezwlw\"],\"ipv6Addresses\":[\"uqlcvydy\",\"atdooaojkniod\",\"oo\"],\"macAddress\":\"wnujhemmsbvdk\",\"virtualNetworkId\":\"odtji\",\"networkName\":\"wj\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"vefkdlfoakggk\"}],\"disks\":[{\"name\":\"ao\",\"displayName\":\"ulpqblylsyxkqjn\",\"diskId\":\"ervtiagxs\",\"diskSizeGB\":300652105,\"maxDiskSizeGB\":6214613,\"bus\":1182322128,\"lun\":650341652,\"busType\":\"kfzbeyvpnqicvi\",\"vhdType\":\"kjj\",\"volumeType\":\"xrbuukzclew\",\"vhdFormatType\":\"mlwpazt\",\"templateDiskId\":\"ofncckwyfzqwhxxb\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"true\"},{\"name\":\"zfeqztppri\",\"displayName\":\"xorjaltolmncwsob\",\"diskId\":\"csdbnwdcfhuc\",\"diskSizeGB\":895561091,\"maxDiskSizeGB\":1117894218,\"bus\":1621122974,\"lun\":1090638559,\"busType\":\"jjcanvxbvtv\",\"vhdType\":\"utncorm\",\"volumeType\":\"xqtvcofu\",\"vhdFormatType\":\"lvkgju\",\"templateDiskId\":\"dknnqvsazn\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"true\"},{\"name\":\"udsgs\",\"displayName\":\"mkycgra\",\"diskId\":\"juetaebur\",\"diskSizeGB\":1552436434,\"maxDiskSizeGB\":973815152,\"bus\":136999503,\"lun\":1719388893,\"busType\":\"xwabmqoe\",\"vhdType\":\"ifrvtpu\",\"volumeType\":\"jmqlgkfb\",\"vhdFormatType\":\"doaon\",\"templateDiskId\":\"jcntuj\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"true\"},{\"name\":\"df\",\"displayName\":\"waezkojvd\",\"diskId\":\"zfoqouicybxar\",\"diskSizeGB\":1685402148,\"maxDiskSizeGB\":1273142830,\"bus\":1813944379,\"lun\":122630062,\"busType\":\"q\",\"vhdType\":\"idoamciodhkha\",\"volumeType\":\"khnzbonlw\",\"vhdFormatType\":\"oegokdwbwh\",\"templateDiskId\":\"z\",\"storageQoSPolicy\":{},\"createDiffDisk\":\"true\"}],\"provisioningState\":\"Provisioning\"},\"extendedLocation\":{\"type\":\"ztvbtqgsfr\",\"name\":\"yzkoowtlmngu\"},\"location\":\"wqaldsyu\",\"tags\":{\"kutwpf\":\"merqfobwyznkb\",\"sd\":\"pagmhrskdsnf\",\"wpusdsttwvogv\":\"akgtdlmkkzevdlh\",\"qqmoaku\":\"bejdcn\"},\"id\":\"gm\",\"name\":\"zr\",\"type\":\"rdgrtw\"}],\"nextLink\":\"nuuzkopbm\"}") .toObject(VirtualMachineTemplateListResult.class); - Assertions.assertEquals("kzzlvmbmpaxmodf", model.value().get(0).location()); - Assertions.assertEquals("fy", model.value().get(0).tags().get("sbpfvmwyhr")); - Assertions.assertEquals("dagxtibqd", model.value().get(0).properties().inventoryItemId()); - Assertions.assertEquals("xwak", model.value().get(0).properties().uuid()); - Assertions.assertEquals("gqxndlkzgxhuripl", model.value().get(0).properties().vmmServerId()); - Assertions.assertEquals("wuoegrpk", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("wniyqsluicpd", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals("yhtozfikdowwqu", model.value().get(0).location()); + Assertions.assertEquals("zx", model.value().get(0).tags().get("lvithhqzonosgg")); + Assertions.assertEquals("mv", model.value().get(0).properties().inventoryItemId()); + Assertions.assertEquals("kgpwoz", model.value().get(0).properties().uuid()); + Assertions.assertEquals("kfpbs", model.value().get(0).properties().vmmServerId()); + Assertions.assertEquals("hjpglkf", model.value().get(0).extendedLocation().type()); + Assertions.assertEquals("hdneuelfph", model.value().get(0).extendedLocation().name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatePropertiesTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatePropertiesTests.java index bb4e2d737bc7..e949bf4c89d8 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatePropertiesTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -12,22 +12,21 @@ public final class VirtualMachineTemplatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineTemplateProperties model = BinaryData.fromString( - "{\"inventoryItemId\":\"zlmvfelfktgp\",\"uuid\":\"rpw\",\"vmmServerId\":\"eznoig\",\"osType\":\"Linux\",\"osName\":\"w\",\"computerName\":\"kpnb\",\"memoryMB\":1716189852,\"cpuCount\":1901897096,\"limitCpuForMigration\":\"true\",\"dynamicMemoryEnabled\":\"false\",\"isCustomizable\":\"false\",\"dynamicMemoryMaxMB\":959686247,\"dynamicMemoryMinMB\":1162521892,\"isHighlyAvailable\":\"false\",\"generation\":1479780432,\"networkInterfaces\":[{\"name\":\"nfaazpxdtnkdmkq\",\"displayName\":\"lwuenvrkp\",\"ipv4Addresses\":[\"aibrebqaaysjkixq\",\"nqttezl\",\"fffiak\",\"jpqqmted\"],\"ipv6Addresses\":[\"mjihyeozphv\"],\"macAddress\":\"uyqncygupkvipmd\",\"virtualNetworkId\":\"wx\",\"networkName\":\"pevzhfst\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"bypel\"},{\"name\":\"uvhixbjxyfwn\",\"displayName\":\"r\",\"ipv4Addresses\":[\"lsttpkiwkkbnuj\"],\"ipv6Addresses\":[\"vtylbfpncu\",\"doiwi\",\"thtywub\",\"cbihwqk\"],\"macAddress\":\"dntwjchrdgo\",\"virtualNetworkId\":\"xum\",\"networkName\":\"ton\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"dlwggytsbwtovv\"}],\"disks\":[{\"name\":\"inqfiufxqknpirgn\",\"displayName\":\"ttwqmsni\",\"diskId\":\"cdm\",\"diskSizeGB\":266606002,\"maxDiskSizeGB\":235273121,\"bus\":803649154,\"lun\":1533423181,\"busType\":\"k\",\"vhdType\":\"frddhcrati\",\"volumeType\":\"ronasxift\",\"vhdFormatType\":\"qyzhf\",\"templateDiskId\":\"esgogc\",\"storageQoSPolicy\":{\"name\":\"nnxk\",\"id\":\"gnyhmossxkkg\"},\"createDiffDisk\":\"false\"},{\"name\":\"gh\",\"displayName\":\"bdhqxvcxgf\",\"diskId\":\"dsofbshrns\",\"diskSizeGB\":1330323698,\"maxDiskSizeGB\":1537279832,\"bus\":333268682,\"lun\":1290029311,\"busType\":\"bycnunvjsrtkf\",\"vhdType\":\"nopqgikyzirtx\",\"volumeType\":\"uxzejntpsew\",\"vhdFormatType\":\"oi\",\"templateDiskId\":\"ukry\",\"storageQoSPolicy\":{\"name\":\"qmi\",\"id\":\"xorgg\"},\"createDiffDisk\":\"false\"},{\"name\":\"aomtbghhavgrvkff\",\"displayName\":\"jzhpjbibgjmfx\",\"diskId\":\"vfcluyovwxnbkfe\",\"diskSizeGB\":1782319370,\"maxDiskSizeGB\":357757853,\"bus\":740528384,\"lun\":1673017156,\"busType\":\"g\",\"vhdType\":\"ujb\",\"volumeType\":\"omvzzbtd\",\"vhdFormatType\":\"vp\",\"templateDiskId\":\"yujviylwdshfssn\",\"storageQoSPolicy\":{\"name\":\"ye\",\"id\":\"ymsgaojfmwnc\"},\"createDiffDisk\":\"false\"}],\"provisioningState\":\"Failed\"}") + "{\"inventoryItemId\":\"jky\",\"uuid\":\"j\",\"vmmServerId\":\"ujqgidok\",\"osType\":\"Linux\",\"osName\":\"yoxgvcltbgsnc\",\"computerName\":\"kjeszz\",\"memoryMB\":1537141479,\"cpuCount\":2005470526,\"limitCpuForMigration\":\"false\",\"dynamicMemoryEnabled\":\"true\",\"isCustomizable\":\"true\",\"dynamicMemoryMaxMB\":615517918,\"dynamicMemoryMinMB\":1787736845,\"isHighlyAvailable\":\"false\",\"generation\":1703122052,\"networkInterfaces\":[{\"name\":\"ec\",\"displayName\":\"odebfqkkrbmpu\",\"ipv4Addresses\":[\"iw\",\"lzlfbxzpuz\",\"cispnqzahmgkbr\"],\"ipv6Addresses\":[\"dhibnuq\"],\"macAddress\":\"pikad\",\"virtualNetworkId\":\"vtq\",\"networkName\":\"n\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"gmebfsiarbutrcv\"},{\"name\":\"azzmhjrunmpxt\",\"displayName\":\"bh\",\"ipv4Addresses\":[\"l\",\"nkxmyskpbhenbtk\",\"xywnytnrsynlqidy\"],\"ipv6Addresses\":[\"czfc\",\"haaxdbabphl\"],\"macAddress\":\"qlfktsths\",\"virtualNetworkId\":\"ocmnyyazttbtwwrq\",\"networkName\":\"edckzywbiexzfey\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"jwbhqwalmuz\"},{\"name\":\"xaepdkzjancuxr\",\"displayName\":\"wbavxbniwdj\",\"ipv4Addresses\":[\"tsdbpgn\"],\"ipv6Addresses\":[\"x\"],\"macAddress\":\"zxbzpfzabglc\",\"virtualNetworkId\":\"xwtctyqiklbbovpl\",\"networkName\":\"bhvgy\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"fssxqukkfplg\"}],\"disks\":[{\"name\":\"nkjzkdeslpvlop\",\"displayName\":\"yighxpk\",\"diskId\":\"zb\",\"diskSizeGB\":823200813,\"maxDiskSizeGB\":830727700,\"bus\":133816698,\"lun\":6362345,\"busType\":\"yqupedeojnabckh\",\"vhdType\":\"txp\",\"volumeType\":\"ebtfhvpesap\",\"vhdFormatType\":\"rdqmhjjdhtldwkyz\",\"templateDiskId\":\"utknc\",\"storageQoSPolicy\":{\"name\":\"wsvlxotogtwrupqs\",\"id\":\"nmic\"},\"createDiffDisk\":\"true\"},{\"name\":\"eoveilovnotyf\",\"displayName\":\"cnjbkcnxdhbt\",\"diskId\":\"phywpnvj\",\"diskSizeGB\":1633235296,\"maxDiskSizeGB\":1979421186,\"bus\":1468269047,\"lun\":1158367240,\"busType\":\"plpho\",\"vhdType\":\"scrpabgyepsbjt\",\"volumeType\":\"qugxywpmueefjzwf\",\"vhdFormatType\":\"q\",\"templateDiskId\":\"ids\",\"storageQoSPolicy\":{\"name\":\"nobglaocq\",\"id\":\"ccm\"},\"createDiffDisk\":\"false\"},{\"name\":\"xy\",\"displayName\":\"moyrxvwfudwpz\",\"diskId\":\"xhdzhlrqjbhckf\",\"diskSizeGB\":1523615779,\"maxDiskSizeGB\":367303674,\"bus\":1228255689,\"lun\":1085647312,\"busType\":\"pycanuzbpz\",\"vhdType\":\"fkuwbcrnwbmehhse\",\"volumeType\":\"jusrtslhspk\",\"vhdFormatType\":\"emaofmxagkvt\",\"templateDiskId\":\"lmqkrhahvlj\",\"storageQoSPolicy\":{\"name\":\"aquhcdhm\",\"id\":\"alaexqpvfadmwsrc\"},\"createDiffDisk\":\"true\"},{\"name\":\"pv\",\"displayName\":\"mzlfmisgwb\",\"diskId\":\"beldawkzbaliourq\",\"diskSizeGB\":997736872,\"maxDiskSizeGB\":30531984,\"bus\":33232567,\"lun\":1607260784,\"busType\":\"fwxosowzxcu\",\"vhdType\":\"cjooxdjebwpucwwf\",\"volumeType\":\"vbvmeu\",\"vhdFormatType\":\"ivyhzceuojgjrwju\",\"templateDiskId\":\"otwmcdyt\",\"storageQoSPolicy\":{\"name\":\"it\",\"id\":\"rjaw\"},\"createDiffDisk\":\"true\"}],\"provisioningState\":\"Created\"}") .toObject(VirtualMachineTemplateProperties.class); - Assertions.assertEquals("zlmvfelfktgp", model.inventoryItemId()); - Assertions.assertEquals("rpw", model.uuid()); - Assertions.assertEquals("eznoig", model.vmmServerId()); + Assertions.assertEquals("jky", model.inventoryItemId()); + Assertions.assertEquals("j", model.uuid()); + Assertions.assertEquals("ujqgidok", model.vmmServerId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualMachineTemplateProperties model - = new VirtualMachineTemplateProperties().withInventoryItemId("zlmvfelfktgp") - .withUuid("rpw") - .withVmmServerId("eznoig"); + VirtualMachineTemplateProperties model = new VirtualMachineTemplateProperties().withInventoryItemId("jky") + .withUuid("j") + .withVmmServerId("ujqgidok"); model = BinaryData.fromObject(model).toObject(VirtualMachineTemplateProperties.class); - Assertions.assertEquals("zlmvfelfktgp", model.inventoryItemId()); - Assertions.assertEquals("rpw", model.uuid()); - Assertions.assertEquals("eznoig", model.vmmServerId()); + Assertions.assertEquals("jky", model.inventoryItemId()); + Assertions.assertEquals("j", model.uuid()); + Assertions.assertEquals("ujqgidok", model.vmmServerId()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplateTagsUpdateTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplateTagsUpdateTests.java index e2d021a59d7c..a4ff3dfe0090 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplateTagsUpdateTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplateTagsUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -14,17 +14,17 @@ public final class VirtualMachineTemplateTagsUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineTemplateTagsUpdate model - = BinaryData.fromString("{\"tags\":{\"cxkdmligovi\":\"opidkqqfkuv\",\"goorbteo\":\"rxkpmloazuruoc\"}}") + = BinaryData.fromString("{\"tags\":{\"jzuaejxdultskzbb\":\"prnxipeil\"}}") .toObject(VirtualMachineTemplateTagsUpdate.class); - Assertions.assertEquals("opidkqqfkuv", model.tags().get("cxkdmligovi")); + Assertions.assertEquals("prnxipeil", model.tags().get("jzuaejxdultskzbb")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualMachineTemplateTagsUpdate model = new VirtualMachineTemplateTagsUpdate() - .withTags(mapOf("cxkdmligovi", "opidkqqfkuv", "goorbteo", "rxkpmloazuruoc")); + VirtualMachineTemplateTagsUpdate model + = new VirtualMachineTemplateTagsUpdate().withTags(mapOf("jzuaejxdultskzbb", "prnxipeil")); model = BinaryData.fromObject(model).toObject(VirtualMachineTemplateTagsUpdate.class); - Assertions.assertEquals("opidkqqfkuv", model.tags().get("cxkdmligovi")); + Assertions.assertEquals("prnxipeil", model.tags().get("jzuaejxdultskzbb")); } // Use "Map.of" if available diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesCreateOrUpdateMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesCreateOrUpdateMockTests.java index c4ed8df7f74b..8439779c044c 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesCreateOrUpdateMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,7 +9,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.ExtendedLocation; import com.azure.resourcemanager.scvmm.models.VirtualMachineTemplate; import com.azure.resourcemanager.scvmm.models.VirtualMachineTemplateProperties; @@ -25,34 +25,33 @@ public final class VirtualMachineTemplatesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"inventoryItemId\":\"rhv\",\"uuid\":\"laiwdcxsmlzzh\",\"vmmServerId\":\"txetlgydl\",\"osType\":\"Linux\",\"osName\":\"n\",\"computerName\":\"xybafiqgea\",\"memoryMB\":755954714,\"cpuCount\":1031040752,\"limitCpuForMigration\":\"false\",\"dynamicMemoryEnabled\":\"false\",\"isCustomizable\":\"false\",\"dynamicMemoryMaxMB\":344545687,\"dynamicMemoryMinMB\":1514866149,\"isHighlyAvailable\":\"true\",\"generation\":2131258889,\"networkInterfaces\":[{\"name\":\"zegjonfhjirwgdn\",\"displayName\":\"brfkspz\",\"ipv4Addresses\":[\"tk\",\"jcitdigsxcdglj\",\"lkeuac\",\"tomflrytswfpf\"],\"ipv6Addresses\":[\"ycxnmskw\",\"qjjyslurl\",\"shhkvpedw\",\"slsrhmpq\"],\"macAddress\":\"wskondcbrwimuvqe\",\"virtualNetworkId\":\"so\",\"networkName\":\"rrleaesinuqt\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"hehcecybmrqb\"},{\"name\":\"bbmpxdlvykfre\",\"displayName\":\"rseqwjksghudgz\",\"ipv4Addresses\":[\"gjggsv\",\"u\",\"kxibdafh\",\"kmdyomkxfbvfbh\"],\"ipv6Addresses\":[\"rhpw\"],\"macAddress\":\"ddei\",\"virtualNetworkId\":\"wzovgk\",\"networkName\":\"muikjcjcaztbws\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Dynamic\",\"nicId\":\"omlik\"}],\"disks\":[{\"name\":\"czcswka\",\"displayName\":\"ejyfdvlvhbwrnfx\",\"diskId\":\"ddpqt\",\"diskSizeGB\":277353032,\"maxDiskSizeGB\":1265914547,\"bus\":1175019303,\"lun\":1049399081,\"busType\":\"nkcoeqswankltyt\",\"vhdType\":\"droznn\",\"volumeType\":\"rlktgjcsggu\",\"vhdFormatType\":\"eml\",\"templateDiskId\":\"waeeczgfb\",\"storageQoSPolicy\":{\"name\":\"lelssxblycsxzujk\",\"id\":\"lsmdesqplpvmjc\"},\"createDiffDisk\":\"false\"},{\"name\":\"bidyv\",\"displayName\":\"owx\",\"diskId\":\"piudeugfsxzecpa\",\"diskSizeGB\":1953646440,\"maxDiskSizeGB\":1277972193,\"bus\":1188038408,\"lun\":814359275,\"busType\":\"hxepmrutzna\",\"vhdType\":\"obns\",\"volumeType\":\"jdjltymkmvgui\",\"vhdFormatType\":\"wartspphkixkykxd\",\"templateDiskId\":\"j\",\"storageQoSPolicy\":{\"name\":\"mucfxhikkf\",\"id\":\"mymyincqlhri\"},\"createDiffDisk\":\"true\"},{\"name\":\"miii\",\"displayName\":\"gqcg\",\"diskId\":\"ugqkctotiowlxteq\",\"diskSizeGB\":234322459,\"maxDiskSizeGB\":452524587,\"bus\":1297111913,\"lun\":1109620342,\"busType\":\"kranblwphqlkcc\",\"vhdType\":\"gygqwah\",\"volumeType\":\"ulwgniiprglvawuw\",\"vhdFormatType\":\"ufypiv\",\"templateDiskId\":\"bbjpmcubkmif\",\"storageQoSPolicy\":{\"name\":\"ku\",\"id\":\"phavpmhbrb\"},\"createDiffDisk\":\"false\"}],\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"pbbttefjoknss\",\"name\":\"zqedikdfrdbi\"},\"location\":\"rjgeih\",\"tags\":{\"xmjpbyep\":\"ggwfiwz\"},\"id\":\"mgtvlj\",\"name\":\"rc\",\"type\":\"yfqi\"}"; + = "{\"properties\":{\"inventoryItemId\":\"yefchnm\",\"uuid\":\"hmnxhkxjqi\",\"vmmServerId\":\"rweooxffifhx\",\"osType\":\"Linux\",\"osName\":\"ewmozqvbu\",\"computerName\":\"ma\",\"memoryMB\":422163654,\"cpuCount\":411873796,\"limitCpuForMigration\":\"true\",\"dynamicMemoryEnabled\":\"true\",\"isCustomizable\":\"false\",\"dynamicMemoryMaxMB\":1001749710,\"dynamicMemoryMinMB\":626371863,\"isHighlyAvailable\":\"true\",\"generation\":459855545,\"networkInterfaces\":[{\"name\":\"qhppubowsepdfgk\",\"displayName\":\"dherngbtcj\",\"ipv4Addresses\":[\"okqtobk\"],\"ipv6Addresses\":[\"ofshfphwpnulaiyw\"],\"macAddress\":\"jy\",\"virtualNetworkId\":\"slwkojpl\",\"networkName\":\"dnpdwrpqaf\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"hyet\"},{\"name\":\"ypococtfjgtixr\",\"displayName\":\"zuyt\",\"ipv4Addresses\":[\"lmuowo\",\"bauiropi\"],\"ipv6Addresses\":[\"zonwpngajinnixj\",\"wrtmjfjmy\",\"cxlzhcoxovnekh\",\"nlusfnrd\"],\"macAddress\":\"xtxrdcqtjvidt\",\"virtualNetworkId\":\"epu\",\"networkName\":\"vyjtcvu\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"sfuughtuqfecjx\"},{\"name\":\"gtuhxuicbu\",\"displayName\":\"mr\",\"ipv4Addresses\":[\"jlxuz\"],\"ipv6Addresses\":[\"pusxjb\",\"qehgpd\",\"hzjqatucoige\"],\"macAddress\":\"ncnwfepbnwgf\",\"virtualNetworkId\":\"jgcgbjbgdlfgtdys\",\"networkName\":\"quflqbctq\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Dynamic\",\"nicId\":\"kqzeqyjleziunjx\"}],\"disks\":[{\"name\":\"ntkwcegy\",\"displayName\":\"lbnseqac\",\"diskId\":\"vpilg\",\"diskSizeGB\":471177437,\"maxDiskSizeGB\":1467535453,\"bus\":1868502352,\"lun\":41587337,\"busType\":\"tg\",\"vhdType\":\"iookjbsah\",\"volumeType\":\"dt\",\"vhdFormatType\":\"elqacslmot\",\"templateDiskId\":\"bnfxofvc\",\"storageQoSPolicy\":{\"name\":\"dirazf\",\"id\":\"ejwabmdujtmvco\"},\"createDiffDisk\":\"true\"},{\"name\":\"m\",\"displayName\":\"rbuhhlky\",\"diskId\":\"tqsrogtuwkff\",\"diskSizeGB\":1799712298,\"maxDiskSizeGB\":1557166482,\"bus\":1340811417,\"lun\":634007444,\"busType\":\"vclglxnfuij\",\"vhdType\":\"busqogsfi\",\"volumeType\":\"yi\",\"vhdFormatType\":\"sharujtj\",\"templateDiskId\":\"xfz\",\"storageQoSPolicy\":{\"name\":\"ttvwkpqh\",\"id\":\"enuygbq\"},\"createDiffDisk\":\"false\"},{\"name\":\"kewvnqv\",\"displayName\":\"lguaucm\",\"diskId\":\"jwnlax\",\"diskSizeGB\":1875092168,\"maxDiskSizeGB\":415193474,\"bus\":1924185709,\"lun\":1185244352,\"busType\":\"vitac\",\"vhdType\":\"mfcsserx\",\"volumeType\":\"vs\",\"vhdFormatType\":\"hlwntsjgq\",\"templateDiskId\":\"xypruuuy\",\"storageQoSPolicy\":{\"name\":\"hrszi\",\"id\":\"yuel\"},\"createDiffDisk\":\"true\"}],\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"bf\",\"name\":\"ggagfln\"},\"location\":\"mtrwah\",\"tags\":{\"rohkpigqfusu\":\"ucftbyrp\"},\"id\":\"kzmkwklsnoxaxmqe\",\"name\":\"alhhjnhgwydyynfs\",\"type\":\"khgb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); VirtualMachineTemplate response = manager.virtualMachineTemplates() - .define("nwvroevytlyokrr") - .withRegion("kolawjmjsmwrokc") - .withExistingResourceGroup("voxczytpr") - .withExtendedLocation(new ExtendedLocation().withType("zvhqjwtrhtgvg").withName("c")) - .withTags(mapOf("afitlhguynuchlg", "zzzwy", "gzvlnsnn", "ltxdwhmozu", "agpgdph", "zfpafolpymwamxqz", - "ejchcsrlz", "vdulajv")) - .withProperties(new VirtualMachineTemplateProperties().withInventoryItemId("uxvnsasbcrymodi") - .withUuid("xkl") - .withVmmServerId("d")) + .define("gqoweyirdhlisn") + .withRegion("qlafcbahhpzpofoi") + .withExistingResourceGroup("wtqabpxuckp") + .withExtendedLocation(new ExtendedLocation().withType("cloxo").withName("qinjipnwjf")) + .withTags(mapOf("ilkmk", "p")) + .withProperties(new VirtualMachineTemplateProperties().withInventoryItemId("lqqmpiz") + .withUuid("w") + .withVmmServerId("qxpxiwfcngjsaa")) .create(); - Assertions.assertEquals("rjgeih", response.location()); - Assertions.assertEquals("ggwfiwz", response.tags().get("xmjpbyep")); - Assertions.assertEquals("rhv", response.properties().inventoryItemId()); - Assertions.assertEquals("laiwdcxsmlzzh", response.properties().uuid()); - Assertions.assertEquals("txetlgydl", response.properties().vmmServerId()); - Assertions.assertEquals("pbbttefjoknss", response.extendedLocation().type()); - Assertions.assertEquals("zqedikdfrdbi", response.extendedLocation().name()); + Assertions.assertEquals("mtrwah", response.location()); + Assertions.assertEquals("ucftbyrp", response.tags().get("rohkpigqfusu")); + Assertions.assertEquals("yefchnm", response.properties().inventoryItemId()); + Assertions.assertEquals("hmnxhkxjqi", response.properties().uuid()); + Assertions.assertEquals("rweooxffifhx", response.properties().vmmServerId()); + Assertions.assertEquals("bf", response.extendedLocation().type()); + Assertions.assertEquals("ggagfln", response.extendedLocation().name()); } // Use "Map.of" if available diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesGetByResourceGroupWithResponseMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesGetByResourceGroupWithResponseMockTests.java index 96602563d37b..5b6a3b400df8 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,7 +9,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.VirtualMachineTemplate; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,25 +21,25 @@ public final class VirtualMachineTemplatesGetByResourceGroupWithResponseMockTest @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"inventoryItemId\":\"lafcbahh\",\"uuid\":\"pofoi\",\"vmmServerId\":\"w\",\"osType\":\"Windows\",\"osName\":\"kmkkholvdnd\",\"computerName\":\"auo\",\"memoryMB\":1485385595,\"cpuCount\":1546671556,\"limitCpuForMigration\":\"true\",\"dynamicMemoryEnabled\":\"true\",\"isCustomizable\":\"false\",\"dynamicMemoryMaxMB\":1848545940,\"dynamicMemoryMinMB\":2049992940,\"isHighlyAvailable\":\"false\",\"generation\":2060279442,\"networkInterfaces\":[{\"name\":\"mnxhkxjqirwrweo\",\"displayName\":\"ffifhx\",\"ipv4Addresses\":[\"newmozqvb\",\"bqmamhsycxhxzgaz\",\"taboidvmf\"],\"ipv6Addresses\":[\"pubowsepdfg\"],\"macAddress\":\"tdherngbtcjuahok\",\"virtualNetworkId\":\"obkauxofsh\",\"networkName\":\"hwpnulaiywzejywh\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"l\"},{\"name\":\"npdwr\",\"displayName\":\"afgfugsnn\",\"ipv4Addresses\":[\"et\",\"fypococtfjgti\"],\"ipv6Addresses\":[\"vzuyturmlmu\",\"wolba\"],\"macAddress\":\"ropions\",\"virtualNetworkId\":\"nw\",\"networkName\":\"gajinnixjawrtmj\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"zhcoxovnekhe\"},{\"name\":\"usfnr\",\"displayName\":\"jxtxrdc\",\"ipv4Addresses\":[\"vidttgepuslvyjt\",\"vuwkasiziesfuugh\"],\"ipv6Addresses\":[\"fecjxeygtuhx\",\"ic\",\"uewmrswnjlxuzrhw\",\"usxjbaqehg\"],\"macAddress\":\"ohzjqatucoigeb\",\"virtualNetworkId\":\"cnwfepbnwgfmxjg\",\"networkName\":\"bjb\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"snaquf\"},{\"name\":\"bctqhamzjrwd\",\"displayName\":\"zeqyjleziun\",\"ipv4Addresses\":[\"fza\",\"tkw\",\"eg\"],\"ipv6Addresses\":[\"lbnseqac\",\"jvpilguooqja\"],\"macAddress\":\"d\",\"virtualNetworkId\":\"gueiookjbsahrtdt\",\"networkName\":\"elqacslmot\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Dynamic\",\"nicId\":\"vcjkgd\"}],\"disks\":[{\"name\":\"f\",\"displayName\":\"ejwabmdujtmvco\",\"diskId\":\"xcmjurbu\",\"diskSizeGB\":662695114,\"maxDiskSizeGB\":2003888088,\"bus\":997520556,\"lun\":1508910298,\"busType\":\"rogtuwkf\",\"vhdType\":\"jk\",\"volumeType\":\"ysidfvclgl\",\"vhdFormatType\":\"fuijtkbus\",\"templateDiskId\":\"gsfikayiansha\",\"storageQoSPolicy\":{\"name\":\"t\",\"id\":\"qxfzyjqttvwk\"},\"createDiffDisk\":\"false\"},{\"name\":\"penuy\",\"displayName\":\"qeqqekewvnqvcdl\",\"diskId\":\"a\",\"diskSizeGB\":1607576677,\"maxDiskSizeGB\":1323683698,\"bus\":1722049750,\"lun\":1773834271,\"busType\":\"xpunjqi\",\"vhdType\":\"zvvitacgxmfcs\",\"volumeType\":\"rxhtvso\",\"vhdFormatType\":\"lwntsjgqrs\",\"templateDiskId\":\"p\",\"storageQoSPolicy\":{\"name\":\"u\",\"id\":\"nchrszizoyu\"},\"createDiffDisk\":\"true\"},{\"name\":\"tn\",\"displayName\":\"bf\",\"diskId\":\"ggagfln\",\"diskSizeGB\":1468230412,\"maxDiskSizeGB\":1408591251,\"bus\":505064528,\"lun\":1643103479,\"busType\":\"mu\",\"vhdType\":\"tb\",\"volumeType\":\"plrohkpigq\",\"vhdFormatType\":\"suckzm\",\"templateDiskId\":\"klsnoxaxmqeqa\",\"storageQoSPolicy\":{\"name\":\"jnhgwydyyn\",\"id\":\"vkh\"},\"createDiffDisk\":\"false\"},{\"name\":\"ta\",\"displayName\":\"rfdl\",\"diskId\":\"kh\",\"diskSizeGB\":685959660,\"maxDiskSizeGB\":1532018074,\"bus\":2014408725,\"lun\":1539061935,\"busType\":\"eogkhnmgbro\",\"vhdType\":\"ddbhf\",\"volumeType\":\"fpazjzoywjxhpd\",\"vhdFormatType\":\"ontacnpq\",\"templateDiskId\":\"ehtuevrhr\",\"storageQoSPolicy\":{\"name\":\"oogwxhnsduugwb\",\"id\":\"e\"},\"createDiffDisk\":\"false\"}],\"provisioningState\":\"Updating\"},\"extendedLocation\":{\"type\":\"uarenlv\",\"name\":\"tklnvnafvvkyfed\"},\"location\":\"jboslcqxypok\",\"tags\":{\"unin\":\"inqcymczngnbdxxe\",\"ec\":\"udbchaqdtv\"},\"id\":\"qct\",\"name\":\"xxdtddmflh\",\"type\":\"ytxzvtznapxbanno\"}"; + = "{\"properties\":{\"inventoryItemId\":\"rtffyaqitmh\",\"uuid\":\"ioqaqhvs\",\"vmmServerId\":\"fuqyrxpdlcgqlsi\",\"osType\":\"Other\",\"osName\":\"frddgamquhiosrsj\",\"computerName\":\"vfcdisyirn\",\"memoryMB\":705331327,\"cpuCount\":656360152,\"limitCpuForMigration\":\"false\",\"dynamicMemoryEnabled\":\"false\",\"isCustomizable\":\"true\",\"dynamicMemoryMaxMB\":1005534572,\"dynamicMemoryMinMB\":1549286319,\"isHighlyAvailable\":\"false\",\"generation\":1385041485,\"networkInterfaces\":[{\"name\":\"vk\",\"displayName\":\"nlnzonzlrpi\",\"ipv4Addresses\":[\"ncvjts\",\"cof\",\"zehtdhgb\",\"k\"],\"ipv6Addresses\":[\"ljeamu\",\"vzmlovuanashcxl\",\"mjerbdk\",\"lvidizozs\"],\"macAddress\":\"ccxjm\",\"virtualNetworkId\":\"fdgnwncypuuwwlt\",\"networkName\":\"qjctzenkeif\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"vflyhbxcu\"},{\"name\":\"hxgsrboldfor\",\"displayName\":\"wjlvizbfhfov\",\"ipv4Addresses\":[\"qpbtuodxes\",\"abbelawumuaslzk\"],\"ipv6Addresses\":[\"woycqucwyha\",\"nomdrkywuhpsv\",\"uurutlwexxwlalni\"],\"macAddress\":\"zsrzpgepq\",\"virtualNetworkId\":\"bb\",\"networkName\":\"pgdakchzyvli\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"jibnxmysu\"},{\"name\":\"wq\",\"displayName\":\"tvlwijpsttexoq\",\"ipv4Addresses\":[\"cyyufmh\",\"uncuw\",\"qspkcdqzhlctd\",\"unqndyfpchrqb\"],\"ipv6Addresses\":[\"rcgegydcwboxjum\"],\"macAddress\":\"qoli\",\"virtualNetworkId\":\"raiouaubrjtl\",\"networkName\":\"xfuojrn\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"sccbiuimzd\"}],\"disks\":[{\"name\":\"fqwmkyoquf\",\"displayName\":\"ruzslzoj\",\"diskId\":\"ctfnmdxotng\",\"diskSizeGB\":1293168350,\"maxDiskSizeGB\":1282016388,\"bus\":1783330313,\"lun\":17698563,\"busType\":\"grkyuizabsnmfpph\",\"vhdType\":\"eevy\",\"volumeType\":\"hsgz\",\"vhdFormatType\":\"zbgomfgbeg\",\"templateDiskId\":\"gleohi\",\"storageQoSPolicy\":{\"name\":\"nlu\",\"id\":\"krrfx\"},\"createDiffDisk\":\"false\"},{\"name\":\"tijv\",\"displayName\":\"vbmqzbqq\",\"diskId\":\"aj\",\"diskSizeGB\":99469711,\"maxDiskSizeGB\":799727678,\"bus\":960314765,\"lun\":1206650787,\"busType\":\"jkuyxoafgaoq\",\"vhdType\":\"faey\",\"volumeType\":\"nm\",\"vhdFormatType\":\"vxirpghriypo\",\"templateDiskId\":\"yhlqhykprlpyznu\",\"storageQoSPolicy\":{\"name\":\"dsmexiitdfux\",\"id\":\"asiibmiybnnust\"},\"createDiffDisk\":\"false\"},{\"name\":\"hnmgixhcm\",\"displayName\":\"mqfoudorh\",\"diskId\":\"yyprotwyp\",\"diskSizeGB\":147246399,\"maxDiskSizeGB\":2095396733,\"bus\":384308231,\"lun\":2095603265,\"busType\":\"mjkavlgorbmft\",\"vhdType\":\"dtzfjltfvnzcy\",\"volumeType\":\"otp\",\"vhdFormatType\":\"pvpbdbzqgqqiheds\",\"templateDiskId\":\"wthmkyib\",\"storageQoSPolicy\":{\"name\":\"ihsgq\",\"id\":\"dhohsdtmcdzsuf\"},\"createDiffDisk\":\"true\"},{\"name\":\"xbzlmc\",\"displayName\":\"apcvhdbe\",\"diskId\":\"qqxeyskon\",\"diskSizeGB\":76576423,\"maxDiskSizeGB\":2010398263,\"bus\":759360118,\"lun\":275540334,\"busType\":\"z\",\"vhdType\":\"wxeqocljmygvkzqk\",\"volumeType\":\"eokbze\",\"vhdFormatType\":\"zrxcczurt\",\"templateDiskId\":\"ipqxbkwvzgnzv\",\"storageQoSPolicy\":{\"name\":\"zdix\",\"id\":\"q\"},\"createDiffDisk\":\"false\"}],\"provisioningState\":\"Canceled\"},\"extendedLocation\":{\"type\":\"opqhewjptmc\",\"name\":\"bostzel\"},\"location\":\"la\",\"tags\":{\"pn\":\"mzlbiojlvfhrb\",\"yurmochpprprs\":\"qvcww\",\"ayzejnhlbkpbz\":\"mo\"},\"id\":\"cpilj\",\"name\":\"a\",\"type\":\"zv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); VirtualMachineTemplate response = manager.virtualMachineTemplates() - .getByResourceGroupWithResponse("xoe", "qinjipnwjf", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("bu", "qwyxebeybpm", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jboslcqxypok", response.location()); - Assertions.assertEquals("inqcymczngnbdxxe", response.tags().get("unin")); - Assertions.assertEquals("lafcbahh", response.properties().inventoryItemId()); - Assertions.assertEquals("pofoi", response.properties().uuid()); - Assertions.assertEquals("w", response.properties().vmmServerId()); - Assertions.assertEquals("uarenlv", response.extendedLocation().type()); - Assertions.assertEquals("tklnvnafvvkyfed", response.extendedLocation().name()); + Assertions.assertEquals("la", response.location()); + Assertions.assertEquals("mzlbiojlvfhrb", response.tags().get("pn")); + Assertions.assertEquals("rtffyaqitmh", response.properties().inventoryItemId()); + Assertions.assertEquals("ioqaqhvs", response.properties().uuid()); + Assertions.assertEquals("fuqyrxpdlcgqlsi", response.properties().vmmServerId()); + Assertions.assertEquals("opqhewjptmc", response.extendedLocation().type()); + Assertions.assertEquals("bostzel", response.extendedLocation().name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesListByResourceGroupMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesListByResourceGroupMockTests.java index f0d58ea1b5e8..52a035e02376 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesListByResourceGroupMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -10,7 +10,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.VirtualMachineTemplate; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,24 +22,24 @@ public final class VirtualMachineTemplatesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"inventoryItemId\":\"ywwpgjxsnptfuj\",\"uuid\":\"cg\",\"vmmServerId\":\"o\",\"osType\":\"Other\",\"osName\":\"aqutdewemxswvruu\",\"computerName\":\"zjgehkfkim\",\"memoryMB\":355142126,\"cpuCount\":2101404470,\"limitCpuForMigration\":\"true\",\"dynamicMemoryEnabled\":\"true\",\"isCustomizable\":\"false\",\"dynamicMemoryMaxMB\":1426347910,\"dynamicMemoryMinMB\":758637615,\"isHighlyAvailable\":\"false\",\"generation\":800032229,\"networkInterfaces\":[{\"name\":\"monstshiyxgve\",\"displayName\":\"clduc\",\"ipv4Addresses\":[\"rds\",\"uwc\",\"b\"],\"ipv6Addresses\":[\"stmninwjizcilng\",\"gshejjtbxqmulux\",\"xqzv\",\"ers\"],\"macAddress\":\"cucrwnamikze\",\"virtualNetworkId\":\"qbsms\",\"networkName\":\"iqg\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Dynamic\",\"nicId\":\"swhvhczznvfbycj\"},{\"name\":\"jww\",\"displayName\":\"z\",\"ipv4Addresses\":[\"wmxqhndvnoamlds\",\"haohdjhhflzokxc\",\"xpelnjetagltsx\",\"atftgzpnpbsw\"],\"ipv6Addresses\":[\"loccsrmozihm\",\"pgawtxxpkyjcxcjx\",\"rytfmpcycil\"],\"macAddress\":\"caykggnoxuz\",\"virtualNetworkId\":\"ksxwpnd\",\"networkName\":\"pfnznthjtwkj\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"oamktcq\"},{\"name\":\"smgbzahgxqdl\",\"displayName\":\"tlt\",\"ipv4Addresses\":[\"rltzkatbhjmz\",\"nbsoqeqalarv\",\"agunbtgfebw\",\"nbmhyree\"],\"ipv6Addresses\":[\"qavbpdqmj\",\"lyyzglgouwtlmjj\",\"uojqt\"],\"macAddress\":\"axkjeytunlbfjk\",\"virtualNetworkId\":\"u\",\"networkName\":\"kqbh\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Dynamic\",\"nicId\":\"hdenxaulk\"},{\"name\":\"kdk\",\"displayName\":\"mjnnawtq\",\"ipv4Addresses\":[\"xuckpggqoweyir\",\"hlisngw\",\"lqqmpiz\"],\"ipv6Addresses\":[\"n\"],\"macAddress\":\"xpxiwfcngjs\",\"virtualNetworkId\":\"sii\",\"networkName\":\"mkzjvkviir\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Dynamic\",\"nicId\":\"pgratzvzbglbyvi\"}],\"disks\":[{\"name\":\"brxkjzwr\",\"displayName\":\"ffm\",\"diskId\":\"kwfbkgo\",\"diskSizeGB\":277381231,\"maxDiskSizeGB\":1082965161,\"bus\":1662564263,\"lun\":1179999545,\"busType\":\"izqaclnapxbiyg\",\"vhdType\":\"gjkn\",\"volumeType\":\"mfcttux\",\"vhdFormatType\":\"yilflqoiquvrehmr\",\"templateDiskId\":\"hvsujztc\",\"storageQoSPolicy\":{\"name\":\"qjtwhauu\",\"id\":\"prnjletlxsmr\"},\"createDiffDisk\":\"true\"},{\"name\":\"uifamowaziynknlq\",\"displayName\":\"dvpiwh\",\"diskId\":\"szdtmaajquh\",\"diskSizeGB\":578758071,\"maxDiskSizeGB\":1621545899,\"bus\":1529964299,\"lun\":521294772,\"busType\":\"g\",\"vhdType\":\"mzyospspshck\",\"volumeType\":\"yjpmspbpssdfppyo\",\"vhdFormatType\":\"ieyujtvc\",\"templateDiskId\":\"cnyxrxmunjd\",\"storageQoSPolicy\":{\"name\":\"lnkvxlx\",\"id\":\"glqivbgkcv\"},\"createDiffDisk\":\"false\"},{\"name\":\"vuqd\",\"displayName\":\"voniypfp\",\"diskId\":\"cpzgpxtiv\",\"diskSizeGB\":1447599159,\"maxDiskSizeGB\":666978054,\"bus\":711664414,\"lun\":1731512826,\"busType\":\"jxgpnrhgovfg\",\"vhdType\":\"kqmhhaowjr\",\"volumeType\":\"vuporqzdfuydzv\",\"vhdFormatType\":\"vxcnqmxqps\",\"templateDiskId\":\"kmvkhl\",\"storageQoSPolicy\":{\"name\":\"hbemzq\",\"id\":\"sz\"},\"createDiffDisk\":\"false\"},{\"name\":\"tglxx\",\"displayName\":\"jfpgpicrmn\",\"diskId\":\"rgmqgjs\",\"diskSizeGB\":1587486803,\"maxDiskSizeGB\":1307017173,\"bus\":704061882,\"lun\":1162167874,\"busType\":\"odth\",\"vhdType\":\"qgvriibakcla\",\"volumeType\":\"fr\",\"vhdFormatType\":\"ousxauzlwvsgmw\",\"templateDiskId\":\"qf\",\"storageQoSPolicy\":{\"name\":\"vux\",\"id\":\"kjsvthnwpzteko\"},\"createDiffDisk\":\"true\"}],\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"attgplu\",\"name\":\"otangcfhnykzc\"},\"location\":\"swvxwlmzqwmv\",\"tags\":{\"cvclxynpdk\":\"jmxmcuqud\",\"neiknpg\":\"gfabuiyjibuzphdu\",\"btozipqwje\":\"xgjiuqh\",\"xxgewpk\":\"mur\"},\"id\":\"vqylkmqpzoyhl\",\"name\":\"bcg\",\"type\":\"gcl\"}]}"; + = "{\"value\":[{\"properties\":{\"inventoryItemId\":\"ewjwiuubw\",\"uuid\":\"qsfapaqt\",\"vmmServerId\":\"rrqwexjk\",\"osType\":\"Linux\",\"osName\":\"pjwogqqno\",\"computerName\":\"udcdabtqwpwyawb\",\"memoryMB\":1294437509,\"cpuCount\":1474502129,\"limitCpuForMigration\":\"true\",\"dynamicMemoryEnabled\":\"true\",\"isCustomizable\":\"false\",\"dynamicMemoryMaxMB\":2025422564,\"dynamicMemoryMinMB\":733290659,\"isHighlyAvailable\":\"true\",\"generation\":241996681,\"networkInterfaces\":[{\"name\":\"ids\",\"displayName\":\"ultxijjumfq\",\"ipv4Addresses\":[\"lnqnmcjn\"],\"ipv6Addresses\":[\"dqxtbjwgnyf\"],\"macAddress\":\"fzsvtuikzh\",\"virtualNetworkId\":\"qglcfhmlrqryxynq\",\"networkName\":\"rd\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"ptgoeiybbabp\"}],\"disks\":[{\"name\":\"slkvntjl\",\"displayName\":\"gjkskyrioov\",\"diskId\":\"dsxwaab\",\"diskSizeGB\":1611878916,\"maxDiskSizeGB\":825090539,\"bus\":1464958585,\"lun\":1028508079,\"busType\":\"maxriz\",\"vhdType\":\"obgop\",\"volumeType\":\"hsln\",\"vhdFormatType\":\"xieixynllxec\",\"templateDiskId\":\"rojphslhcawjutif\",\"storageQoSPolicy\":{\"name\":\"mvi\",\"id\":\"rqjb\"},\"createDiffDisk\":\"false\"}],\"provisioningState\":\"Canceled\"},\"extendedLocation\":{\"type\":\"glka\",\"name\":\"onqjujeickpzvcpo\"},\"location\":\"xelnwc\",\"tags\":{\"kqscazuawxtzx\":\"jedexxmlf\",\"s\":\"uamwabzxrvxc\"},\"id\":\"sphaivmxyasflvg\",\"name\":\"gzwywak\",\"type\":\"ihknsmjbl\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.virtualMachineTemplates().listByResourceGroup("bffmbmxz", com.azure.core.util.Context.NONE); + = manager.virtualMachineTemplates().listByResourceGroup("chndbnwie", com.azure.core.util.Context.NONE); - Assertions.assertEquals("swvxwlmzqwmv", response.iterator().next().location()); - Assertions.assertEquals("jmxmcuqud", response.iterator().next().tags().get("cvclxynpdk")); - Assertions.assertEquals("ywwpgjxsnptfuj", response.iterator().next().properties().inventoryItemId()); - Assertions.assertEquals("cg", response.iterator().next().properties().uuid()); - Assertions.assertEquals("o", response.iterator().next().properties().vmmServerId()); - Assertions.assertEquals("attgplu", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("otangcfhnykzc", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals("xelnwc", response.iterator().next().location()); + Assertions.assertEquals("jedexxmlf", response.iterator().next().tags().get("kqscazuawxtzx")); + Assertions.assertEquals("ewjwiuubw", response.iterator().next().properties().inventoryItemId()); + Assertions.assertEquals("qsfapaqt", response.iterator().next().properties().uuid()); + Assertions.assertEquals("rrqwexjk", response.iterator().next().properties().vmmServerId()); + Assertions.assertEquals("glka", response.iterator().next().extendedLocation().type()); + Assertions.assertEquals("onqjujeickpzvcpo", response.iterator().next().extendedLocation().name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesListMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesListMockTests.java index f24b872b74fa..230ac1b00b2f 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesListMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualMachineTemplatesListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -10,7 +10,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.VirtualMachineTemplate; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,11 +22,11 @@ public final class VirtualMachineTemplatesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"inventoryItemId\":\"wbzasqbuclj\",\"uuid\":\"yexaoguy\",\"vmmServerId\":\"p\",\"osType\":\"Other\",\"osName\":\"ault\",\"computerName\":\"jjum\",\"memoryMB\":605011869,\"cpuCount\":129557013,\"limitCpuForMigration\":\"true\",\"dynamicMemoryEnabled\":\"true\",\"isCustomizable\":\"false\",\"dynamicMemoryMaxMB\":714307587,\"dynamicMemoryMinMB\":1485575169,\"isHighlyAvailable\":\"false\",\"generation\":1855012181,\"networkInterfaces\":[{\"name\":\"wgnyfusfzsvtui\",\"displayName\":\"hajqglcfh\",\"ipv4Addresses\":[\"qryxyn\",\"nzrdpsovwxz\",\"ptgoeiybbabp\"],\"ipv6Addresses\":[\"f\"],\"macAddress\":\"kvntjlrigjkskyri\",\"virtualNetworkId\":\"vzidsxwaab\",\"networkName\":\"ifrygzn\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"zob\"},{\"name\":\"pxl\",\"displayName\":\"lnelxieixynl\",\"ipv4Addresses\":[\"cwcrojphs\",\"hcawjutifdwfmv\",\"gorqjbttzh\",\"aglkafhon\"],\"ipv6Addresses\":[\"jeick\",\"zvcpopm\"],\"macAddress\":\"lnwcltyjed\",\"virtualNetworkId\":\"xm\",\"networkName\":\"mkqscaz\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"uamwabzxrvxc\"},{\"name\":\"hsphaivmxyas\",\"displayName\":\"vgsgzwywakoihkn\",\"ipv4Addresses\":[\"blmljh\",\"nymzotqyr\",\"uzcbmqq\"],\"ipv6Addresses\":[\"vwf\"],\"macAddress\":\"ayxonsupeujl\",\"virtualNetworkId\":\"nh\",\"networkName\":\"sqltnzo\",\"ipv4AddressType\":\"Static\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Dynamic\",\"nicId\":\"fyq\"}],\"disks\":[{\"name\":\"qoxwd\",\"displayName\":\"dbxiqx\",\"diskId\":\"iqbi\",\"diskSizeGB\":1213641430,\"maxDiskSizeGB\":2002140945,\"bus\":1099420861,\"lun\":152537554,\"busType\":\"hfqpofv\",\"vhdType\":\"cblembnkbwv\",\"volumeType\":\"xk\",\"vhdFormatType\":\"vqihebwtswbzuwf\",\"templateDiskId\":\"urageg\",\"storageQoSPolicy\":{\"name\":\"cjfelisdjubgg\",\"id\":\"igkxkbsazga\"},\"createDiffDisk\":\"true\"},{\"name\":\"yrcmjdmspofap\",\"displayName\":\"hryl\",\"diskId\":\"ofrzgb\",\"diskSizeGB\":726767515,\"maxDiskSizeGB\":981780547,\"bus\":1946171356,\"lun\":2142933776,\"busType\":\"l\",\"vhdType\":\"bcuiiz\",\"volumeType\":\"twfans\",\"vhdFormatType\":\"pdibmikostbzbki\",\"templateDiskId\":\"uqn\",\"storageQoSPolicy\":{\"name\":\"hzfylsgcrpfbc\",\"id\":\"ezzcez\"},\"createDiffDisk\":\"false\"}],\"provisioningState\":\"Updating\"},\"extendedLocation\":{\"type\":\"wl\",\"name\":\"jwetnpsihcla\"},\"location\":\"va\",\"tags\":{\"tcmwqkchc\":\"trsqqw\"},\"id\":\"waxfewzjkj\",\"name\":\"xfdeqvhpsyl\",\"type\":\"ksh\"}]}"; + = "{\"value\":[{\"properties\":{\"inventoryItemId\":\"hlnymzotq\",\"uuid\":\"yuzcbmqqvxmvw\",\"vmmServerId\":\"tayx\",\"osType\":\"Linux\",\"osName\":\"peujlzqn\",\"computerName\":\"vsqltnzoibgsxg\",\"memoryMB\":554896310,\"cpuCount\":1015964273,\"limitCpuForMigration\":\"false\",\"dynamicMemoryEnabled\":\"true\",\"isCustomizable\":\"true\",\"dynamicMemoryMaxMB\":331382347,\"dynamicMemoryMinMB\":198228895,\"isHighlyAvailable\":\"true\",\"generation\":887033867,\"networkInterfaces\":[{\"name\":\"eiiqbim\",\"displayName\":\"mwwinhehfqpofv\",\"ipv4Addresses\":[\"blembnkbwvqvxkd\",\"vqihebwtswbzuwf\",\"duragegizvc\"],\"ipv6Addresses\":[\"lisdjubggbq\",\"gkxkbsazgakg\"],\"macAddress\":\"yrcmjdmspofap\",\"virtualNetworkId\":\"hryl\",\"networkName\":\"ofrzgb\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"vnlvxbcuiiznktwf\"},{\"name\":\"snvpdibmi\",\"displayName\":\"stbz\",\"ipv4Addresses\":[\"wbuqn\",\"ophzfylsgcrp\"],\"ipv6Addresses\":[\"une\",\"zcezelfwyfwl\",\"xjwet\",\"psihcla\"],\"macAddress\":\"va\",\"virtualNetworkId\":\"pt\",\"networkName\":\"qqwzt\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"xwaxfewzjkj\"},{\"name\":\"fdeqvhpsyl\",\"displayName\":\"shk\",\"ipv4Addresses\":[\"mbmxzjrgywwpgj\"],\"ipv6Addresses\":[\"ptfujgicgaaoept\",\"aqutdewemxswvruu\"],\"macAddress\":\"zjgehkfkim\",\"virtualNetworkId\":\"ixokffqyin\",\"networkName\":\"qepqwhixmon\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Dynamic\",\"macAddressType\":\"Static\",\"nicId\":\"velfcldu\"},{\"name\":\"birdsvuwcobiegs\",\"displayName\":\"ninwjizc\",\"ipv4Addresses\":[\"ghgshejjtbxqmu\",\"uxlxqzvners\"],\"ipv6Addresses\":[\"ucrwnami\",\"ze\",\"rqbsmswziq\"],\"macAddress\":\"uhok\",\"virtualNetworkId\":\"uswhvhczznvfbycj\",\"networkName\":\"jww\",\"ipv4AddressType\":\"Dynamic\",\"ipv6AddressType\":\"Static\",\"macAddressType\":\"Static\",\"nicId\":\"xqhndvnoamlds\"}],\"disks\":[{\"name\":\"hdjhhflz\",\"displayName\":\"xcoxpelnjet\",\"diskId\":\"ltsxoatf\",\"diskSizeGB\":2037643049,\"maxDiskSizeGB\":1034709707,\"bus\":498260807,\"lun\":1219927241,\"busType\":\"e\",\"vhdType\":\"occsr\",\"volumeType\":\"zihmipgawtxxpky\",\"vhdFormatType\":\"xcjxgrytfmpcy\",\"templateDiskId\":\"lrmcaykg\",\"storageQoSPolicy\":{\"name\":\"xu\",\"id\":\"rksxwpndfc\"},\"createDiffDisk\":\"true\"},{\"name\":\"nthjtwkjaosrxuzv\",\"displayName\":\"mktcqiosmgbza\",\"diskId\":\"xqdlyrtltlapr\",\"diskSizeGB\":1339106898,\"maxDiskSizeGB\":179999920,\"bus\":2087309055,\"lun\":498585791,\"busType\":\"znnbsoqeqalarvl\",\"vhdType\":\"un\",\"volumeType\":\"gfebwlnb\",\"vhdFormatType\":\"yreeudz\",\"templateDiskId\":\"vbpdqmjxlyyzglgo\",\"storageQoSPolicy\":{\"name\":\"lmjjyuo\",\"id\":\"tob\"},\"createDiffDisk\":\"true\"}],\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"type\":\"tu\",\"name\":\"bfjkw\"},\"location\":\"snkq\",\"tags\":{\"qunjqh\":\"y\"},\"id\":\"enx\",\"name\":\"ulkpakd\",\"type\":\"ifmjnn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); @@ -34,12 +34,12 @@ public void testList() throws Exception { PagedIterable response = manager.virtualMachineTemplates().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("va", response.iterator().next().location()); - Assertions.assertEquals("trsqqw", response.iterator().next().tags().get("tcmwqkchc")); - Assertions.assertEquals("wbzasqbuclj", response.iterator().next().properties().inventoryItemId()); - Assertions.assertEquals("yexaoguy", response.iterator().next().properties().uuid()); - Assertions.assertEquals("p", response.iterator().next().properties().vmmServerId()); - Assertions.assertEquals("wl", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("jwetnpsihcla", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals("snkq", response.iterator().next().location()); + Assertions.assertEquals("y", response.iterator().next().tags().get("qunjqh")); + Assertions.assertEquals("hlnymzotq", response.iterator().next().properties().inventoryItemId()); + Assertions.assertEquals("yuzcbmqqvxmvw", response.iterator().next().properties().uuid()); + Assertions.assertEquals("tayx", response.iterator().next().properties().vmmServerId()); + Assertions.assertEquals("tu", response.iterator().next().extendedLocation().type()); + Assertions.assertEquals("bfjkw", response.iterator().next().extendedLocation().name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkInnerTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkInnerTests.java index 52346dd2230b..d84449958dfd 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkInnerTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -16,33 +16,33 @@ public final class VirtualNetworkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualNetworkInner model = BinaryData.fromString( - "{\"properties\":{\"inventoryItemId\":\"vwpklvxwmygdxp\",\"uuid\":\"qchiszep\",\"vmmServerId\":\"bjcrxgibbdaxco\",\"networkName\":\"ozauorsukokwb\",\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"type\":\"lvnuuepzlrph\",\"name\":\"soldweyuqdunv\"},\"location\":\"nrwrbiork\",\"tags\":{\"sivfomilo\":\"ywjhhgdnhx\",\"ao\":\"ggdufiqndieu\"},\"id\":\"jchvcyy\",\"name\":\"s\",\"type\":\"gdotcubiipuipwo\"}") + "{\"properties\":{\"inventoryItemId\":\"vddntwn\",\"uuid\":\"icbtwnpzao\",\"vmmServerId\":\"uhrhcffcyddgl\",\"networkName\":\"t\",\"provisioningState\":\"Deleting\"},\"extendedLocation\":{\"type\":\"wpyeicxmqciwqvh\",\"name\":\"ixuigdtopbobj\"},\"location\":\"hm\",\"tags\":{\"a\":\"a\"},\"id\":\"hrzayvvtpgvdf\",\"name\":\"iotkftutqxl\",\"type\":\"gxlefgugnxkrxd\"}") .toObject(VirtualNetworkInner.class); - Assertions.assertEquals("nrwrbiork", model.location()); - Assertions.assertEquals("ywjhhgdnhx", model.tags().get("sivfomilo")); - Assertions.assertEquals("vwpklvxwmygdxp", model.properties().inventoryItemId()); - Assertions.assertEquals("qchiszep", model.properties().uuid()); - Assertions.assertEquals("bjcrxgibbdaxco", model.properties().vmmServerId()); - Assertions.assertEquals("lvnuuepzlrph", model.extendedLocation().type()); - Assertions.assertEquals("soldweyuqdunv", model.extendedLocation().name()); + Assertions.assertEquals("hm", model.location()); + Assertions.assertEquals("a", model.tags().get("a")); + Assertions.assertEquals("vddntwn", model.properties().inventoryItemId()); + Assertions.assertEquals("icbtwnpzao", model.properties().uuid()); + Assertions.assertEquals("uhrhcffcyddgl", model.properties().vmmServerId()); + Assertions.assertEquals("wpyeicxmqciwqvh", model.extendedLocation().type()); + Assertions.assertEquals("ixuigdtopbobj", model.extendedLocation().name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualNetworkInner model = new VirtualNetworkInner().withLocation("nrwrbiork") - .withTags(mapOf("sivfomilo", "ywjhhgdnhx", "ao", "ggdufiqndieu")) - .withProperties(new VirtualNetworkProperties().withInventoryItemId("vwpklvxwmygdxp") - .withUuid("qchiszep") - .withVmmServerId("bjcrxgibbdaxco")) - .withExtendedLocation(new ExtendedLocation().withType("lvnuuepzlrph").withName("soldweyuqdunv")); + VirtualNetworkInner model = new VirtualNetworkInner().withLocation("hm") + .withTags(mapOf("a", "a")) + .withProperties(new VirtualNetworkProperties().withInventoryItemId("vddntwn") + .withUuid("icbtwnpzao") + .withVmmServerId("uhrhcffcyddgl")) + .withExtendedLocation(new ExtendedLocation().withType("wpyeicxmqciwqvh").withName("ixuigdtopbobj")); model = BinaryData.fromObject(model).toObject(VirtualNetworkInner.class); - Assertions.assertEquals("nrwrbiork", model.location()); - Assertions.assertEquals("ywjhhgdnhx", model.tags().get("sivfomilo")); - Assertions.assertEquals("vwpklvxwmygdxp", model.properties().inventoryItemId()); - Assertions.assertEquals("qchiszep", model.properties().uuid()); - Assertions.assertEquals("bjcrxgibbdaxco", model.properties().vmmServerId()); - Assertions.assertEquals("lvnuuepzlrph", model.extendedLocation().type()); - Assertions.assertEquals("soldweyuqdunv", model.extendedLocation().name()); + Assertions.assertEquals("hm", model.location()); + Assertions.assertEquals("a", model.tags().get("a")); + Assertions.assertEquals("vddntwn", model.properties().inventoryItemId()); + Assertions.assertEquals("icbtwnpzao", model.properties().uuid()); + Assertions.assertEquals("uhrhcffcyddgl", model.properties().vmmServerId()); + Assertions.assertEquals("wpyeicxmqciwqvh", model.extendedLocation().type()); + Assertions.assertEquals("ixuigdtopbobj", model.extendedLocation().name()); } // Use "Map.of" if available diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkInventoryItemTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkInventoryItemTests.java index 063a8768f062..d76e0c1862ab 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkInventoryItemTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkInventoryItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -11,7 +11,7 @@ public final class VirtualNetworkInventoryItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualNetworkInventoryItem model = BinaryData.fromString( - "{\"inventoryType\":\"VirtualNetwork\",\"managedResourceId\":\"zhezwwvaiq\",\"uuid\":\"vv\",\"inventoryItemName\":\"nk\",\"provisioningState\":\"Provisioning\"}") + "{\"inventoryType\":\"VirtualNetwork\",\"managedResourceId\":\"fxzsjabibsyst\",\"uuid\":\"fsdjpvkvp\",\"inventoryItemName\":\"xbkzbzkdvncj\",\"provisioningState\":\"Deleting\"}") .toObject(VirtualNetworkInventoryItem.class); } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkListResultTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkListResultTests.java index c9b8be6394ca..3c76aef551d4 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkListResultTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkListResultTests.java @@ -1,25 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.scvmm.models.VirtualNetworkListResult; +import com.azure.resourcemanager.scvmm.implementation.models.VirtualNetworkListResult; import org.junit.jupiter.api.Assertions; public final class VirtualNetworkListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualNetworkListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"inventoryItemId\":\"ctymoxoftp\",\"uuid\":\"iwyczuh\",\"vmmServerId\":\"cpqjlihhyu\",\"networkName\":\"skasdvlmfwdgzxu\",\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"type\":\"pamrsr\",\"name\":\"zvxurisjnhny\"},\"location\":\"ifqjz\",\"tags\":{\"upauut\":\"rhublwpcesutrg\",\"qg\":\"woqhihe\",\"foimwkslircizjxv\":\"zpnfqntcypsxj\"},\"id\":\"dfcea\",\"name\":\"vlhv\",\"type\":\"gdyftumrtwna\"},{\"properties\":{\"inventoryItemId\":\"lbiw\",\"uuid\":\"jgcyztsfmznba\",\"vmmServerId\":\"ph\",\"networkName\":\"qnrnrpxehuwryk\",\"provisioningState\":\"Provisioning\"},\"extendedLocation\":{\"type\":\"fmviklby\",\"name\":\"khbejdznxc\"},\"location\":\"srhnjivo\",\"tags\":{\"jdftuljltd\":\"novqfzge\",\"zuo\":\"ceamtm\",\"ssxmojms\":\"ejwcwwqiok\",\"jpr\":\"p\"},\"id\":\"kwcf\",\"name\":\"ql\",\"type\":\"yxgtczh\"},{\"properties\":{\"inventoryItemId\":\"bsdshmkxmaehvbbx\",\"uuid\":\"iplt\",\"vmmServerId\":\"htba\",\"networkName\":\"gx\",\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"kpyklyhp\",\"name\":\"odpvruudlgzib\"},\"location\":\"ostgkts\",\"tags\":{\"odqkdlwwqfb\":\"xeclzedqbcvhzlhp\",\"lmbtxhwgfwsrt\":\"mlkxtrqjfs\",\"kh\":\"wcoezbrhub\",\"ookk\":\"dyg\"},\"id\":\"fqjbvleo\",\"name\":\"fmluiqtqzfavyvn\",\"type\":\"qybaryeua\"},{\"properties\":{\"inventoryItemId\":\"qabqgzslesjcb\",\"uuid\":\"rnntiewdjcv\",\"vmmServerId\":\"uwrbehwagoh\",\"networkName\":\"f\",\"provisioningState\":\"Updating\"},\"extendedLocation\":{\"type\":\"qem\",\"name\":\"hmxtdr\"},\"location\":\"utacoe\",\"tags\":{\"guaadraufactkahz\":\"ewzcjznmwcp\",\"jjziuxxpsh\":\"v\"},\"id\":\"eekulfgslqubkwd\",\"name\":\"enr\",\"type\":\"sutujba\"}],\"nextLink\":\"juohminyflnorw\"}") + "{\"value\":[{\"properties\":{\"inventoryItemId\":\"nbacfi\",\"uuid\":\"l\",\"vmmServerId\":\"x\",\"networkName\":\"qgtz\",\"provisioningState\":\"Deleting\"},\"extendedLocation\":{\"type\":\"qbqqwxr\",\"name\":\"eallnwsubisnj\"},\"location\":\"pmng\",\"tags\":{\"aqw\":\"c\",\"xnj\":\"ochcbonqvpkvl\"},\"id\":\"ase\",\"name\":\"pheoflokeyy\",\"type\":\"enjbdlwtgrhp\"},{\"properties\":{\"inventoryItemId\":\"jumasx\",\"uuid\":\"jpqyegu\",\"vmmServerId\":\"hb\",\"networkName\":\"hejjz\",\"provisioningState\":\"Deleting\"},\"extendedLocation\":{\"type\":\"dgwdslfhot\",\"name\":\"cynpwlbjnp\"},\"location\":\"cftadeh\",\"tags\":{\"wd\":\"tyfsoppusuesn\",\"hctbqvudwxdn\":\"jbavorxzdm\"},\"id\":\"nvowgujju\",\"name\":\"wdkcglhsl\",\"type\":\"zj\"}],\"nextLink\":\"ggd\"}") .toObject(VirtualNetworkListResult.class); - Assertions.assertEquals("ifqjz", model.value().get(0).location()); - Assertions.assertEquals("rhublwpcesutrg", model.value().get(0).tags().get("upauut")); - Assertions.assertEquals("ctymoxoftp", model.value().get(0).properties().inventoryItemId()); - Assertions.assertEquals("iwyczuh", model.value().get(0).properties().uuid()); - Assertions.assertEquals("cpqjlihhyu", model.value().get(0).properties().vmmServerId()); - Assertions.assertEquals("pamrsr", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("zvxurisjnhny", model.value().get(0).extendedLocation().name()); + Assertions.assertEquals("pmng", model.value().get(0).location()); + Assertions.assertEquals("c", model.value().get(0).tags().get("aqw")); + Assertions.assertEquals("nbacfi", model.value().get(0).properties().inventoryItemId()); + Assertions.assertEquals("l", model.value().get(0).properties().uuid()); + Assertions.assertEquals("x", model.value().get(0).properties().vmmServerId()); + Assertions.assertEquals("qbqqwxr", model.value().get(0).extendedLocation().type()); + Assertions.assertEquals("eallnwsubisnj", model.value().get(0).extendedLocation().name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkPropertiesTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkPropertiesTests.java index 334e18890fb5..4ba6ae683f9a 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkPropertiesTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -12,21 +12,21 @@ public final class VirtualNetworkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualNetworkProperties model = BinaryData.fromString( - "{\"inventoryItemId\":\"nmacj\",\"uuid\":\"nizshqvcim\",\"vmmServerId\":\"vfgmblrrilby\",\"networkName\":\"xsmiccwrwfscjf\",\"provisioningState\":\"Provisioning\"}") + "{\"inventoryItemId\":\"i\",\"uuid\":\"thz\",\"vmmServerId\":\"qdrabhjybigehoqf\",\"networkName\":\"wska\",\"provisioningState\":\"Updating\"}") .toObject(VirtualNetworkProperties.class); - Assertions.assertEquals("nmacj", model.inventoryItemId()); - Assertions.assertEquals("nizshqvcim", model.uuid()); - Assertions.assertEquals("vfgmblrrilby", model.vmmServerId()); + Assertions.assertEquals("i", model.inventoryItemId()); + Assertions.assertEquals("thz", model.uuid()); + Assertions.assertEquals("qdrabhjybigehoqf", model.vmmServerId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualNetworkProperties model = new VirtualNetworkProperties().withInventoryItemId("nmacj") - .withUuid("nizshqvcim") - .withVmmServerId("vfgmblrrilby"); + VirtualNetworkProperties model = new VirtualNetworkProperties().withInventoryItemId("i") + .withUuid("thz") + .withVmmServerId("qdrabhjybigehoqf"); model = BinaryData.fromObject(model).toObject(VirtualNetworkProperties.class); - Assertions.assertEquals("nmacj", model.inventoryItemId()); - Assertions.assertEquals("nizshqvcim", model.uuid()); - Assertions.assertEquals("vfgmblrrilby", model.vmmServerId()); + Assertions.assertEquals("i", model.inventoryItemId()); + Assertions.assertEquals("thz", model.uuid()); + Assertions.assertEquals("qdrabhjybigehoqf", model.vmmServerId()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkTagsUpdateTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkTagsUpdateTests.java index b588f5094a48..4c06d6410a11 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkTagsUpdateTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworkTagsUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -13,18 +13,18 @@ public final class VirtualNetworkTagsUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualNetworkTagsUpdate model - = BinaryData.fromString("{\"tags\":{\"vvjgslor\":\"hjxa\",\"yw\":\"il\",\"gkxnyedabg\":\"t\"}}") - .toObject(VirtualNetworkTagsUpdate.class); - Assertions.assertEquals("hjxa", model.tags().get("vvjgslor")); + VirtualNetworkTagsUpdate model = BinaryData.fromString( + "{\"tags\":{\"ynhz\":\"lcuiywgqywgndr\",\"pec\":\"pphrcgynco\",\"lzevgbmqjqab\":\"vmmcoofs\",\"mivkwlzuvcc\":\"y\"}}") + .toObject(VirtualNetworkTagsUpdate.class); + Assertions.assertEquals("lcuiywgqywgndr", model.tags().get("ynhz")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualNetworkTagsUpdate model - = new VirtualNetworkTagsUpdate().withTags(mapOf("vvjgslor", "hjxa", "yw", "il", "gkxnyedabg", "t")); + VirtualNetworkTagsUpdate model = new VirtualNetworkTagsUpdate().withTags( + mapOf("ynhz", "lcuiywgqywgndr", "pec", "pphrcgynco", "lzevgbmqjqab", "vmmcoofs", "mivkwlzuvcc", "y")); model = BinaryData.fromObject(model).toObject(VirtualNetworkTagsUpdate.class); - Assertions.assertEquals("hjxa", model.tags().get("vvjgslor")); + Assertions.assertEquals("lcuiywgqywgndr", model.tags().get("ynhz")); } // Use "Map.of" if available diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksCreateOrUpdateMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksCreateOrUpdateMockTests.java index a1be844a70a1..140266af3208 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksCreateOrUpdateMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,7 +9,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.ExtendedLocation; import com.azure.resourcemanager.scvmm.models.VirtualNetwork; import com.azure.resourcemanager.scvmm.models.VirtualNetworkProperties; @@ -25,33 +25,32 @@ public final class VirtualNetworksCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"inventoryItemId\":\"vbxngr\",\"uuid\":\"wggahttzlswvaj\",\"vmmServerId\":\"utlxjoqzasunwqrj\",\"networkName\":\"rg\",\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"hcmbuocnjrohmbp\",\"name\":\"yx\"},\"location\":\"eblydyv\",\"tags\":{\"ocxnehvsmtodl\":\"m\",\"unssxlghieegjl\":\"pyapucygvoav\"},\"id\":\"vvpa\",\"name\":\"eksgbuxantuygd\",\"type\":\"gaqi\"}"; + = "{\"properties\":{\"inventoryItemId\":\"zhajoylhjlmuo\",\"uuid\":\"primr\",\"vmmServerId\":\"pteecjme\",\"networkName\":\"ls\",\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"ylw\",\"name\":\"zaum\"},\"location\":\"oohgu\",\"tags\":{\"olbaemwmdx\":\"zboyjathwt\",\"f\":\"ebwjscjpahlxvea\",\"qcttadijaeukmrsi\":\"xnmwmqtibxyijddt\"},\"id\":\"ekpndzaapmudq\",\"name\":\"eqw\",\"type\":\"gp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); VirtualNetwork response = manager.virtualNetworks() - .define("krtt") - .withRegion("pcohhoucqpqojx") - .withExistingResourceGroup("xcptsoqfyiaseqc") - .withExtendedLocation(new ExtendedLocation().withType("gnzxojpslsvj").withName("liufiqwoyxq")) - .withTags(mapOf("tzqdd", "rzdcgdzbenribcaw", "mzwcjjncqt", "jwfljhznamtua")) - .withProperties(new VirtualNetworkProperties().withInventoryItemId("zisgykiuemvanb") - .withUuid("ohmn") - .withVmmServerId("xbsojkli")) + .define("bwnhhtql") + .withRegion("h") + .withExistingResourceGroup("wxezwzhok") + .withExtendedLocation(new ExtendedLocation().withType("sr").withName("mks")) + .withTags(mapOf("rhptilluc", "txfkfweg", "cwsldri", "iqtgdqoh")) + .withProperties( + new VirtualNetworkProperties().withInventoryItemId("gppipifh").withUuid("e").withVmmServerId("jvgcxtx")) .create(); - Assertions.assertEquals("eblydyv", response.location()); - Assertions.assertEquals("m", response.tags().get("ocxnehvsmtodl")); - Assertions.assertEquals("vbxngr", response.properties().inventoryItemId()); - Assertions.assertEquals("wggahttzlswvaj", response.properties().uuid()); - Assertions.assertEquals("utlxjoqzasunwqrj", response.properties().vmmServerId()); - Assertions.assertEquals("hcmbuocnjrohmbp", response.extendedLocation().type()); - Assertions.assertEquals("yx", response.extendedLocation().name()); + Assertions.assertEquals("oohgu", response.location()); + Assertions.assertEquals("zboyjathwt", response.tags().get("olbaemwmdx")); + Assertions.assertEquals("zhajoylhjlmuo", response.properties().inventoryItemId()); + Assertions.assertEquals("primr", response.properties().uuid()); + Assertions.assertEquals("pteecjme", response.properties().vmmServerId()); + Assertions.assertEquals("ylw", response.extendedLocation().type()); + Assertions.assertEquals("zaum", response.extendedLocation().name()); } // Use "Map.of" if available diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksGetByResourceGroupWithResponseMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksGetByResourceGroupWithResponseMockTests.java index c9ece26bbdba..71411d3c2278 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksGetByResourceGroupWithResponseMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -9,7 +9,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.VirtualNetwork; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,25 +21,25 @@ public final class VirtualNetworksGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"inventoryItemId\":\"qagwwrxaomz\",\"uuid\":\"glrrczez\",\"vmmServerId\":\"hltnjadhqoawjq\",\"networkName\":\"ueayfbpcmsplb\",\"provisioningState\":\"Provisioning\"},\"extendedLocation\":{\"type\":\"eqthwmg\",\"name\":\"b\"},\"location\":\"bbxi\",\"tags\":{\"wdpyq\":\"xiidloped\",\"cbq\":\"ybxubmdna\",\"laqacigele\":\"remj\"},\"id\":\"hdbvqvwzkjop\",\"name\":\"beonrlkwzdq\",\"type\":\"bxcea\"}"; + = "{\"properties\":{\"inventoryItemId\":\"zybbj\",\"uuid\":\"dj\",\"vmmServerId\":\"yxkyxvx\",\"networkName\":\"blbjedn\",\"provisioningState\":\"Deleting\"},\"extendedLocation\":{\"type\":\"geuaulx\",\"name\":\"smjbnkppxyn\"},\"location\":\"lsvxeizz\",\"tags\":{\"cxcktpi\":\"lnsrmffe\",\"kzddrtkgdojbmxva\":\"merteeammxqiek\",\"vecuijpx\":\"refdee\"},\"id\":\"xs\",\"name\":\"wprtu\",\"type\":\"wsawddjibabxvi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); VirtualNetwork response = manager.virtualNetworks() - .getByResourceGroupWithResponse("wqagnepzwa", "lsbs", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("pqg", "tjeaahhvjhh", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("bbxi", response.location()); - Assertions.assertEquals("xiidloped", response.tags().get("wdpyq")); - Assertions.assertEquals("qagwwrxaomz", response.properties().inventoryItemId()); - Assertions.assertEquals("glrrczez", response.properties().uuid()); - Assertions.assertEquals("hltnjadhqoawjq", response.properties().vmmServerId()); - Assertions.assertEquals("eqthwmg", response.extendedLocation().type()); - Assertions.assertEquals("b", response.extendedLocation().name()); + Assertions.assertEquals("lsvxeizz", response.location()); + Assertions.assertEquals("lnsrmffe", response.tags().get("cxcktpi")); + Assertions.assertEquals("zybbj", response.properties().inventoryItemId()); + Assertions.assertEquals("dj", response.properties().uuid()); + Assertions.assertEquals("yxkyxvx", response.properties().vmmServerId()); + Assertions.assertEquals("geuaulx", response.extendedLocation().type()); + Assertions.assertEquals("smjbnkppxyn", response.extendedLocation().name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksListByResourceGroupMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksListByResourceGroupMockTests.java index 58b9ff6b4edc..84ee0ff6353e 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksListByResourceGroupMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -10,7 +10,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.VirtualNetwork; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,24 +22,24 @@ public final class VirtualNetworksListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"inventoryItemId\":\"vxnqmhrpqpd\",\"uuid\":\"mkoisqcssf\",\"vmmServerId\":\"uifmc\",\"networkName\":\"p\",\"provisioningState\":\"Deleting\"},\"extendedLocation\":{\"type\":\"qzrdzsylollg\",\"name\":\"czzydmxzjij\"},\"location\":\"uaurkihcir\",\"tags\":{\"dcoxnbk\":\"fx\",\"urnnqbnqbpiz\":\"ja\",\"gypxrxvbfihwuhvc\":\"qltgrd\"},\"id\":\"a\",\"name\":\"s\",\"type\":\"bxrblmliowxihspn\"}]}"; + = "{\"value\":[{\"properties\":{\"inventoryItemId\":\"glecdmdqbwpypq\",\"uuid\":\"sfj\",\"vmmServerId\":\"b\",\"networkName\":\"hhxud\",\"provisioningState\":\"Canceled\"},\"extendedLocation\":{\"type\":\"d\",\"name\":\"nsiru\"},\"location\":\"z\",\"tags\":{\"gzrcxfailcfxwmdb\":\"sckdlp\"},\"id\":\"xdfgsftufqobr\",\"name\":\"lnacgcc\",\"type\":\"knh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.virtualNetworks().listByResourceGroup("ac", com.azure.core.util.Context.NONE); + = manager.virtualNetworks().listByResourceGroup("itvtzeexavo", com.azure.core.util.Context.NONE); - Assertions.assertEquals("uaurkihcir", response.iterator().next().location()); - Assertions.assertEquals("fx", response.iterator().next().tags().get("dcoxnbk")); - Assertions.assertEquals("vxnqmhrpqpd", response.iterator().next().properties().inventoryItemId()); - Assertions.assertEquals("mkoisqcssf", response.iterator().next().properties().uuid()); - Assertions.assertEquals("uifmc", response.iterator().next().properties().vmmServerId()); - Assertions.assertEquals("qzrdzsylollg", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("czzydmxzjij", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals("z", response.iterator().next().location()); + Assertions.assertEquals("sckdlp", response.iterator().next().tags().get("gzrcxfailcfxwmdb")); + Assertions.assertEquals("glecdmdqbwpypq", response.iterator().next().properties().inventoryItemId()); + Assertions.assertEquals("sfj", response.iterator().next().properties().uuid()); + Assertions.assertEquals("b", response.iterator().next().properties().vmmServerId()); + Assertions.assertEquals("d", response.iterator().next().extendedLocation().type()); + Assertions.assertEquals("nsiru", response.iterator().next().extendedLocation().name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksListMockTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksListMockTests.java index 29546d4eae8d..030802ca33fa 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksListMockTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VirtualNetworksListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -10,7 +10,7 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.scvmm.ScvmmManager; +import com.azure.resourcemanager.scvmm.SCVMMManager; import com.azure.resourcemanager.scvmm.models.VirtualNetwork; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,23 +22,23 @@ public final class VirtualNetworksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"inventoryItemId\":\"hnp\",\"uuid\":\"yqwcabvnuil\",\"vmmServerId\":\"yaswlpaugmr\",\"networkName\":\"jlrxwtoaukhfk\",\"provisioningState\":\"Canceled\"},\"extendedLocation\":{\"type\":\"izmoaeds\",\"name\":\"wuived\"},\"location\":\"gyeewxeiq\",\"tags\":{\"amljdlrgmsplzgau\":\"mgomg\",\"ewgnxkympqanxrj\":\"cshhv\",\"bta\":\"ixt\"},\"id\":\"ypnyghshxc\",\"name\":\"lhkgmnsghp\",\"type\":\"ycphdrwjjkhvyo\"}]}"; + = "{\"value\":[{\"properties\":{\"inventoryItemId\":\"zvytnrzvuljraaer\",\"uuid\":\"okqgukkjq\",\"vmmServerId\":\"broyla\",\"networkName\":\"ulcdisdosf\",\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"type\":\"vgjrwhr\",\"name\":\"ycy\"},\"location\":\"c\",\"tags\":{\"vjdhttzaefedxih\":\"ccknfnwmbtmvp\"},\"id\":\"hrphkmcrjdqn\",\"name\":\"dfzpbgtgkylkdg\",\"type\":\"rjeuut\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ScvmmManager manager = ScvmmManager.configure() + SCVMMManager manager = SCVMMManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.virtualNetworks().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("gyeewxeiq", response.iterator().next().location()); - Assertions.assertEquals("mgomg", response.iterator().next().tags().get("amljdlrgmsplzgau")); - Assertions.assertEquals("hnp", response.iterator().next().properties().inventoryItemId()); - Assertions.assertEquals("yqwcabvnuil", response.iterator().next().properties().uuid()); - Assertions.assertEquals("yaswlpaugmr", response.iterator().next().properties().vmmServerId()); - Assertions.assertEquals("izmoaeds", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("wuived", response.iterator().next().extendedLocation().name()); + Assertions.assertEquals("c", response.iterator().next().location()); + Assertions.assertEquals("ccknfnwmbtmvp", response.iterator().next().tags().get("vjdhttzaefedxih")); + Assertions.assertEquals("zvytnrzvuljraaer", response.iterator().next().properties().inventoryItemId()); + Assertions.assertEquals("okqgukkjq", response.iterator().next().properties().uuid()); + Assertions.assertEquals("broyla", response.iterator().next().properties().vmmServerId()); + Assertions.assertEquals("vgjrwhr", response.iterator().next().extendedLocation().type()); + Assertions.assertEquals("ycy", response.iterator().next().extendedLocation().name()); } } diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VmmServerTagsUpdateTests.java b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VmmServerTagsUpdateTests.java index 3d1e9a934ebd..747ce00b688e 100644 --- a/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VmmServerTagsUpdateTests.java +++ b/sdk/scvmm/azure-resourcemanager-scvmm/src/test/java/com/azure/resourcemanager/scvmm/generated/VmmServerTagsUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.scvmm.generated; @@ -14,17 +14,15 @@ public final class VmmServerTagsUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmmServerTagsUpdate model - = BinaryData.fromString("{\"tags\":{\"ewbcihxuuw\":\"dtj\",\"yxccyb\":\"c\",\"px\":\"payakkud\"}}") - .toObject(VmmServerTagsUpdate.class); - Assertions.assertEquals("dtj", model.tags().get("ewbcihxuuw")); + = BinaryData.fromString("{\"tags\":{\"br\":\"b\"}}").toObject(VmmServerTagsUpdate.class); + Assertions.assertEquals("b", model.tags().get("br")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VmmServerTagsUpdate model - = new VmmServerTagsUpdate().withTags(mapOf("ewbcihxuuw", "dtj", "yxccyb", "c", "px", "payakkud")); + VmmServerTagsUpdate model = new VmmServerTagsUpdate().withTags(mapOf("br", "b")); model = BinaryData.fromObject(model).toObject(VmmServerTagsUpdate.class); - Assertions.assertEquals("dtj", model.tags().get("ewbcihxuuw")); + Assertions.assertEquals("b", model.tags().get("br")); } // Use "Map.of" if available diff --git a/sdk/scvmm/azure-resourcemanager-scvmm/tsp-location.yaml b/sdk/scvmm/azure-resourcemanager-scvmm/tsp-location.yaml new file mode 100644 index 000000000000..0e3af1986644 --- /dev/null +++ b/sdk/scvmm/azure-resourcemanager-scvmm/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/scvmm/ScVmm.Management +commit: 869ff949403f64de798f8d94763b1abc1e4651a6 +repo: test-repo-billy/azure-rest-api-specs +additionalDirectories: