diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/CHANGELOG.md b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/CHANGELOG.md index d01ad7bd4053..2a5153ca8471 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/CHANGELOG.md +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2022-03-04) +- Azure Resource Manager VMwareCloudSimple client library for Java. This package contains Microsoft Azure SDK for VMwareCloudSimple Management SDK. Description of the new service. Package tag package-2019-04-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.1 (2021-04-22) diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/README.md b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/README.md index f6f7711e6e85..ce0829a4e550 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/README.md +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-vmwarecloudsimple - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on ## Examples +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/SAMPLE.md) + + ## Troubleshooting ## Next steps diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/SAMPLE.md b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/SAMPLE.md new file mode 100644 index 000000000000..ecd72bb21afd --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/SAMPLE.md @@ -0,0 +1,992 @@ +# Code snippets and samples + + +## CustomizationPolicies + +- [Get](#customizationpolicies_get) +- [List](#customizationpolicies_list) + +## DedicatedCloudNodes + +- [CreateOrUpdate](#dedicatedcloudnodes_createorupdate) +- [Delete](#dedicatedcloudnodes_delete) +- [GetByResourceGroup](#dedicatedcloudnodes_getbyresourcegroup) +- [List](#dedicatedcloudnodes_list) +- [ListByResourceGroup](#dedicatedcloudnodes_listbyresourcegroup) +- [Update](#dedicatedcloudnodes_update) + +## DedicatedCloudServices + +- [CreateOrUpdate](#dedicatedcloudservices_createorupdate) +- [Delete](#dedicatedcloudservices_delete) +- [GetByResourceGroup](#dedicatedcloudservices_getbyresourcegroup) +- [List](#dedicatedcloudservices_list) +- [ListByResourceGroup](#dedicatedcloudservices_listbyresourcegroup) +- [Update](#dedicatedcloudservices_update) + +## Operations + +- [Get](#operations_get) +- [List](#operations_list) + +## PrivateClouds + +- [Get](#privateclouds_get) +- [List](#privateclouds_list) + +## ResourcePools + +- [Get](#resourcepools_get) +- [List](#resourcepools_list) + +## SkusAvailability + +- [List](#skusavailability_list) + +## Usages + +- [List](#usages_list) + +## VirtualMachineTemplates + +- [Get](#virtualmachinetemplates_get) +- [List](#virtualmachinetemplates_list) + +## VirtualMachines + +- [CreateOrUpdate](#virtualmachines_createorupdate) +- [Delete](#virtualmachines_delete) +- [GetByResourceGroup](#virtualmachines_getbyresourcegroup) +- [List](#virtualmachines_list) +- [ListByResourceGroup](#virtualmachines_listbyresourcegroup) +- [Start](#virtualmachines_start) +- [Stop](#virtualmachines_stop) +- [Update](#virtualmachines_update) + +## VirtualNetworks + +- [Get](#virtualnetworks_get) +- [List](#virtualnetworks_list) +### CustomizationPolicies_Get + +```java +import com.azure.core.util.Context; + +/** Samples for CustomizationPolicies Get. */ +public final class CustomizationPoliciesGetSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetCustomizationPolicy.json + */ + /** + * Sample code: GetCustomizationPolicy. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getCustomizationPolicy( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.customizationPolicies().getWithResponse("myResourceGroup", "myPrivateCloud", "Linux1", Context.NONE); + } +} +``` + +### CustomizationPolicies_List + +```java +import com.azure.core.util.Context; + +/** Samples for CustomizationPolicies List. */ +public final class CustomizationPoliciesListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListCustomizationPolicies.json + */ + /** + * Sample code: ListCustomizationPolicies. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listCustomizationPolicies( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.customizationPolicies().list("myResourceGroup", "myPrivateCloud", null, Context.NONE); + } +} +``` + +### DedicatedCloudNodes_CreateOrUpdate + +```java +import com.azure.resourcemanager.vmwarecloudsimple.models.Sku; +import java.util.UUID; + +/** Samples for DedicatedCloudNodes CreateOrUpdate. */ +public final class DedicatedCloudNodesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/CreateDedicatedCloudNode.json + */ + /** + * Sample code: CreateDedicatedCloudNode. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void createDedicatedCloudNode( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .dedicatedCloudNodes() + .define("myNode") + .withRegion("westus") + .withExistingResourceGroup("myResourceGroup") + .withSku(new Sku().withName("VMware_CloudSimple_CS28")) + .withAvailabilityZoneId("az1") + .withNodesCount(1) + .withPlacementGroupId("n1") + .withPurchaseId(UUID.fromString("56acbd46-3d36-4bbf-9b08-57c30fdf6932")) + .withIdPropertiesId("general") + .withNamePropertiesName("CS28-Node") + .withReferer("https://management.azure.com/") + .create(); + } +} +``` + +### DedicatedCloudNodes_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for DedicatedCloudNodes Delete. */ +public final class DedicatedCloudNodesDeleteSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/DeleteDedicatedCloudNode.json + */ + /** + * Sample code: DeleteDedicatedCloudNode. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void deleteDedicatedCloudNode( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.dedicatedCloudNodes().deleteWithResponse("myResourceGroup", "myNode", Context.NONE); + } +} +``` + +### DedicatedCloudNodes_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for DedicatedCloudNodes GetByResourceGroup. */ +public final class DedicatedCloudNodesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetDedicatedCloudNode.json + */ + /** + * Sample code: GetDedicatedCloudNode. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getDedicatedCloudNode( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.dedicatedCloudNodes().getByResourceGroupWithResponse("myResourceGroup", "myNode", Context.NONE); + } +} +``` + +### DedicatedCloudNodes_List + +```java +import com.azure.core.util.Context; + +/** Samples for DedicatedCloudNodes List. */ +public final class DedicatedCloudNodesListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListDedicatedCloudNodes.json + */ + /** + * Sample code: ListDedicatedCloudNodes. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listDedicatedCloudNodes( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.dedicatedCloudNodes().list(null, null, null, Context.NONE); + } +} +``` + +### DedicatedCloudNodes_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for DedicatedCloudNodes ListByResourceGroup. */ +public final class DedicatedCloudNodesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListRGDedicatedCloudNodes.json + */ + /** + * Sample code: ListRGDedicatedCloudNodes. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listRGDedicatedCloudNodes( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.dedicatedCloudNodes().listByResourceGroup("myResourceGroup", null, null, null, Context.NONE); + } +} +``` + +### DedicatedCloudNodes_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.vmwarecloudsimple.models.DedicatedCloudNode; +import java.util.HashMap; +import java.util.Map; + +/** Samples for DedicatedCloudNodes Update. */ +public final class DedicatedCloudNodesUpdateSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/PatchDedicatedCloudNode.json + */ + /** + * Sample code: PatchDedicatedCloudNode. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void patchDedicatedCloudNode( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + DedicatedCloudNode resource = + manager + .dedicatedCloudNodes() + .getByResourceGroupWithResponse("myResourceGroup", "myNode", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("myTag", "tagValue")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### DedicatedCloudServices_CreateOrUpdate + +```java +/** Samples for DedicatedCloudServices CreateOrUpdate. */ +public final class DedicatedCloudServicesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/CreateDedicatedCloudService.json + */ + /** + * Sample code: CreateDedicatedCloudService. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void createDedicatedCloudService( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .dedicatedCloudServices() + .define("myService") + .withRegion("westus") + .withExistingResourceGroup("myResourceGroup") + .withGatewaySubnet("10.0.0.0") + .create(); + } +} +``` + +### DedicatedCloudServices_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for DedicatedCloudServices Delete. */ +public final class DedicatedCloudServicesDeleteSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/DeleteDedicatedCloudService.json + */ + /** + * Sample code: DeleteDedicatedCloudService. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void deleteDedicatedCloudService( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.dedicatedCloudServices().delete("myResourceGroup", "myService", Context.NONE); + } +} +``` + +### DedicatedCloudServices_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for DedicatedCloudServices GetByResourceGroup. */ +public final class DedicatedCloudServicesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetDedicatedCloudService.json + */ + /** + * Sample code: GetDedicatedCloudService. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getDedicatedCloudService( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.dedicatedCloudServices().getByResourceGroupWithResponse("myResourceGroup", "myService", Context.NONE); + } +} +``` + +### DedicatedCloudServices_List + +```java +import com.azure.core.util.Context; + +/** Samples for DedicatedCloudServices List. */ +public final class DedicatedCloudServicesListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListDedicatedCloudServices.json + */ + /** + * Sample code: ListDedicatedCloudServices. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listDedicatedCloudServices( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.dedicatedCloudServices().list(null, null, null, Context.NONE); + } +} +``` + +### DedicatedCloudServices_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for DedicatedCloudServices ListByResourceGroup. */ +public final class DedicatedCloudServicesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListRGDedicatedCloudServices.json + */ + /** + * Sample code: ListRGDedicatedCloudServices. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listRGDedicatedCloudServices( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.dedicatedCloudServices().listByResourceGroup("myResourceGroup", null, null, null, Context.NONE); + } +} +``` + +### DedicatedCloudServices_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.vmwarecloudsimple.models.DedicatedCloudService; +import java.util.HashMap; +import java.util.Map; + +/** Samples for DedicatedCloudServices Update. */ +public final class DedicatedCloudServicesUpdateSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/PatchDedicatedService.json + */ + /** + * Sample code: PatchDedicatedService. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void patchDedicatedService( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + DedicatedCloudService resource = + manager + .dedicatedCloudServices() + .getByResourceGroupWithResponse("myResourceGroup", "myService", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("myTag", "tagValue")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Operations_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Operations Get. */ +public final class OperationsGetSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetFailedOperationResult.json + */ + /** + * Sample code: GetFailedOperationResult. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getFailedOperationResult( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .operations() + .getWithResponse( + "westus2", "https://management.azure.com/", "d030bb3f-7d53-11e9-8e09-9a86872085ff", Context.NONE); + } + + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetOperationResult.json + */ + /** + * Sample code: GetOperationResult. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getOperationResult( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .operations() + .getWithResponse( + "westus2", "https://management.azure.com/", "f8e1c8f1-7d52-11e9-8e07-9a86872085ff", Context.NONE); + } +} +``` + +### Operations_List + +```java +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListOperations.json + */ + /** + * Sample code: ListOperations. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listOperations(com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.operations().list(Context.NONE); + } +} +``` + +### PrivateClouds_Get + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateClouds Get. */ +public final class PrivateCloudsGetSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetPrivateCloud.json + */ + /** + * Sample code: GetPrivateCloud. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getPrivateCloud(com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.privateClouds().getWithResponse("myPrivateCloud", "westus2", Context.NONE); + } +} +``` + +### PrivateClouds_List + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateClouds List. */ +public final class PrivateCloudsListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListPrivateCloudInLocation.json + */ + /** + * Sample code: ListPrivateCloudInLocation. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listPrivateCloudInLocation( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.privateClouds().list("eastus", Context.NONE); + } +} +``` + +### ResourcePools_Get + +```java +import com.azure.core.util.Context; + +/** Samples for ResourcePools Get. */ +public final class ResourcePoolsGetSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetResourcePool.json + */ + /** + * Sample code: GetResourcePool. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getResourcePool(com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.resourcePools().getWithResponse("westus2", "myPrivateCloud", "resgroup-26", Context.NONE); + } +} +``` + +### ResourcePools_List + +```java +import com.azure.core.util.Context; + +/** Samples for ResourcePools List. */ +public final class ResourcePoolsListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListResourcePools.json + */ + /** + * Sample code: ListResourcePools. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listResourcePools(com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.resourcePools().list("westus2", "myPrivateCloud", Context.NONE); + } +} +``` + +### SkusAvailability_List + +```java +import com.azure.core.util.Context; + +/** Samples for SkusAvailability List. */ +public final class SkusAvailabilityListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListAvailabilities.json + */ + /** + * Sample code: ListAvailabilities. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listAvailabilities( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.skusAvailabilities().list("westus2", null, Context.NONE); + } +} +``` + +### Usages_List + +```java +import com.azure.core.util.Context; + +/** Samples for Usages List. */ +public final class UsagesListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListUsages.json + */ + /** + * Sample code: ListUsages. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listUsages(com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.usages().list("westus2", null, Context.NONE); + } +} +``` + +### VirtualMachineTemplates_Get + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachineTemplates Get. */ +public final class VirtualMachineTemplatesGetSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetVirtualMachineTemplate.json + */ + /** + * Sample code: GetVirtualMachineTemplate. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getVirtualMachineTemplate( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.virtualMachineTemplates().getWithResponse("westus2", "myPrivateCloud", "vm-34", Context.NONE); + } +} +``` + +### VirtualMachineTemplates_List + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachineTemplates List. */ +public final class VirtualMachineTemplatesListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListVirtualMachineTemplates.json + */ + /** + * Sample code: ListVirtualMachineTemplates. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listVirtualMachineTemplates( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .virtualMachineTemplates() + .list( + "myPrivateCloud", + "westus2", + "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26", + Context.NONE); + } +} +``` + +### VirtualMachines_CreateOrUpdate + +```java +import com.azure.resourcemanager.vmwarecloudsimple.fluent.models.ResourcePoolInner; +import com.azure.resourcemanager.vmwarecloudsimple.fluent.models.VirtualNetworkInner; +import com.azure.resourcemanager.vmwarecloudsimple.fluent.models.VirtualNicInner; +import com.azure.resourcemanager.vmwarecloudsimple.models.DiskIndependenceMode; +import com.azure.resourcemanager.vmwarecloudsimple.models.NicType; +import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualDisk; +import java.util.Arrays; + +/** Samples for VirtualMachines CreateOrUpdate. */ +public final class VirtualMachinesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/CreateVirtualMachine.json + */ + /** + * Sample code: CreateVirtualMachine. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void createVirtualMachine( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .virtualMachines() + .define("myVirtualMachine") + .withRegion("westus2") + .withExistingResourceGroup("myResourceGroup") + .withAmountOfRam(4096) + .withDisks( + Arrays + .asList( + new VirtualDisk() + .withControllerId("1000") + .withIndependenceMode(DiskIndependenceMode.PERSISTENT) + .withTotalSize(10485760) + .withVirtualDiskId("2000"))) + .withNics( + Arrays + .asList( + new VirtualNicInner() + .withNetwork( + new VirtualNetworkInner() + .withId( + "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19")) + .withNicType(NicType.E1000) + .withPowerOnBoot(true) + .withVirtualNicId("4000"))) + .withNumberOfCores(2) + .withPrivateCloudId( + "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud") + .withResourcePool( + new ResourcePoolInner() + .withId( + "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26")) + .withTemplateId( + "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34") + .withReferer("https://management.azure.com/") + .create(); + } +} +``` + +### VirtualMachines_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Delete. */ +public final class VirtualMachinesDeleteSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/DeleteVirtualMachine.json + */ + /** + * Sample code: DeleteVirtualMachine. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void deleteVirtualMachine( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .virtualMachines() + .delete("myResourceGroup", "https://management.azure.com/", "myVirtualMachine", Context.NONE); + } +} +``` + +### VirtualMachines_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines GetByResourceGroup. */ +public final class VirtualMachinesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetVirtualMachine.json + */ + /** + * Sample code: GetVirtualMachine. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getVirtualMachine(com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.virtualMachines().getByResourceGroupWithResponse("myResourceGroup", "myVirtualMachine", Context.NONE); + } +} +``` + +### VirtualMachines_List + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines List. */ +public final class VirtualMachinesListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListVirtualMachines.json + */ + /** + * Sample code: ListVirtualMachines. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listVirtualMachines( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.virtualMachines().list(null, null, null, Context.NONE); + } +} +``` + +### VirtualMachines_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines ListByResourceGroup. */ +public final class VirtualMachinesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListRGVirtualMachines.json + */ + /** + * Sample code: ListRGVirtualMachines. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listRGVirtualMachines( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.virtualMachines().listByResourceGroup("myResourceGroup", null, null, null, Context.NONE); + } +} +``` + +### VirtualMachines_Start + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Start. */ +public final class VirtualMachinesStartSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/StartVirtualMachine.json + */ + /** + * Sample code: StartVirtualMachine. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void startVirtualMachine( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .virtualMachines() + .start("myResourceGroup", "https://management.azure.com/", "myVirtualMachine", Context.NONE); + } +} +``` + +### VirtualMachines_Stop + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.vmwarecloudsimple.models.StopMode; +import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualMachineStopMode; + +/** Samples for VirtualMachines Stop. */ +public final class VirtualMachinesStopSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/StopInBodyVirtualMachine.json + */ + /** + * Sample code: StopInBodyVirtualMachine. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void stopInBodyVirtualMachine( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .virtualMachines() + .stop( + "myResourceGroup", + "https://management.azure.com/", + "myVirtualMachine", + null, + new VirtualMachineStopMode(), + Context.NONE); + } + + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/StopInQueryVirtualMachine.json + */ + /** + * Sample code: StopInQueryVirtualMachine. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void stopInQueryVirtualMachine( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .virtualMachines() + .stop( + "myResourceGroup", + "https://management.azure.com/", + "myVirtualMachine", + StopMode.SUSPEND, + null, + Context.NONE); + } +} +``` + +### VirtualMachines_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualMachine; +import java.util.HashMap; +import java.util.Map; + +/** Samples for VirtualMachines Update. */ +public final class VirtualMachinesUpdateSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/PatchVirtualMachine.json + */ + /** + * Sample code: PatchVirtualMachine. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void patchVirtualMachine( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + VirtualMachine resource = + manager + .virtualMachines() + .getByResourceGroupWithResponse("myResourceGroup", "myVirtualMachine", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("myTag", "tagValue")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### VirtualNetworks_Get + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualNetworks Get. */ +public final class VirtualNetworksGetSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetVirtualNetwork.json + */ + /** + * Sample code: GetVirtualNetwork. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getVirtualNetwork(com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.virtualNetworks().getWithResponse("westus2", "myPrivateCloud", "dvportgroup-19", Context.NONE); + } +} +``` + +### VirtualNetworks_List + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualNetworks List. */ +public final class VirtualNetworksListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListVirtualNetworks.json + */ + /** + * Sample code: ListVirtualNetworks. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listVirtualNetworks( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .virtualNetworks() + .list( + "westus2", + "myPrivateCloud", + "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26", + Context.NONE); + } +} +``` + diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/pom.xml b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/pom.xml index 55956a84ddf3..b82407f1c683 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/pom.xml +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/pom.xml @@ -1,55 +1,55 @@ - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + - com.azure.resourcemanager - azure-resourcemanager-vmwarecloudsimple - 1.0.0-beta.2 - jar + com.azure.resourcemanager + azure-resourcemanager-vmwarecloudsimple + 1.0.0-beta.2 + jar - Microsoft Azure SDK for VMwareCloudSimple Management - This package contains Microsoft Azure SDK for VMwareCloudSimple Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Description of the new service. Package tag package-2019-04-01. - https://github.com/Azure/azure-sdk-for-java + Microsoft Azure SDK for VMwareCloudSimple Management + This package contains Microsoft Azure SDK for VMwareCloudSimple Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Description of the new service. Package tag package-2019-04-01. + https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + - - https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - microsoft - Microsoft - - - - UTF-8 - true - - - - com.azure - azure-core - 1.25.0 - - - com.azure - azure-core-management - 1.5.2 - - + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + true + + + + com.azure + azure-core + 1.25.0 + + + com.azure + azure-core-management + 1.5.2 + + diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/VMwareCloudSimpleManager.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/VMwareCloudSimpleManager.java index dc1fdc8e089d..f474646ae525 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/VMwareCloudSimpleManager.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/VMwareCloudSimpleManager.java @@ -8,8 +8,8 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -17,6 +17,7 @@ import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; @@ -49,6 +50,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** Entry point to VMwareCloudSimpleManager. Description of the new service. */ public final class VMwareCloudSimpleManager { @@ -117,6 +119,7 @@ public static final class Configurable { private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; private Duration defaultPollInterval; @@ -156,6 +159,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) { return this; } + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + /** * Sets the retry policy to the HTTP pipeline. * @@ -212,20 +226,33 @@ public VMwareCloudSimpleManager authenticate(TokenCredential credential, AzurePr userAgentBuilder.append(" (auto-generated)"); } + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } if (retryPolicy == null) { retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); - policies.addAll(this.policies); + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/CustomizationPoliciesClient.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/CustomizationPoliciesClient.java index 337ddd78920e..df3a4ef24a36 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/CustomizationPoliciesClient.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/CustomizationPoliciesClient.java @@ -21,7 +21,7 @@ public interface CustomizationPoliciesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of customization polices response model. + * @return list of customization polices response model as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String regionId, String pcName); @@ -37,7 +37,7 @@ public interface CustomizationPoliciesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of customization polices response model. + * @return list of customization polices response model as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String regionId, String pcName, String filter, Context context); @@ -66,7 +66,7 @@ public interface CustomizationPoliciesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the virtual machine customization policy. + * @return the virtual machine customization policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/DedicatedCloudNodesClient.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/DedicatedCloudNodesClient.java index 6db9133f4cb9..1ac212909108 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/DedicatedCloudNodesClient.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/DedicatedCloudNodesClient.java @@ -21,7 +21,7 @@ public interface DedicatedCloudNodesClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -36,7 +36,7 @@ public interface DedicatedCloudNodesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String filter, Integer top, String skipToken, Context context); @@ -48,7 +48,7 @@ public interface DedicatedCloudNodesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -64,7 +64,7 @@ public interface DedicatedCloudNodesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup( @@ -92,7 +92,7 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud node model. + * @return dedicated cloud node model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -102,32 +102,38 @@ Response getByResourceGroupWithResponse( * Returns dedicated cloud node by its name. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param dedicatedCloudNodeName dedicated cloud node name. * @param dedicatedCloudNodeRequest Create Dedicated Cloud Node 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 dedicated cloud node model. + * @return the {@link SyncPoller} for polling of dedicated cloud node model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DedicatedCloudNodeInner> beginCreateOrUpdate( - String resourceGroupName, String dedicatedCloudNodeName, DedicatedCloudNodeInner dedicatedCloudNodeRequest); + String resourceGroupName, + String referer, + String dedicatedCloudNodeName, + DedicatedCloudNodeInner dedicatedCloudNodeRequest); /** * Returns dedicated cloud node by its name. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param dedicatedCloudNodeName dedicated cloud node name. * @param dedicatedCloudNodeRequest Create Dedicated Cloud Node 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 dedicated cloud node model. + * @return the {@link SyncPoller} for polling of dedicated cloud node model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DedicatedCloudNodeInner> beginCreateOrUpdate( String resourceGroupName, + String referer, String dedicatedCloudNodeName, DedicatedCloudNodeInner dedicatedCloudNodeRequest, Context context); @@ -136,6 +142,7 @@ SyncPoller, DedicatedCloudNodeInner> beginCr * Returns dedicated cloud node by its name. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param dedicatedCloudNodeName dedicated cloud node name. * @param dedicatedCloudNodeRequest Create Dedicated Cloud Node request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -145,12 +152,16 @@ SyncPoller, DedicatedCloudNodeInner> beginCr */ @ServiceMethod(returns = ReturnType.SINGLE) DedicatedCloudNodeInner createOrUpdate( - String resourceGroupName, String dedicatedCloudNodeName, DedicatedCloudNodeInner dedicatedCloudNodeRequest); + String resourceGroupName, + String referer, + String dedicatedCloudNodeName, + DedicatedCloudNodeInner dedicatedCloudNodeRequest); /** * Returns dedicated cloud node by its name. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param dedicatedCloudNodeName dedicated cloud node name. * @param dedicatedCloudNodeRequest Create Dedicated Cloud Node request. * @param context The context to associate with this operation. @@ -162,6 +173,7 @@ DedicatedCloudNodeInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) DedicatedCloudNodeInner createOrUpdate( String resourceGroupName, + String referer, String dedicatedCloudNodeName, DedicatedCloudNodeInner dedicatedCloudNodeRequest, Context context); @@ -187,7 +199,7 @@ DedicatedCloudNodeInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String dedicatedCloudNodeName, Context context); @@ -217,7 +229,7 @@ DedicatedCloudNodeInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud node model. + * @return dedicated cloud node model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/DedicatedCloudServicesClient.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/DedicatedCloudServicesClient.java index 86c1cb5d818a..1f620e360711 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/DedicatedCloudServicesClient.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/DedicatedCloudServicesClient.java @@ -21,7 +21,7 @@ public interface DedicatedCloudServicesClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -36,7 +36,7 @@ public interface DedicatedCloudServicesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String filter, Integer top, String skipToken, Context context); @@ -48,7 +48,7 @@ public interface DedicatedCloudServicesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -64,7 +64,7 @@ public interface DedicatedCloudServicesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup( @@ -92,7 +92,7 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -125,7 +125,7 @@ DedicatedCloudServiceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -142,9 +142,9 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String dedicatedCloudServiceName); /** @@ -156,9 +156,9 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String dedicatedCloudServiceName, Context context); @@ -212,7 +212,7 @@ DedicatedCloudServiceInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/OperationsClient.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/OperationsClient.java index aa3a93d4dc0f..006bf900b99b 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/OperationsClient.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/OperationsClient.java @@ -19,7 +19,7 @@ public interface OperationsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of available operations. + * @return list of available operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -31,7 +31,7 @@ public interface OperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of available operations. + * @return list of available operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -40,6 +40,7 @@ public interface OperationsClient { * Return an async operation. * * @param regionId The region Id (westus, eastus). + * @param referer referer url. * @param operationId operation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -47,12 +48,13 @@ public interface OperationsClient { * @return operation status response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationResourceInner get(String regionId, String operationId); + OperationResourceInner get(String regionId, String referer, String operationId); /** * Return an async operation. * * @param regionId The region Id (westus, eastus). + * @param referer referer url. * @param operationId operation id. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -61,5 +63,5 @@ public interface OperationsClient { * @return operation status response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationsGetResponse getWithResponse(String regionId, String operationId, Context context); + OperationsGetResponse getWithResponse(String regionId, String referer, String operationId, Context context); } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/PrivateCloudsClient.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/PrivateCloudsClient.java index a56b12277a7b..78facd673305 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/PrivateCloudsClient.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/PrivateCloudsClient.java @@ -20,7 +20,7 @@ public interface PrivateCloudsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private clouds. + * @return list of private clouds as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String regionId); @@ -33,7 +33,7 @@ public interface PrivateCloudsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private clouds. + * @return list of private clouds as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String regionId, Context context); @@ -60,7 +60,7 @@ public interface PrivateCloudsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private cloud model. + * @return private cloud model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String pcName, String regionId, Context context); diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/ResourcePoolsClient.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/ResourcePoolsClient.java index 88bd1e9f39cf..00ba0f12d340 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/ResourcePoolsClient.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/ResourcePoolsClient.java @@ -21,7 +21,7 @@ public interface ResourcePoolsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource pools response model. + * @return list of resource pools response model as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String regionId, String pcName); @@ -35,7 +35,7 @@ public interface ResourcePoolsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource pools response model. + * @return list of resource pools response model as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String regionId, String pcName, Context context); @@ -64,7 +64,7 @@ public interface ResourcePoolsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return resource pool model. + * @return resource pool model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/SkusAvailabilitiesClient.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/SkusAvailabilitiesClient.java index d0444473f6c2..99334bb4f121 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/SkusAvailabilitiesClient.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/SkusAvailabilitiesClient.java @@ -19,7 +19,7 @@ public interface SkusAvailabilitiesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU availabilities. + * @return list of SKU availabilities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String regionId); @@ -33,7 +33,7 @@ public interface SkusAvailabilitiesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU availabilities. + * @return list of SKU availabilities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String regionId, String skuId, Context context); diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/UsagesClient.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/UsagesClient.java index aa8bca55635a..519b430d4e44 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/UsagesClient.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/UsagesClient.java @@ -19,7 +19,7 @@ public interface UsagesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of usages. + * @return list of usages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String regionId); @@ -34,7 +34,7 @@ public interface UsagesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of usages. + * @return list of usages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String regionId, String filter, Context context); diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/VMwareCloudSimple.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/VMwareCloudSimple.java index 883500d0df8e..07989cd20248 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/VMwareCloudSimple.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/VMwareCloudSimple.java @@ -16,13 +16,6 @@ public interface VMwareCloudSimple { */ String getSubscriptionId(); - /** - * Gets referer url. - * - * @return the referer value. - */ - String getReferer(); - /** * Gets server parameter. * diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/VirtualMachineTemplatesClient.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/VirtualMachineTemplatesClient.java index 65a070433822..76b322c902df 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/VirtualMachineTemplatesClient.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/VirtualMachineTemplatesClient.java @@ -22,7 +22,7 @@ public interface VirtualMachineTemplatesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machine templates. + * @return list of virtual machine templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String pcName, String regionId, String resourcePoolName); @@ -37,7 +37,7 @@ public interface VirtualMachineTemplatesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machine templates. + * @return list of virtual machine templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -67,7 +67,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine template model. + * @return virtual machine template model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/VirtualMachinesClient.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/VirtualMachinesClient.java index 928f4b60edef..38e4b364ab7a 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/VirtualMachinesClient.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/VirtualMachinesClient.java @@ -23,7 +23,7 @@ public interface VirtualMachinesClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -38,7 +38,7 @@ public interface VirtualMachinesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String filter, Integer top, String skipToken, Context context); @@ -50,7 +50,7 @@ public interface VirtualMachinesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -66,7 +66,7 @@ public interface VirtualMachinesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup( @@ -94,7 +94,7 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -104,32 +104,35 @@ Response getByResourceGroupWithResponse( * Create Or Update Virtual Machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param virtualMachineRequest Create or Update Virtual Machine 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 virtual machine model. + * @return the {@link SyncPoller} for polling of virtual machine model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualMachineInner> beginCreateOrUpdate( - String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineRequest); + String resourceGroupName, String referer, String virtualMachineName, VirtualMachineInner virtualMachineRequest); /** * Create Or Update Virtual Machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param virtualMachineRequest Create or Update Virtual Machine 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 virtual machine model. + * @return the {@link SyncPoller} for polling of virtual machine model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualMachineInner> beginCreateOrUpdate( String resourceGroupName, + String referer, String virtualMachineName, VirtualMachineInner virtualMachineRequest, Context context); @@ -138,6 +141,7 @@ SyncPoller, VirtualMachineInner> beginCreateOrUp * Create Or Update Virtual Machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param virtualMachineRequest Create or Update Virtual Machine request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -147,12 +151,13 @@ SyncPoller, VirtualMachineInner> beginCreateOrUp */ @ServiceMethod(returns = ReturnType.SINGLE) VirtualMachineInner createOrUpdate( - String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineRequest); + String resourceGroupName, String referer, String virtualMachineName, VirtualMachineInner virtualMachineRequest); /** * Create Or Update Virtual Machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param virtualMachineRequest Create or Update Virtual Machine request. * @param context The context to associate with this operation. @@ -164,6 +169,7 @@ VirtualMachineInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) VirtualMachineInner createOrUpdate( String resourceGroupName, + String referer, String virtualMachineName, VirtualMachineInner virtualMachineRequest, Context context); @@ -172,46 +178,50 @@ VirtualMachineInner createOrUpdate( * Delete virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginDelete(String resourceGroupName, String virtualMachineName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String referer, String virtualMachineName); /** * Delete virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( - String resourceGroupName, String virtualMachineName, Context context); + String resourceGroupName, String referer, String virtualMachineName, Context context); /** * Delete virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String virtualMachineName); + void delete(String resourceGroupName, String referer, String virtualMachineName); /** * Delete virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -219,7 +229,7 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String virtualMachineName, Context context); + void delete(String resourceGroupName, String referer, String virtualMachineName, Context context); /** * Patch virtual machine properties. @@ -230,9 +240,9 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine model. + * @return the {@link SyncPoller} for polling of virtual machine model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualMachineInner> beginUpdate( String resourceGroupName, String virtualMachineName, PatchPayload virtualMachineRequest); @@ -246,9 +256,9 @@ SyncPoller, VirtualMachineInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine model. + * @return the {@link SyncPoller} for polling of virtual machine model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualMachineInner> beginUpdate( String resourceGroupName, String virtualMachineName, PatchPayload virtualMachineRequest, Context context); @@ -286,45 +296,50 @@ VirtualMachineInner update( * Power on virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginStart(String resourceGroupName, String virtualMachineName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStart(String resourceGroupName, String referer, String virtualMachineName); /** * Power on virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginStart(String resourceGroupName, String virtualMachineName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStart( + String resourceGroupName, String referer, String virtualMachineName, Context context); /** * Power on virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 resourceGroupName, String virtualMachineName); + void start(String resourceGroupName, String referer, String virtualMachineName); /** * Power on virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -332,28 +347,30 @@ VirtualMachineInner update( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void start(String resourceGroupName, String virtualMachineName, Context context); + void start(String resourceGroupName, String referer, String virtualMachineName, Context context); /** * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param mode query stop mode parameter (reboot, shutdown, etc...). * @param m body stop mode parameter (reboot, shutdown, etc...). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop( - String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m); + String resourceGroupName, String referer, String virtualMachineName, StopMode mode, VirtualMachineStopMode m); /** * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param mode query stop mode parameter (reboot, shutdown, etc...). * @param m body stop mode parameter (reboot, shutdown, etc...). @@ -361,16 +378,22 @@ SyncPoller, Void> beginStop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop( - String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m, Context context); + String resourceGroupName, + String referer, + String virtualMachineName, + StopMode mode, + VirtualMachineStopMode m, + Context context); /** * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param mode query stop mode parameter (reboot, shutdown, etc...). * @param m body stop mode parameter (reboot, shutdown, etc...). @@ -379,24 +402,27 @@ SyncPoller, Void> beginStop( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m); + void stop( + String resourceGroupName, String referer, String virtualMachineName, StopMode mode, VirtualMachineStopMode m); /** * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 stop(String resourceGroupName, String virtualMachineName); + void stop(String resourceGroupName, String referer, String virtualMachineName); /** * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param mode query stop mode parameter (reboot, shutdown, etc...). * @param m body stop mode parameter (reboot, shutdown, etc...). @@ -407,5 +433,10 @@ SyncPoller, Void> beginStop( */ @ServiceMethod(returns = ReturnType.SINGLE) void stop( - String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m, Context context); + String resourceGroupName, + String referer, + String virtualMachineName, + StopMode mode, + VirtualMachineStopMode m, + Context context); } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/VirtualNetworksClient.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/VirtualNetworksClient.java index 887e3537193e..54c2283d4025 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/VirtualNetworksClient.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/VirtualNetworksClient.java @@ -22,7 +22,7 @@ public interface VirtualNetworksClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual networks. + * @return list of virtual networks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String regionId, String pcName, String resourcePoolName); @@ -37,7 +37,7 @@ public interface VirtualNetworksClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual networks. + * @return list of virtual networks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String regionId, String pcName, String resourcePoolName, Context context); @@ -66,7 +66,7 @@ public interface VirtualNetworksClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network model. + * @return virtual network model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/AvailableOperationDisplayPropertyServiceSpecification.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/AvailableOperationDisplayPropertyServiceSpecification.java new file mode 100644 index 000000000000..c9d3f7151a59 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/AvailableOperationDisplayPropertyServiceSpecification.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.vmwarecloudsimple.models.AvailableOperationDisplayPropertyServiceSpecificationMetricsList; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Available operation display property service specification model. */ +@Fluent +public final class AvailableOperationDisplayPropertyServiceSpecification { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(AvailableOperationDisplayPropertyServiceSpecification.class); + + /* + * The list of specification's service metrics + */ + @JsonProperty(value = "serviceSpecification") + private AvailableOperationDisplayPropertyServiceSpecificationMetricsList serviceSpecification; + + /** + * Get the serviceSpecification property: The list of specification's service metrics. + * + * @return the serviceSpecification value. + */ + public AvailableOperationDisplayPropertyServiceSpecificationMetricsList serviceSpecification() { + return this.serviceSpecification; + } + + /** + * Set the serviceSpecification property: The list of specification's service metrics. + * + * @param serviceSpecification the serviceSpecification value to set. + * @return the AvailableOperationDisplayPropertyServiceSpecification object itself. + */ + public AvailableOperationDisplayPropertyServiceSpecification withServiceSpecification( + AvailableOperationDisplayPropertyServiceSpecificationMetricsList serviceSpecification) { + this.serviceSpecification = serviceSpecification; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (serviceSpecification() != null) { + serviceSpecification().validate(); + } + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/AvailableOperationInner.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/AvailableOperationInner.java index 16ad5d87fcf7..560d4d44b634 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/AvailableOperationInner.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/AvailableOperationInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.vmwarecloudsimple.models.AvailableOperationDisplay; import com.azure.resourcemanager.vmwarecloudsimple.models.AvailableOperationDisplayPropertyServiceSpecificationMetricsList; @@ -14,9 +13,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** Resource provider available operation model. */ -@JsonFlatten @Fluent -public class AvailableOperationInner { +public final class AvailableOperationInner { @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableOperationInner.class); /* @@ -44,10 +42,10 @@ public class AvailableOperationInner { private OperationOrigin origin; /* - * The list of specification's service metrics + * The list of operation properties */ - @JsonProperty(value = "properties.serviceSpecification") - private AvailableOperationDisplayPropertyServiceSpecificationMetricsList serviceSpecification; + @JsonProperty(value = "properties") + private AvailableOperationDisplayPropertyServiceSpecification innerProperties; /** * Get the display property: The list of operations. @@ -129,13 +127,22 @@ public AvailableOperationInner withOrigin(OperationOrigin origin) { return this; } + /** + * Get the innerProperties property: The list of operation properties. + * + * @return the innerProperties value. + */ + private AvailableOperationDisplayPropertyServiceSpecification innerProperties() { + return this.innerProperties; + } + /** * Get the serviceSpecification property: The list of specification's service metrics. * * @return the serviceSpecification value. */ public AvailableOperationDisplayPropertyServiceSpecificationMetricsList serviceSpecification() { - return this.serviceSpecification; + return this.innerProperties() == null ? null : this.innerProperties().serviceSpecification(); } /** @@ -146,7 +153,10 @@ public AvailableOperationDisplayPropertyServiceSpecificationMetricsList serviceS */ public AvailableOperationInner withServiceSpecification( AvailableOperationDisplayPropertyServiceSpecificationMetricsList serviceSpecification) { - this.serviceSpecification = serviceSpecification; + if (this.innerProperties() == null) { + this.innerProperties = new AvailableOperationDisplayPropertyServiceSpecification(); + } + this.innerProperties().withServiceSpecification(serviceSpecification); return this; } @@ -159,8 +169,8 @@ public void validate() { if (display() != null) { display().validate(); } - if (serviceSpecification() != null) { - serviceSpecification().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/CustomizationPolicyInner.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/CustomizationPolicyInner.java index 47160de81c79..db46f48f94d8 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/CustomizationPolicyInner.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/CustomizationPolicyInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.vmwarecloudsimple.models.CustomizationPolicyPropertiesType; import com.azure.resourcemanager.vmwarecloudsimple.models.CustomizationSpecification; @@ -13,9 +12,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** The virtual machine customization policy. */ -@JsonFlatten @Fluent -public class CustomizationPolicyInner { +public final class CustomizationPolicyInner { @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomizationPolicyInner.class); /* @@ -37,40 +35,16 @@ public class CustomizationPolicyInner { private String name; /* - * The type property. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /* - * Policy description - */ - @JsonProperty(value = "properties.description") - private String description; - - /* - * The Private cloud id - */ - @JsonProperty(value = "properties.privateCloudId") - private String privateCloudId; - - /* - * Detailed customization policy specification - */ - @JsonProperty(value = "properties.specification") - private CustomizationSpecification specification; - - /* - * The type of customization (Linux or Windows) + * Customization Policy properties */ - @JsonProperty(value = "properties.type") - private CustomizationPolicyPropertiesType typePropertiesType; + @JsonProperty(value = "properties") + private CustomizationPolicyProperties innerProperties; /* - * Policy version + * The type property. */ - @JsonProperty(value = "properties.version") - private String version; + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; /** * Get the id property: Customization policy azure id. @@ -121,6 +95,15 @@ public String name() { return this.name; } + /** + * Get the innerProperties property: Customization Policy properties. + * + * @return the innerProperties value. + */ + private CustomizationPolicyProperties innerProperties() { + return this.innerProperties; + } + /** * Get the type property: The type property. * @@ -136,7 +119,7 @@ public String type() { * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -146,7 +129,10 @@ public String description() { * @return the CustomizationPolicyInner object itself. */ public CustomizationPolicyInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new CustomizationPolicyProperties(); + } + this.innerProperties().withDescription(description); return this; } @@ -156,7 +142,7 @@ public CustomizationPolicyInner withDescription(String description) { * @return the privateCloudId value. */ public String privateCloudId() { - return this.privateCloudId; + return this.innerProperties() == null ? null : this.innerProperties().privateCloudId(); } /** @@ -166,7 +152,10 @@ public String privateCloudId() { * @return the CustomizationPolicyInner object itself. */ public CustomizationPolicyInner withPrivateCloudId(String privateCloudId) { - this.privateCloudId = privateCloudId; + if (this.innerProperties() == null) { + this.innerProperties = new CustomizationPolicyProperties(); + } + this.innerProperties().withPrivateCloudId(privateCloudId); return this; } @@ -176,7 +165,7 @@ public CustomizationPolicyInner withPrivateCloudId(String privateCloudId) { * @return the specification value. */ public CustomizationSpecification specification() { - return this.specification; + return this.innerProperties() == null ? null : this.innerProperties().specification(); } /** @@ -186,27 +175,33 @@ public CustomizationSpecification specification() { * @return the CustomizationPolicyInner object itself. */ public CustomizationPolicyInner withSpecification(CustomizationSpecification specification) { - this.specification = specification; + if (this.innerProperties() == null) { + this.innerProperties = new CustomizationPolicyProperties(); + } + this.innerProperties().withSpecification(specification); return this; } /** - * Get the typePropertiesType property: The type of customization (Linux or Windows). + * Get the type property: The type of customization (Linux or Windows). * - * @return the typePropertiesType value. + * @return the type value. */ public CustomizationPolicyPropertiesType typePropertiesType() { - return this.typePropertiesType; + return this.innerProperties() == null ? null : this.innerProperties().type(); } /** - * Set the typePropertiesType property: The type of customization (Linux or Windows). + * Set the type property: The type of customization (Linux or Windows). * - * @param typePropertiesType the typePropertiesType value to set. + * @param type the type value to set. * @return the CustomizationPolicyInner object itself. */ - public CustomizationPolicyInner withTypePropertiesType(CustomizationPolicyPropertiesType typePropertiesType) { - this.typePropertiesType = typePropertiesType; + public CustomizationPolicyInner withTypePropertiesType(CustomizationPolicyPropertiesType type) { + if (this.innerProperties() == null) { + this.innerProperties = new CustomizationPolicyProperties(); + } + this.innerProperties().withType(type); return this; } @@ -216,7 +211,7 @@ public CustomizationPolicyInner withTypePropertiesType(CustomizationPolicyProper * @return the version value. */ public String version() { - return this.version; + return this.innerProperties() == null ? null : this.innerProperties().version(); } /** @@ -226,7 +221,10 @@ public String version() { * @return the CustomizationPolicyInner object itself. */ public CustomizationPolicyInner withVersion(String version) { - this.version = version; + if (this.innerProperties() == null) { + this.innerProperties = new CustomizationPolicyProperties(); + } + this.innerProperties().withVersion(version); return this; } @@ -236,8 +234,8 @@ public CustomizationPolicyInner withVersion(String version) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (specification() != null) { - specification().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/CustomizationPolicyProperties.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/CustomizationPolicyProperties.java new file mode 100644 index 000000000000..79c0f1df3847 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/CustomizationPolicyProperties.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.vmwarecloudsimple.models.CustomizationPolicyPropertiesType; +import com.azure.resourcemanager.vmwarecloudsimple.models.CustomizationSpecification; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of Customization policy. */ +@Fluent +public final class CustomizationPolicyProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomizationPolicyProperties.class); + + /* + * Policy description + */ + @JsonProperty(value = "description") + private String description; + + /* + * The Private cloud id + */ + @JsonProperty(value = "privateCloudId") + private String privateCloudId; + + /* + * Detailed customization policy specification + */ + @JsonProperty(value = "specification") + private CustomizationSpecification specification; + + /* + * The type of customization (Linux or Windows) + */ + @JsonProperty(value = "type") + private CustomizationPolicyPropertiesType type; + + /* + * Policy version + */ + @JsonProperty(value = "version") + private String version; + + /** + * Get the description property: Policy description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Policy description. + * + * @param description the description value to set. + * @return the CustomizationPolicyProperties object itself. + */ + public CustomizationPolicyProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the privateCloudId property: The Private cloud id. + * + * @return the privateCloudId value. + */ + public String privateCloudId() { + return this.privateCloudId; + } + + /** + * Set the privateCloudId property: The Private cloud id. + * + * @param privateCloudId the privateCloudId value to set. + * @return the CustomizationPolicyProperties object itself. + */ + public CustomizationPolicyProperties withPrivateCloudId(String privateCloudId) { + this.privateCloudId = privateCloudId; + return this; + } + + /** + * Get the specification property: Detailed customization policy specification. + * + * @return the specification value. + */ + public CustomizationSpecification specification() { + return this.specification; + } + + /** + * Set the specification property: Detailed customization policy specification. + * + * @param specification the specification value to set. + * @return the CustomizationPolicyProperties object itself. + */ + public CustomizationPolicyProperties withSpecification(CustomizationSpecification specification) { + this.specification = specification; + return this; + } + + /** + * Get the type property: The type of customization (Linux or Windows). + * + * @return the type value. + */ + public CustomizationPolicyPropertiesType type() { + return this.type; + } + + /** + * Set the type property: The type of customization (Linux or Windows). + * + * @param type the type value to set. + * @return the CustomizationPolicyProperties object itself. + */ + public CustomizationPolicyProperties withType(CustomizationPolicyPropertiesType type) { + this.type = type; + return this; + } + + /** + * Get the version property: Policy version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Policy version. + * + * @param version the version value to set. + * @return the CustomizationPolicyProperties object itself. + */ + public CustomizationPolicyProperties withVersion(String version) { + this.version = version; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (specification() != null) { + specification().validate(); + } + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/DedicatedCloudNodeInner.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/DedicatedCloudNodeInner.java index f0efa3c1717a..b328f4e0f062 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/DedicatedCloudNodeInner.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/DedicatedCloudNodeInner.java @@ -5,117 +5,41 @@ package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.vmwarecloudsimple.models.NodeStatus; import com.azure.resourcemanager.vmwarecloudsimple.models.Sku; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; import java.util.Map; import java.util.UUID; /** Dedicated cloud node model. */ -@JsonFlatten @Fluent -public class DedicatedCloudNodeInner extends Resource { +public final class DedicatedCloudNodeInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(DedicatedCloudNodeInner.class); /* - * Dedicated Cloud Nodes SKU - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * Availability Zone id, e.g. "az1" - */ - @JsonProperty(value = "properties.availabilityZoneId") - private String availabilityZoneId; - - /* - * Availability Zone name, e.g. "Availability Zone 1" - */ - @JsonProperty(value = "properties.availabilityZoneName", access = JsonProperty.Access.WRITE_ONLY) - private String availabilityZoneName; - - /* - * VMWare Cloud Rack Name - */ - @JsonProperty(value = "properties.cloudRackName", access = JsonProperty.Access.WRITE_ONLY) - private String cloudRackName; - - /* - * date time the resource was created - */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private Object created; - - /* - * count of nodes to create - */ - @JsonProperty(value = "properties.nodesCount") - private Integer nodesCount; - - /* - * Placement Group id, e.g. "n1" - */ - @JsonProperty(value = "properties.placementGroupId") - private String placementGroupId; - - /* - * Placement Name, e.g. "Placement Group 1" - */ - @JsonProperty(value = "properties.placementGroupName", access = JsonProperty.Access.WRITE_ONLY) - private String placementGroupName; - - /* - * Private Cloud Id - */ - @JsonProperty(value = "properties.privateCloudId", access = JsonProperty.Access.WRITE_ONLY) - private String privateCloudId; - - /* - * Resource Pool Name - */ - @JsonProperty(value = "properties.privateCloudName", access = JsonProperty.Access.WRITE_ONLY) - private String privateCloudName; - - /* - * The provisioning status of the resource - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /* - * purchase id - */ - @JsonProperty(value = "properties.purchaseId") - private UUID purchaseId; - - /* - * Node status, indicates is private cloud set up on this node or not - */ - @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) - private NodeStatus status; - - /* - * VMWare Cluster Name + * Dedicated Cloud Nodes properties */ - @JsonProperty(value = "properties.vmwareClusterName", access = JsonProperty.Access.WRITE_ONLY) - private String vmwareClusterName; + @JsonProperty(value = "properties") + private DedicatedCloudNodeProperties innerProperties; /* - * SKU's id + * Dedicated Cloud Nodes SKU */ - @JsonProperty(value = "properties.skuDescription.id") - private String idPropertiesSkuDescriptionId; + @JsonProperty(value = "sku") + private Sku sku; - /* - * SKU's name + /** + * Get the innerProperties property: Dedicated Cloud Nodes properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.skuDescription.name") - private String namePropertiesSkuDescriptionName; + private DedicatedCloudNodeProperties innerProperties() { + return this.innerProperties; + } /** * Get the sku property: Dedicated Cloud Nodes SKU. @@ -137,13 +61,27 @@ public DedicatedCloudNodeInner withSku(Sku sku) { return this; } + /** {@inheritDoc} */ + @Override + public DedicatedCloudNodeInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public DedicatedCloudNodeInner withTags(Map tags) { + super.withTags(tags); + return this; + } + /** * Get the availabilityZoneId property: Availability Zone id, e.g. "az1". * * @return the availabilityZoneId value. */ public String availabilityZoneId() { - return this.availabilityZoneId; + return this.innerProperties() == null ? null : this.innerProperties().availabilityZoneId(); } /** @@ -153,7 +91,10 @@ public String availabilityZoneId() { * @return the DedicatedCloudNodeInner object itself. */ public DedicatedCloudNodeInner withAvailabilityZoneId(String availabilityZoneId) { - this.availabilityZoneId = availabilityZoneId; + if (this.innerProperties() == null) { + this.innerProperties = new DedicatedCloudNodeProperties(); + } + this.innerProperties().withAvailabilityZoneId(availabilityZoneId); return this; } @@ -163,7 +104,7 @@ public DedicatedCloudNodeInner withAvailabilityZoneId(String availabilityZoneId) * @return the availabilityZoneName value. */ public String availabilityZoneName() { - return this.availabilityZoneName; + return this.innerProperties() == null ? null : this.innerProperties().availabilityZoneName(); } /** @@ -172,7 +113,7 @@ public String availabilityZoneName() { * @return the cloudRackName value. */ public String cloudRackName() { - return this.cloudRackName; + return this.innerProperties() == null ? null : this.innerProperties().cloudRackName(); } /** @@ -180,8 +121,8 @@ public String cloudRackName() { * * @return the created value. */ - public Object created() { - return this.created; + public OffsetDateTime created() { + return this.innerProperties() == null ? null : this.innerProperties().created(); } /** @@ -190,7 +131,7 @@ public Object created() { * @return the nodesCount value. */ public Integer nodesCount() { - return this.nodesCount; + return this.innerProperties() == null ? null : this.innerProperties().nodesCount(); } /** @@ -200,7 +141,10 @@ public Integer nodesCount() { * @return the DedicatedCloudNodeInner object itself. */ public DedicatedCloudNodeInner withNodesCount(Integer nodesCount) { - this.nodesCount = nodesCount; + if (this.innerProperties() == null) { + this.innerProperties = new DedicatedCloudNodeProperties(); + } + this.innerProperties().withNodesCount(nodesCount); return this; } @@ -210,7 +154,7 @@ public DedicatedCloudNodeInner withNodesCount(Integer nodesCount) { * @return the placementGroupId value. */ public String placementGroupId() { - return this.placementGroupId; + return this.innerProperties() == null ? null : this.innerProperties().placementGroupId(); } /** @@ -220,7 +164,10 @@ public String placementGroupId() { * @return the DedicatedCloudNodeInner object itself. */ public DedicatedCloudNodeInner withPlacementGroupId(String placementGroupId) { - this.placementGroupId = placementGroupId; + if (this.innerProperties() == null) { + this.innerProperties = new DedicatedCloudNodeProperties(); + } + this.innerProperties().withPlacementGroupId(placementGroupId); return this; } @@ -230,7 +177,7 @@ public DedicatedCloudNodeInner withPlacementGroupId(String placementGroupId) { * @return the placementGroupName value. */ public String placementGroupName() { - return this.placementGroupName; + return this.innerProperties() == null ? null : this.innerProperties().placementGroupName(); } /** @@ -239,7 +186,7 @@ public String placementGroupName() { * @return the privateCloudId value. */ public String privateCloudId() { - return this.privateCloudId; + return this.innerProperties() == null ? null : this.innerProperties().privateCloudId(); } /** @@ -248,7 +195,7 @@ public String privateCloudId() { * @return the privateCloudName value. */ public String privateCloudName() { - return this.privateCloudName; + return this.innerProperties() == null ? null : this.innerProperties().privateCloudName(); } /** @@ -257,7 +204,7 @@ public String privateCloudName() { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -266,7 +213,7 @@ public String provisioningState() { * @return the purchaseId value. */ public UUID purchaseId() { - return this.purchaseId; + return this.innerProperties() == null ? null : this.innerProperties().purchaseId(); } /** @@ -276,7 +223,10 @@ public UUID purchaseId() { * @return the DedicatedCloudNodeInner object itself. */ public DedicatedCloudNodeInner withPurchaseId(UUID purchaseId) { - this.purchaseId = purchaseId; + if (this.innerProperties() == null) { + this.innerProperties = new DedicatedCloudNodeProperties(); + } + this.innerProperties().withPurchaseId(purchaseId); return this; } @@ -286,7 +236,7 @@ public DedicatedCloudNodeInner withPurchaseId(UUID purchaseId) { * @return the status value. */ public NodeStatus status() { - return this.status; + return this.innerProperties() == null ? null : this.innerProperties().status(); } /** @@ -295,60 +245,52 @@ public NodeStatus status() { * @return the vmwareClusterName value. */ public String vmwareClusterName() { - return this.vmwareClusterName; + return this.innerProperties() == null ? null : this.innerProperties().vmwareClusterName(); } /** - * Get the idPropertiesSkuDescriptionId property: SKU's id. + * Get the id property: SKU's id. * - * @return the idPropertiesSkuDescriptionId value. + * @return the id value. */ - public String idPropertiesSkuDescriptionId() { - return this.idPropertiesSkuDescriptionId; + public String idPropertiesId() { + return this.innerProperties() == null ? null : this.innerProperties().id(); } /** - * Set the idPropertiesSkuDescriptionId property: SKU's id. + * Set the id property: SKU's id. * - * @param idPropertiesSkuDescriptionId the idPropertiesSkuDescriptionId value to set. + * @param id the id value to set. * @return the DedicatedCloudNodeInner object itself. */ - public DedicatedCloudNodeInner withIdPropertiesSkuDescriptionId(String idPropertiesSkuDescriptionId) { - this.idPropertiesSkuDescriptionId = idPropertiesSkuDescriptionId; + public DedicatedCloudNodeInner withIdPropertiesId(String id) { + if (this.innerProperties() == null) { + this.innerProperties = new DedicatedCloudNodeProperties(); + } + this.innerProperties().withId(id); return this; } /** - * Get the namePropertiesSkuDescriptionName property: SKU's name. + * Get the name property: SKU's name. * - * @return the namePropertiesSkuDescriptionName value. + * @return the name value. */ - public String namePropertiesSkuDescriptionName() { - return this.namePropertiesSkuDescriptionName; + public String namePropertiesName() { + return this.innerProperties() == null ? null : this.innerProperties().name(); } /** - * Set the namePropertiesSkuDescriptionName property: SKU's name. + * Set the name property: SKU's name. * - * @param namePropertiesSkuDescriptionName the namePropertiesSkuDescriptionName value to set. + * @param name the name value to set. * @return the DedicatedCloudNodeInner object itself. */ - public DedicatedCloudNodeInner withNamePropertiesSkuDescriptionName(String namePropertiesSkuDescriptionName) { - this.namePropertiesSkuDescriptionName = namePropertiesSkuDescriptionName; - return this; - } - - /** {@inheritDoc} */ - @Override - public DedicatedCloudNodeInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public DedicatedCloudNodeInner withTags(Map tags) { - super.withTags(tags); + public DedicatedCloudNodeInner withNamePropertiesName(String name) { + if (this.innerProperties() == null) { + this.innerProperties = new DedicatedCloudNodeProperties(); + } + this.innerProperties().withName(name); return this; } @@ -358,6 +300,9 @@ public DedicatedCloudNodeInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } if (sku() != null) { sku().validate(); } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/DedicatedCloudNodeProperties.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/DedicatedCloudNodeProperties.java new file mode 100644 index 000000000000..bf0f042ba680 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/DedicatedCloudNodeProperties.java @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.vmwarecloudsimple.models.NodeStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.UUID; + +/** Properties of dedicated cloud node. */ +@Fluent +public final class DedicatedCloudNodeProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DedicatedCloudNodeProperties.class); + + /* + * Availability Zone id, e.g. "az1" + */ + @JsonProperty(value = "availabilityZoneId", required = true) + private String availabilityZoneId; + + /* + * Availability Zone name, e.g. "Availability Zone 1" + */ + @JsonProperty(value = "availabilityZoneName", access = JsonProperty.Access.WRITE_ONLY) + private String availabilityZoneName; + + /* + * VMWare Cloud Rack Name + */ + @JsonProperty(value = "cloudRackName", access = JsonProperty.Access.WRITE_ONLY) + private String cloudRackName; + + /* + * date time the resource was created + */ + @JsonProperty(value = "created", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime created; + + /* + * count of nodes to create + */ + @JsonProperty(value = "nodesCount", required = true) + private int nodesCount; + + /* + * Placement Group id, e.g. "n1" + */ + @JsonProperty(value = "placementGroupId", required = true) + private String placementGroupId; + + /* + * Placement Name, e.g. "Placement Group 1" + */ + @JsonProperty(value = "placementGroupName", access = JsonProperty.Access.WRITE_ONLY) + private String placementGroupName; + + /* + * Private Cloud Id + */ + @JsonProperty(value = "privateCloudId", access = JsonProperty.Access.WRITE_ONLY) + private String privateCloudId; + + /* + * Resource Pool Name + */ + @JsonProperty(value = "privateCloudName", access = JsonProperty.Access.WRITE_ONLY) + private String privateCloudName; + + /* + * The provisioning status of the resource + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * purchase id + */ + @JsonProperty(value = "purchaseId", required = true) + private UUID purchaseId; + + /* + * Dedicated Cloud Nodes SKU's description + */ + @JsonProperty(value = "skuDescription") + private SkuDescription innerSkuDescription; + + /* + * Node status, indicates is private cloud set up on this node or not + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private NodeStatus status; + + /* + * VMWare Cluster Name + */ + @JsonProperty(value = "vmwareClusterName", access = JsonProperty.Access.WRITE_ONLY) + private String vmwareClusterName; + + /** + * Get the availabilityZoneId property: Availability Zone id, e.g. "az1". + * + * @return the availabilityZoneId value. + */ + public String availabilityZoneId() { + return this.availabilityZoneId; + } + + /** + * Set the availabilityZoneId property: Availability Zone id, e.g. "az1". + * + * @param availabilityZoneId the availabilityZoneId value to set. + * @return the DedicatedCloudNodeProperties object itself. + */ + public DedicatedCloudNodeProperties withAvailabilityZoneId(String availabilityZoneId) { + this.availabilityZoneId = availabilityZoneId; + return this; + } + + /** + * Get the availabilityZoneName property: Availability Zone name, e.g. "Availability Zone 1". + * + * @return the availabilityZoneName value. + */ + public String availabilityZoneName() { + return this.availabilityZoneName; + } + + /** + * Get the cloudRackName property: VMWare Cloud Rack Name. + * + * @return the cloudRackName value. + */ + public String cloudRackName() { + return this.cloudRackName; + } + + /** + * Get the created property: date time the resource was created. + * + * @return the created value. + */ + public OffsetDateTime created() { + return this.created; + } + + /** + * Get the nodesCount property: count of nodes to create. + * + * @return the nodesCount value. + */ + public int nodesCount() { + return this.nodesCount; + } + + /** + * Set the nodesCount property: count of nodes to create. + * + * @param nodesCount the nodesCount value to set. + * @return the DedicatedCloudNodeProperties object itself. + */ + public DedicatedCloudNodeProperties withNodesCount(int nodesCount) { + this.nodesCount = nodesCount; + return this; + } + + /** + * Get the placementGroupId property: Placement Group id, e.g. "n1". + * + * @return the placementGroupId value. + */ + public String placementGroupId() { + return this.placementGroupId; + } + + /** + * Set the placementGroupId property: Placement Group id, e.g. "n1". + * + * @param placementGroupId the placementGroupId value to set. + * @return the DedicatedCloudNodeProperties object itself. + */ + public DedicatedCloudNodeProperties withPlacementGroupId(String placementGroupId) { + this.placementGroupId = placementGroupId; + return this; + } + + /** + * Get the placementGroupName property: Placement Name, e.g. "Placement Group 1". + * + * @return the placementGroupName value. + */ + public String placementGroupName() { + return this.placementGroupName; + } + + /** + * Get the privateCloudId property: Private Cloud Id. + * + * @return the privateCloudId value. + */ + public String privateCloudId() { + return this.privateCloudId; + } + + /** + * Get the privateCloudName property: Resource Pool Name. + * + * @return the privateCloudName value. + */ + public String privateCloudName() { + return this.privateCloudName; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the purchaseId property: purchase id. + * + * @return the purchaseId value. + */ + public UUID purchaseId() { + return this.purchaseId; + } + + /** + * Set the purchaseId property: purchase id. + * + * @param purchaseId the purchaseId value to set. + * @return the DedicatedCloudNodeProperties object itself. + */ + public DedicatedCloudNodeProperties withPurchaseId(UUID purchaseId) { + this.purchaseId = purchaseId; + return this; + } + + /** + * Get the innerSkuDescription property: Dedicated Cloud Nodes SKU's description. + * + * @return the innerSkuDescription value. + */ + private SkuDescription innerSkuDescription() { + return this.innerSkuDescription; + } + + /** + * Get the status property: Node status, indicates is private cloud set up on this node or not. + * + * @return the status value. + */ + public NodeStatus status() { + return this.status; + } + + /** + * Get the vmwareClusterName property: VMWare Cluster Name. + * + * @return the vmwareClusterName value. + */ + public String vmwareClusterName() { + return this.vmwareClusterName; + } + + /** + * Get the id property: SKU's id. + * + * @return the id value. + */ + public String id() { + return this.innerSkuDescription() == null ? null : this.innerSkuDescription().id(); + } + + /** + * Set the id property: SKU's id. + * + * @param id the id value to set. + * @return the DedicatedCloudNodeProperties object itself. + */ + public DedicatedCloudNodeProperties withId(String id) { + if (this.innerSkuDescription() == null) { + this.innerSkuDescription = new SkuDescription(); + } + this.innerSkuDescription().withId(id); + return this; + } + + /** + * Get the name property: SKU's name. + * + * @return the name value. + */ + public String name() { + return this.innerSkuDescription() == null ? null : this.innerSkuDescription().name(); + } + + /** + * Set the name property: SKU's name. + * + * @param name the name value to set. + * @return the DedicatedCloudNodeProperties object itself. + */ + public DedicatedCloudNodeProperties withName(String name) { + if (this.innerSkuDescription() == null) { + this.innerSkuDescription = new SkuDescription(); + } + this.innerSkuDescription().withName(name); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (availabilityZoneId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property availabilityZoneId in model DedicatedCloudNodeProperties")); + } + if (placementGroupId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property placementGroupId in model DedicatedCloudNodeProperties")); + } + if (purchaseId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property purchaseId in model DedicatedCloudNodeProperties")); + } + if (innerSkuDescription() != null) { + innerSkuDescription().validate(); + } + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/DedicatedCloudServiceInner.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/DedicatedCloudServiceInner.java index b30533d8f74e..81560db2833c 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/DedicatedCloudServiceInner.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/DedicatedCloudServiceInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.vmwarecloudsimple.models.OnboardingStatus; @@ -14,35 +13,38 @@ import java.util.Map; /** Dedicated cloud service model. */ -@JsonFlatten @Fluent -public class DedicatedCloudServiceInner extends Resource { +public final class DedicatedCloudServiceInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(DedicatedCloudServiceInner.class); /* - * gateway Subnet for the account. It will collect the subnet address and - * always treat it as /28 + * The properties of Dedicated Node Service */ - @JsonProperty(value = "properties.gatewaySubnet") - private String gatewaySubnet; + @JsonProperty(value = "properties") + private DedicatedCloudServiceProperties innerProperties; - /* - * indicates whether account onboarded or not in a given region + /** + * Get the innerProperties property: The properties of Dedicated Node Service. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.isAccountOnboarded", access = JsonProperty.Access.WRITE_ONLY) - private OnboardingStatus isAccountOnboarded; + private DedicatedCloudServiceProperties innerProperties() { + return this.innerProperties; + } - /* - * total nodes purchased - */ - @JsonProperty(value = "properties.nodes", access = JsonProperty.Access.WRITE_ONLY) - private Integer nodes; + /** {@inheritDoc} */ + @Override + public DedicatedCloudServiceInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * link to a service management web portal - */ - @JsonProperty(value = "properties.serviceURL", access = JsonProperty.Access.WRITE_ONLY) - private String serviceUrl; + /** {@inheritDoc} */ + @Override + public DedicatedCloudServiceInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the gatewaySubnet property: gateway Subnet for the account. It will collect the subnet address and always @@ -51,7 +53,7 @@ public class DedicatedCloudServiceInner extends Resource { * @return the gatewaySubnet value. */ public String gatewaySubnet() { - return this.gatewaySubnet; + return this.innerProperties() == null ? null : this.innerProperties().gatewaySubnet(); } /** @@ -62,7 +64,10 @@ public String gatewaySubnet() { * @return the DedicatedCloudServiceInner object itself. */ public DedicatedCloudServiceInner withGatewaySubnet(String gatewaySubnet) { - this.gatewaySubnet = gatewaySubnet; + if (this.innerProperties() == null) { + this.innerProperties = new DedicatedCloudServiceProperties(); + } + this.innerProperties().withGatewaySubnet(gatewaySubnet); return this; } @@ -72,7 +77,7 @@ public DedicatedCloudServiceInner withGatewaySubnet(String gatewaySubnet) { * @return the isAccountOnboarded value. */ public OnboardingStatus isAccountOnboarded() { - return this.isAccountOnboarded; + return this.innerProperties() == null ? null : this.innerProperties().isAccountOnboarded(); } /** @@ -81,7 +86,7 @@ public OnboardingStatus isAccountOnboarded() { * @return the nodes value. */ public Integer nodes() { - return this.nodes; + return this.innerProperties() == null ? null : this.innerProperties().nodes(); } /** @@ -90,21 +95,7 @@ public Integer nodes() { * @return the serviceUrl value. */ public String serviceUrl() { - return this.serviceUrl; - } - - /** {@inheritDoc} */ - @Override - public DedicatedCloudServiceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public DedicatedCloudServiceInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().serviceUrl(); } /** @@ -113,5 +104,8 @@ public DedicatedCloudServiceInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/DedicatedCloudServiceProperties.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/DedicatedCloudServiceProperties.java new file mode 100644 index 000000000000..8ddaeb695a09 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/DedicatedCloudServiceProperties.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.vmwarecloudsimple.models.OnboardingStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of dedicated cloud service. */ +@Fluent +public final class DedicatedCloudServiceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DedicatedCloudServiceProperties.class); + + /* + * gateway Subnet for the account. It will collect the subnet address and + * always treat it as /28 + */ + @JsonProperty(value = "gatewaySubnet", required = true) + private String gatewaySubnet; + + /* + * indicates whether account onboarded or not in a given region + */ + @JsonProperty(value = "isAccountOnboarded", access = JsonProperty.Access.WRITE_ONLY) + private OnboardingStatus isAccountOnboarded; + + /* + * total nodes purchased + */ + @JsonProperty(value = "nodes", access = JsonProperty.Access.WRITE_ONLY) + private Integer nodes; + + /* + * link to a service management web portal + */ + @JsonProperty(value = "serviceURL", access = JsonProperty.Access.WRITE_ONLY) + private String serviceUrl; + + /** + * Get the gatewaySubnet property: gateway Subnet for the account. It will collect the subnet address and always + * treat it as /28. + * + * @return the gatewaySubnet value. + */ + public String gatewaySubnet() { + return this.gatewaySubnet; + } + + /** + * Set the gatewaySubnet property: gateway Subnet for the account. It will collect the subnet address and always + * treat it as /28. + * + * @param gatewaySubnet the gatewaySubnet value to set. + * @return the DedicatedCloudServiceProperties object itself. + */ + public DedicatedCloudServiceProperties withGatewaySubnet(String gatewaySubnet) { + this.gatewaySubnet = gatewaySubnet; + return this; + } + + /** + * Get the isAccountOnboarded property: indicates whether account onboarded or not in a given region. + * + * @return the isAccountOnboarded value. + */ + public OnboardingStatus isAccountOnboarded() { + return this.isAccountOnboarded; + } + + /** + * Get the nodes property: total nodes purchased. + * + * @return the nodes value. + */ + public Integer nodes() { + return this.nodes; + } + + /** + * Get the serviceUrl property: link to a service management web portal. + * + * @return the serviceUrl value. + */ + public String serviceUrl() { + return this.serviceUrl; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (gatewaySubnet() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property gatewaySubnet in model DedicatedCloudServiceProperties")); + } + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/PrivateCloudInner.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/PrivateCloudInner.java index 73f7fcaea601..499fb5113353 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/PrivateCloudInner.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/PrivateCloudInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.vmwarecloudsimple.models.PrivateCloudResourceType; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -15,9 +14,8 @@ import java.util.UUID; /** Private cloud model. */ -@JsonFlatten @Fluent -public class PrivateCloudInner { +public final class PrivateCloudInner { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateCloudInner.class); /* @@ -41,154 +39,16 @@ public class PrivateCloudInner { private String name; /* - * Azure Resource type - */ - @JsonProperty(value = "type") - private PrivateCloudResourceType type; - - /* - * Availability Zone id, e.g. "az1" - */ - @JsonProperty(value = "properties.availabilityZoneId") - private String availabilityZoneId; - - /* - * Availability Zone name, e.g. "Availability Zone 1" - */ - @JsonProperty(value = "properties.availabilityZoneName") - private String availabilityZoneName; - - /* - * Number of clusters - */ - @JsonProperty(value = "properties.clustersNumber") - private Integer clustersNumber; - - /* - * User's emails who created cloud - */ - @JsonProperty(value = "properties.createdBy") - private String createdBy; - - /* - * When private cloud was created - */ - @JsonProperty(value = "properties.createdOn") - private OffsetDateTime createdOn; - - /* - * Array of DNS servers - */ - @JsonProperty(value = "properties.dnsServers") - private List dnsServers; - - /* - * Expiration date of PC - */ - @JsonProperty(value = "properties.expires") - private String expires; - - /* - * Nsx Type, e.g. "Advanced" - */ - @JsonProperty(value = "properties.nsxType") - private String nsxType; - - /* - * Placement Group id, e.g. "n1" - */ - @JsonProperty(value = "properties.placementGroupId") - private String placementGroupId; - - /* - * Placement Group name - */ - @JsonProperty(value = "properties.placementGroupName") - private String placementGroupName; - - /* - * Id of a private cloud - */ - @JsonProperty(value = "properties.privateCloudId") - private UUID privateCloudId; - - /* - * The list of Resource Pools - */ - @JsonProperty(value = "properties.resourcePools") - private List resourcePools; - - /* - * Private Cloud state, e.g. "operational" - */ - @JsonProperty(value = "properties.state") - private String state; - - /* - * Number of cores - */ - @JsonProperty(value = "properties.totalCpuCores") - private Integer totalCpuCores; - - /* - * Number of nodes - */ - @JsonProperty(value = "properties.totalNodes") - private Integer totalNodes; - - /* - * Memory size - */ - @JsonProperty(value = "properties.totalRam") - private Integer totalRam; - - /* - * Disk space in TB + * Private cloud properties */ - @JsonProperty(value = "properties.totalStorage") - private Float totalStorage; + @JsonProperty(value = "properties") + private PrivateCloudProperties innerProperties; /* - * Virtualization type e.g. "vSphere" - */ - @JsonProperty(value = "properties.type") - private String typePropertiesType; - - /* - * e.g. "6.5u2" - */ - @JsonProperty(value = "properties.vSphereVersion") - private String vSphereVersion; - - /* - * FQDN for vcenter access - */ - @JsonProperty(value = "properties.vcenterFqdn") - private String vcenterFqdn; - - /* - * Vcenter ip address - */ - @JsonProperty(value = "properties.vcenterRefid") - private String vcenterRefid; - - /* - * The list of Virtual Machine Templates - */ - @JsonProperty(value = "properties.virtualMachineTemplates") - private List virtualMachineTemplates; - - /* - * The list of Virtual Networks - */ - @JsonProperty(value = "properties.virtualNetworks") - private List virtualNetworks; - - /* - * Is Vrops enabled/disabled + * Azure Resource type */ - @JsonProperty(value = "properties.vrOpsEnabled") - private Boolean vrOpsEnabled; + @JsonProperty(value = "type") + private PrivateCloudResourceType type; /** * Get the id property: Azure Id, e.g. @@ -254,6 +114,15 @@ public PrivateCloudInner withName(String name) { return this; } + /** + * Get the innerProperties property: Private cloud properties. + * + * @return the innerProperties value. + */ + private PrivateCloudProperties innerProperties() { + return this.innerProperties; + } + /** * Get the type property: Azure Resource type. * @@ -280,7 +149,7 @@ public PrivateCloudInner withType(PrivateCloudResourceType type) { * @return the availabilityZoneId value. */ public String availabilityZoneId() { - return this.availabilityZoneId; + return this.innerProperties() == null ? null : this.innerProperties().availabilityZoneId(); } /** @@ -290,7 +159,10 @@ public String availabilityZoneId() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withAvailabilityZoneId(String availabilityZoneId) { - this.availabilityZoneId = availabilityZoneId; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withAvailabilityZoneId(availabilityZoneId); return this; } @@ -300,7 +172,7 @@ public PrivateCloudInner withAvailabilityZoneId(String availabilityZoneId) { * @return the availabilityZoneName value. */ public String availabilityZoneName() { - return this.availabilityZoneName; + return this.innerProperties() == null ? null : this.innerProperties().availabilityZoneName(); } /** @@ -310,7 +182,10 @@ public String availabilityZoneName() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withAvailabilityZoneName(String availabilityZoneName) { - this.availabilityZoneName = availabilityZoneName; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withAvailabilityZoneName(availabilityZoneName); return this; } @@ -320,7 +195,7 @@ public PrivateCloudInner withAvailabilityZoneName(String availabilityZoneName) { * @return the clustersNumber value. */ public Integer clustersNumber() { - return this.clustersNumber; + return this.innerProperties() == null ? null : this.innerProperties().clustersNumber(); } /** @@ -330,7 +205,10 @@ public Integer clustersNumber() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withClustersNumber(Integer clustersNumber) { - this.clustersNumber = clustersNumber; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withClustersNumber(clustersNumber); return this; } @@ -340,7 +218,7 @@ public PrivateCloudInner withClustersNumber(Integer clustersNumber) { * @return the createdBy value. */ public String createdBy() { - return this.createdBy; + return this.innerProperties() == null ? null : this.innerProperties().createdBy(); } /** @@ -350,7 +228,10 @@ public String createdBy() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withCreatedBy(String createdBy) { - this.createdBy = createdBy; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withCreatedBy(createdBy); return this; } @@ -360,7 +241,7 @@ public PrivateCloudInner withCreatedBy(String createdBy) { * @return the createdOn value. */ public OffsetDateTime createdOn() { - return this.createdOn; + return this.innerProperties() == null ? null : this.innerProperties().createdOn(); } /** @@ -370,7 +251,10 @@ public OffsetDateTime createdOn() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withCreatedOn(OffsetDateTime createdOn) { - this.createdOn = createdOn; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withCreatedOn(createdOn); return this; } @@ -380,7 +264,7 @@ public PrivateCloudInner withCreatedOn(OffsetDateTime createdOn) { * @return the dnsServers value. */ public List dnsServers() { - return this.dnsServers; + return this.innerProperties() == null ? null : this.innerProperties().dnsServers(); } /** @@ -390,7 +274,10 @@ public List dnsServers() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withDnsServers(List dnsServers) { - this.dnsServers = dnsServers; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withDnsServers(dnsServers); return this; } @@ -400,7 +287,7 @@ public PrivateCloudInner withDnsServers(List dnsServers) { * @return the expires value. */ public String expires() { - return this.expires; + return this.innerProperties() == null ? null : this.innerProperties().expires(); } /** @@ -410,7 +297,10 @@ public String expires() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withExpires(String expires) { - this.expires = expires; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withExpires(expires); return this; } @@ -420,7 +310,7 @@ public PrivateCloudInner withExpires(String expires) { * @return the nsxType value. */ public String nsxType() { - return this.nsxType; + return this.innerProperties() == null ? null : this.innerProperties().nsxType(); } /** @@ -430,7 +320,10 @@ public String nsxType() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withNsxType(String nsxType) { - this.nsxType = nsxType; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withNsxType(nsxType); return this; } @@ -440,7 +333,7 @@ public PrivateCloudInner withNsxType(String nsxType) { * @return the placementGroupId value. */ public String placementGroupId() { - return this.placementGroupId; + return this.innerProperties() == null ? null : this.innerProperties().placementGroupId(); } /** @@ -450,7 +343,10 @@ public String placementGroupId() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withPlacementGroupId(String placementGroupId) { - this.placementGroupId = placementGroupId; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withPlacementGroupId(placementGroupId); return this; } @@ -460,7 +356,7 @@ public PrivateCloudInner withPlacementGroupId(String placementGroupId) { * @return the placementGroupName value. */ public String placementGroupName() { - return this.placementGroupName; + return this.innerProperties() == null ? null : this.innerProperties().placementGroupName(); } /** @@ -470,7 +366,10 @@ public String placementGroupName() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withPlacementGroupName(String placementGroupName) { - this.placementGroupName = placementGroupName; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withPlacementGroupName(placementGroupName); return this; } @@ -480,7 +379,7 @@ public PrivateCloudInner withPlacementGroupName(String placementGroupName) { * @return the privateCloudId value. */ public UUID privateCloudId() { - return this.privateCloudId; + return this.innerProperties() == null ? null : this.innerProperties().privateCloudId(); } /** @@ -490,7 +389,10 @@ public UUID privateCloudId() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withPrivateCloudId(UUID privateCloudId) { - this.privateCloudId = privateCloudId; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withPrivateCloudId(privateCloudId); return this; } @@ -500,7 +402,7 @@ public PrivateCloudInner withPrivateCloudId(UUID privateCloudId) { * @return the resourcePools value. */ public List resourcePools() { - return this.resourcePools; + return this.innerProperties() == null ? null : this.innerProperties().resourcePools(); } /** @@ -510,7 +412,10 @@ public List resourcePools() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withResourcePools(List resourcePools) { - this.resourcePools = resourcePools; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withResourcePools(resourcePools); return this; } @@ -520,7 +425,7 @@ public PrivateCloudInner withResourcePools(List resourcePools * @return the state value. */ public String state() { - return this.state; + return this.innerProperties() == null ? null : this.innerProperties().state(); } /** @@ -530,7 +435,10 @@ public String state() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withState(String state) { - this.state = state; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withState(state); return this; } @@ -540,7 +448,7 @@ public PrivateCloudInner withState(String state) { * @return the totalCpuCores value. */ public Integer totalCpuCores() { - return this.totalCpuCores; + return this.innerProperties() == null ? null : this.innerProperties().totalCpuCores(); } /** @@ -550,7 +458,10 @@ public Integer totalCpuCores() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withTotalCpuCores(Integer totalCpuCores) { - this.totalCpuCores = totalCpuCores; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withTotalCpuCores(totalCpuCores); return this; } @@ -560,7 +471,7 @@ public PrivateCloudInner withTotalCpuCores(Integer totalCpuCores) { * @return the totalNodes value. */ public Integer totalNodes() { - return this.totalNodes; + return this.innerProperties() == null ? null : this.innerProperties().totalNodes(); } /** @@ -570,7 +481,10 @@ public Integer totalNodes() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withTotalNodes(Integer totalNodes) { - this.totalNodes = totalNodes; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withTotalNodes(totalNodes); return this; } @@ -580,7 +494,7 @@ public PrivateCloudInner withTotalNodes(Integer totalNodes) { * @return the totalRam value. */ public Integer totalRam() { - return this.totalRam; + return this.innerProperties() == null ? null : this.innerProperties().totalRam(); } /** @@ -590,7 +504,10 @@ public Integer totalRam() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withTotalRam(Integer totalRam) { - this.totalRam = totalRam; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withTotalRam(totalRam); return this; } @@ -600,7 +517,7 @@ public PrivateCloudInner withTotalRam(Integer totalRam) { * @return the totalStorage value. */ public Float totalStorage() { - return this.totalStorage; + return this.innerProperties() == null ? null : this.innerProperties().totalStorage(); } /** @@ -610,27 +527,33 @@ public Float totalStorage() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withTotalStorage(Float totalStorage) { - this.totalStorage = totalStorage; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withTotalStorage(totalStorage); return this; } /** - * Get the typePropertiesType property: Virtualization type e.g. "vSphere". + * Get the type property: Virtualization type e.g. "vSphere". * - * @return the typePropertiesType value. + * @return the type value. */ public String typePropertiesType() { - return this.typePropertiesType; + return this.innerProperties() == null ? null : this.innerProperties().type(); } /** - * Set the typePropertiesType property: Virtualization type e.g. "vSphere". + * Set the type property: Virtualization type e.g. "vSphere". * - * @param typePropertiesType the typePropertiesType value to set. + * @param type the type value to set. * @return the PrivateCloudInner object itself. */ - public PrivateCloudInner withTypePropertiesType(String typePropertiesType) { - this.typePropertiesType = typePropertiesType; + public PrivateCloudInner withTypePropertiesType(String type) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withType(type); return this; } @@ -640,7 +563,7 @@ public PrivateCloudInner withTypePropertiesType(String typePropertiesType) { * @return the vSphereVersion value. */ public String vSphereVersion() { - return this.vSphereVersion; + return this.innerProperties() == null ? null : this.innerProperties().vSphereVersion(); } /** @@ -650,7 +573,10 @@ public String vSphereVersion() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withVSphereVersion(String vSphereVersion) { - this.vSphereVersion = vSphereVersion; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withVSphereVersion(vSphereVersion); return this; } @@ -660,7 +586,7 @@ public PrivateCloudInner withVSphereVersion(String vSphereVersion) { * @return the vcenterFqdn value. */ public String vcenterFqdn() { - return this.vcenterFqdn; + return this.innerProperties() == null ? null : this.innerProperties().vcenterFqdn(); } /** @@ -670,7 +596,10 @@ public String vcenterFqdn() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withVcenterFqdn(String vcenterFqdn) { - this.vcenterFqdn = vcenterFqdn; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withVcenterFqdn(vcenterFqdn); return this; } @@ -680,7 +609,7 @@ public PrivateCloudInner withVcenterFqdn(String vcenterFqdn) { * @return the vcenterRefid value. */ public String vcenterRefid() { - return this.vcenterRefid; + return this.innerProperties() == null ? null : this.innerProperties().vcenterRefid(); } /** @@ -690,7 +619,10 @@ public String vcenterRefid() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withVcenterRefid(String vcenterRefid) { - this.vcenterRefid = vcenterRefid; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withVcenterRefid(vcenterRefid); return this; } @@ -700,7 +632,7 @@ public PrivateCloudInner withVcenterRefid(String vcenterRefid) { * @return the virtualMachineTemplates value. */ public List virtualMachineTemplates() { - return this.virtualMachineTemplates; + return this.innerProperties() == null ? null : this.innerProperties().virtualMachineTemplates(); } /** @@ -710,7 +642,10 @@ public List virtualMachineTemplates() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withVirtualMachineTemplates(List virtualMachineTemplates) { - this.virtualMachineTemplates = virtualMachineTemplates; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withVirtualMachineTemplates(virtualMachineTemplates); return this; } @@ -720,7 +655,7 @@ public PrivateCloudInner withVirtualMachineTemplates(List virtualNetworks() { - return this.virtualNetworks; + return this.innerProperties() == null ? null : this.innerProperties().virtualNetworks(); } /** @@ -730,7 +665,10 @@ public List virtualNetworks() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withVirtualNetworks(List virtualNetworks) { - this.virtualNetworks = virtualNetworks; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withVirtualNetworks(virtualNetworks); return this; } @@ -740,7 +678,7 @@ public PrivateCloudInner withVirtualNetworks(List virtualNe * @return the vrOpsEnabled value. */ public Boolean vrOpsEnabled() { - return this.vrOpsEnabled; + return this.innerProperties() == null ? null : this.innerProperties().vrOpsEnabled(); } /** @@ -750,7 +688,10 @@ public Boolean vrOpsEnabled() { * @return the PrivateCloudInner object itself. */ public PrivateCloudInner withVrOpsEnabled(Boolean vrOpsEnabled) { - this.vrOpsEnabled = vrOpsEnabled; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withVrOpsEnabled(vrOpsEnabled); return this; } @@ -760,14 +701,8 @@ public PrivateCloudInner withVrOpsEnabled(Boolean vrOpsEnabled) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (resourcePools() != null) { - resourcePools().forEach(e -> e.validate()); - } - if (virtualMachineTemplates() != null) { - virtualMachineTemplates().forEach(e -> e.validate()); - } - if (virtualNetworks() != null) { - virtualNetworks().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/PrivateCloudProperties.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/PrivateCloudProperties.java new file mode 100644 index 000000000000..dd2dfefd05ac --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/PrivateCloudProperties.java @@ -0,0 +1,661 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.UUID; + +/** Properties of private. */ +@Fluent +public final class PrivateCloudProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateCloudProperties.class); + + /* + * Availability Zone id, e.g. "az1" + */ + @JsonProperty(value = "availabilityZoneId") + private String availabilityZoneId; + + /* + * Availability Zone name, e.g. "Availability Zone 1" + */ + @JsonProperty(value = "availabilityZoneName") + private String availabilityZoneName; + + /* + * Number of clusters + */ + @JsonProperty(value = "clustersNumber") + private Integer clustersNumber; + + /* + * User's emails who created cloud + */ + @JsonProperty(value = "createdBy") + private String createdBy; + + /* + * When private cloud was created + */ + @JsonProperty(value = "createdOn") + private OffsetDateTime createdOn; + + /* + * Array of DNS servers + */ + @JsonProperty(value = "dnsServers") + private List dnsServers; + + /* + * Expiration date of PC + */ + @JsonProperty(value = "expires") + private String expires; + + /* + * Nsx Type, e.g. "Advanced" + */ + @JsonProperty(value = "nsxType") + private String nsxType; + + /* + * Placement Group id, e.g. "n1" + */ + @JsonProperty(value = "placementGroupId") + private String placementGroupId; + + /* + * Placement Group name + */ + @JsonProperty(value = "placementGroupName") + private String placementGroupName; + + /* + * Id of a private cloud + */ + @JsonProperty(value = "privateCloudId") + private UUID privateCloudId; + + /* + * The list of Resource Pools + */ + @JsonProperty(value = "resourcePools") + private List resourcePools; + + /* + * Private Cloud state, e.g. "operational" + */ + @JsonProperty(value = "state") + private String state; + + /* + * Number of cores + */ + @JsonProperty(value = "totalCpuCores") + private Integer totalCpuCores; + + /* + * Number of nodes + */ + @JsonProperty(value = "totalNodes") + private Integer totalNodes; + + /* + * Memory size + */ + @JsonProperty(value = "totalRam") + private Integer totalRam; + + /* + * Disk space in TB + */ + @JsonProperty(value = "totalStorage") + private Float totalStorage; + + /* + * Virtualization type e.g. "vSphere" + */ + @JsonProperty(value = "type") + private String type; + + /* + * e.g. "6.5u2" + */ + @JsonProperty(value = "vSphereVersion") + private String vSphereVersion; + + /* + * FQDN for vcenter access + */ + @JsonProperty(value = "vcenterFqdn") + private String vcenterFqdn; + + /* + * Vcenter ip address + */ + @JsonProperty(value = "vcenterRefid") + private String vcenterRefid; + + /* + * The list of Virtual Machine Templates + */ + @JsonProperty(value = "virtualMachineTemplates") + private List virtualMachineTemplates; + + /* + * The list of Virtual Networks + */ + @JsonProperty(value = "virtualNetworks") + private List virtualNetworks; + + /* + * Is Vrops enabled/disabled + */ + @JsonProperty(value = "vrOpsEnabled") + private Boolean vrOpsEnabled; + + /** + * Get the availabilityZoneId property: Availability Zone id, e.g. "az1". + * + * @return the availabilityZoneId value. + */ + public String availabilityZoneId() { + return this.availabilityZoneId; + } + + /** + * Set the availabilityZoneId property: Availability Zone id, e.g. "az1". + * + * @param availabilityZoneId the availabilityZoneId value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withAvailabilityZoneId(String availabilityZoneId) { + this.availabilityZoneId = availabilityZoneId; + return this; + } + + /** + * Get the availabilityZoneName property: Availability Zone name, e.g. "Availability Zone 1". + * + * @return the availabilityZoneName value. + */ + public String availabilityZoneName() { + return this.availabilityZoneName; + } + + /** + * Set the availabilityZoneName property: Availability Zone name, e.g. "Availability Zone 1". + * + * @param availabilityZoneName the availabilityZoneName value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withAvailabilityZoneName(String availabilityZoneName) { + this.availabilityZoneName = availabilityZoneName; + return this; + } + + /** + * Get the clustersNumber property: Number of clusters. + * + * @return the clustersNumber value. + */ + public Integer clustersNumber() { + return this.clustersNumber; + } + + /** + * Set the clustersNumber property: Number of clusters. + * + * @param clustersNumber the clustersNumber value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withClustersNumber(Integer clustersNumber) { + this.clustersNumber = clustersNumber; + return this; + } + + /** + * Get the createdBy property: User's emails who created cloud. + * + * @return the createdBy value. + */ + public String createdBy() { + return this.createdBy; + } + + /** + * Set the createdBy property: User's emails who created cloud. + * + * @param createdBy the createdBy value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withCreatedBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * Get the createdOn property: When private cloud was created. + * + * @return the createdOn value. + */ + public OffsetDateTime createdOn() { + return this.createdOn; + } + + /** + * Set the createdOn property: When private cloud was created. + * + * @param createdOn the createdOn value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withCreatedOn(OffsetDateTime createdOn) { + this.createdOn = createdOn; + return this; + } + + /** + * Get the dnsServers property: Array of DNS servers. + * + * @return the dnsServers value. + */ + public List dnsServers() { + return this.dnsServers; + } + + /** + * Set the dnsServers property: Array of DNS servers. + * + * @param dnsServers the dnsServers value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withDnsServers(List dnsServers) { + this.dnsServers = dnsServers; + return this; + } + + /** + * Get the expires property: Expiration date of PC. + * + * @return the expires value. + */ + public String expires() { + return this.expires; + } + + /** + * Set the expires property: Expiration date of PC. + * + * @param expires the expires value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withExpires(String expires) { + this.expires = expires; + return this; + } + + /** + * Get the nsxType property: Nsx Type, e.g. "Advanced". + * + * @return the nsxType value. + */ + public String nsxType() { + return this.nsxType; + } + + /** + * Set the nsxType property: Nsx Type, e.g. "Advanced". + * + * @param nsxType the nsxType value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withNsxType(String nsxType) { + this.nsxType = nsxType; + return this; + } + + /** + * Get the placementGroupId property: Placement Group id, e.g. "n1". + * + * @return the placementGroupId value. + */ + public String placementGroupId() { + return this.placementGroupId; + } + + /** + * Set the placementGroupId property: Placement Group id, e.g. "n1". + * + * @param placementGroupId the placementGroupId value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withPlacementGroupId(String placementGroupId) { + this.placementGroupId = placementGroupId; + return this; + } + + /** + * Get the placementGroupName property: Placement Group name. + * + * @return the placementGroupName value. + */ + public String placementGroupName() { + return this.placementGroupName; + } + + /** + * Set the placementGroupName property: Placement Group name. + * + * @param placementGroupName the placementGroupName value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withPlacementGroupName(String placementGroupName) { + this.placementGroupName = placementGroupName; + return this; + } + + /** + * Get the privateCloudId property: Id of a private cloud. + * + * @return the privateCloudId value. + */ + public UUID privateCloudId() { + return this.privateCloudId; + } + + /** + * Set the privateCloudId property: Id of a private cloud. + * + * @param privateCloudId the privateCloudId value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withPrivateCloudId(UUID privateCloudId) { + this.privateCloudId = privateCloudId; + return this; + } + + /** + * Get the resourcePools property: The list of Resource Pools. + * + * @return the resourcePools value. + */ + public List resourcePools() { + return this.resourcePools; + } + + /** + * Set the resourcePools property: The list of Resource Pools. + * + * @param resourcePools the resourcePools value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withResourcePools(List resourcePools) { + this.resourcePools = resourcePools; + return this; + } + + /** + * Get the state property: Private Cloud state, e.g. "operational". + * + * @return the state value. + */ + public String state() { + return this.state; + } + + /** + * Set the state property: Private Cloud state, e.g. "operational". + * + * @param state the state value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withState(String state) { + this.state = state; + return this; + } + + /** + * Get the totalCpuCores property: Number of cores. + * + * @return the totalCpuCores value. + */ + public Integer totalCpuCores() { + return this.totalCpuCores; + } + + /** + * Set the totalCpuCores property: Number of cores. + * + * @param totalCpuCores the totalCpuCores value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withTotalCpuCores(Integer totalCpuCores) { + this.totalCpuCores = totalCpuCores; + return this; + } + + /** + * Get the totalNodes property: Number of nodes. + * + * @return the totalNodes value. + */ + public Integer totalNodes() { + return this.totalNodes; + } + + /** + * Set the totalNodes property: Number of nodes. + * + * @param totalNodes the totalNodes value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withTotalNodes(Integer totalNodes) { + this.totalNodes = totalNodes; + return this; + } + + /** + * Get the totalRam property: Memory size. + * + * @return the totalRam value. + */ + public Integer totalRam() { + return this.totalRam; + } + + /** + * Set the totalRam property: Memory size. + * + * @param totalRam the totalRam value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withTotalRam(Integer totalRam) { + this.totalRam = totalRam; + return this; + } + + /** + * Get the totalStorage property: Disk space in TB. + * + * @return the totalStorage value. + */ + public Float totalStorage() { + return this.totalStorage; + } + + /** + * Set the totalStorage property: Disk space in TB. + * + * @param totalStorage the totalStorage value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withTotalStorage(Float totalStorage) { + this.totalStorage = totalStorage; + return this; + } + + /** + * Get the type property: Virtualization type e.g. "vSphere". + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Virtualization type e.g. "vSphere". + * + * @param type the type value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withType(String type) { + this.type = type; + return this; + } + + /** + * Get the vSphereVersion property: e.g. "6.5u2". + * + * @return the vSphereVersion value. + */ + public String vSphereVersion() { + return this.vSphereVersion; + } + + /** + * Set the vSphereVersion property: e.g. "6.5u2". + * + * @param vSphereVersion the vSphereVersion value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withVSphereVersion(String vSphereVersion) { + this.vSphereVersion = vSphereVersion; + return this; + } + + /** + * Get the vcenterFqdn property: FQDN for vcenter access. + * + * @return the vcenterFqdn value. + */ + public String vcenterFqdn() { + return this.vcenterFqdn; + } + + /** + * Set the vcenterFqdn property: FQDN for vcenter access. + * + * @param vcenterFqdn the vcenterFqdn value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withVcenterFqdn(String vcenterFqdn) { + this.vcenterFqdn = vcenterFqdn; + return this; + } + + /** + * Get the vcenterRefid property: Vcenter ip address. + * + * @return the vcenterRefid value. + */ + public String vcenterRefid() { + return this.vcenterRefid; + } + + /** + * Set the vcenterRefid property: Vcenter ip address. + * + * @param vcenterRefid the vcenterRefid value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withVcenterRefid(String vcenterRefid) { + this.vcenterRefid = vcenterRefid; + return this; + } + + /** + * Get the virtualMachineTemplates property: The list of Virtual Machine Templates. + * + * @return the virtualMachineTemplates value. + */ + public List virtualMachineTemplates() { + return this.virtualMachineTemplates; + } + + /** + * Set the virtualMachineTemplates property: The list of Virtual Machine Templates. + * + * @param virtualMachineTemplates the virtualMachineTemplates value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withVirtualMachineTemplates( + List virtualMachineTemplates) { + this.virtualMachineTemplates = virtualMachineTemplates; + return this; + } + + /** + * Get the virtualNetworks property: The list of Virtual Networks. + * + * @return the virtualNetworks value. + */ + public List virtualNetworks() { + return this.virtualNetworks; + } + + /** + * Set the virtualNetworks property: The list of Virtual Networks. + * + * @param virtualNetworks the virtualNetworks value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withVirtualNetworks(List virtualNetworks) { + this.virtualNetworks = virtualNetworks; + return this; + } + + /** + * Get the vrOpsEnabled property: Is Vrops enabled/disabled. + * + * @return the vrOpsEnabled value. + */ + public Boolean vrOpsEnabled() { + return this.vrOpsEnabled; + } + + /** + * Set the vrOpsEnabled property: Is Vrops enabled/disabled. + * + * @param vrOpsEnabled the vrOpsEnabled value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withVrOpsEnabled(Boolean vrOpsEnabled) { + this.vrOpsEnabled = vrOpsEnabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resourcePools() != null) { + resourcePools().forEach(e -> e.validate()); + } + if (virtualMachineTemplates() != null) { + virtualMachineTemplates().forEach(e -> e.validate()); + } + if (virtualNetworks() != null) { + virtualNetworks().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/ResourcePoolInner.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/ResourcePoolInner.java index 0fff9617d588..e9cbc743c4b1 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/ResourcePoolInner.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/ResourcePoolInner.java @@ -5,15 +5,13 @@ package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Resource pool model. */ -@JsonFlatten @Fluent -public class ResourcePoolInner { +public final class ResourcePoolInner { @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourcePoolInner.class); /* @@ -41,16 +39,16 @@ public class ResourcePoolInner { private String privateCloudId; /* - * {resourceProviderNamespace}/{resourceType} + * Resource pool properties */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; + @JsonProperty(value = "properties") + private ResourcePoolProperties innerProperties; /* - * Hierarchical resource pool name + * {resourceProviderNamespace}/{resourceType} */ - @JsonProperty(value = "properties.fullName", access = JsonProperty.Access.WRITE_ONLY) - private String fullName; + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; /** * Get the id property: resource pool id (privateCloudId:vsphereId). @@ -99,6 +97,15 @@ public String privateCloudId() { return this.privateCloudId; } + /** + * Get the innerProperties property: Resource pool properties. + * + * @return the innerProperties value. + */ + private ResourcePoolProperties innerProperties() { + return this.innerProperties; + } + /** * Get the type property: {resourceProviderNamespace}/{resourceType}. * @@ -114,7 +121,7 @@ public String type() { * @return the fullName value. */ public String fullName() { - return this.fullName; + return this.innerProperties() == null ? null : this.innerProperties().fullName(); } /** @@ -128,5 +135,8 @@ public void validate() { .logExceptionAsError( new IllegalArgumentException("Missing required property id in model ResourcePoolInner")); } + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/ResourcePoolProperties.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/ResourcePoolProperties.java new file mode 100644 index 000000000000..d2098f105749 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/ResourcePoolProperties.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of resource pool. */ +@Immutable +public final class ResourcePoolProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourcePoolProperties.class); + + /* + * Hierarchical resource pool name + */ + @JsonProperty(value = "fullName", access = JsonProperty.Access.WRITE_ONLY) + private String fullName; + + /** + * Get the fullName property: Hierarchical resource pool name. + * + * @return the fullName value. + */ + public String fullName() { + return this.fullName; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/SkuDescription.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/SkuDescription.java new file mode 100644 index 000000000000..098949bba29b --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/SkuDescription.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The purchase SKU for CloudSimple paid resources. */ +@Fluent +public final class SkuDescription { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuDescription.class); + + /* + * SKU's id + */ + @JsonProperty(value = "id", required = true) + private String id; + + /* + * SKU's name + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Get the id property: SKU's id. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: SKU's id. + * + * @param id the id value to set. + * @return the SkuDescription object itself. + */ + public SkuDescription withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: SKU's name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: SKU's name. + * + * @param name the name value to set. + * @return the SkuDescription object itself. + */ + public SkuDescription withName(String name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property id in model SkuDescription")); + } + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model SkuDescription")); + } + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualMachineInner.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualMachineInner.java index 3e8c0156a770..24b255d5a161 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualMachineInner.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualMachineInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.vmwarecloudsimple.models.GuestOSCustomization; @@ -19,142 +18,38 @@ import java.util.Map; /** Virtual machine model. */ -@JsonFlatten @Fluent -public class VirtualMachineInner extends Resource { +public final class VirtualMachineInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachineInner.class); - /* - * The amount of memory - */ - @JsonProperty(value = "properties.amountOfRam") - private Integer amountOfRam; - - /* - * The list of Virtual Disks' Controllers - */ - @JsonProperty(value = "properties.controllers", access = JsonProperty.Access.WRITE_ONLY) - private List controllers; - /* * Virtual machine properties */ - @JsonProperty(value = "properties.customization") - private GuestOSCustomization customization; - - /* - * The list of Virtual Disks - */ - @JsonProperty(value = "properties.disks") - private List disks; - - /* - * The DNS name of Virtual Machine in VCenter - */ - @JsonProperty(value = "properties.dnsname", access = JsonProperty.Access.WRITE_ONLY) - private String dnsname; - - /* - * Expose Guest OS or not - */ - @JsonProperty(value = "properties.exposeToGuestVM") - private Boolean exposeToGuestVM; - - /* - * The path to virtual machine folder in VCenter - */ - @JsonProperty(value = "properties.folder", access = JsonProperty.Access.WRITE_ONLY) - private String folder; - - /* - * The name of Guest OS - */ - @JsonProperty(value = "properties.guestOS", access = JsonProperty.Access.WRITE_ONLY) - private String guestOS; - - /* - * The Guest OS type - */ - @JsonProperty(value = "properties.guestOSType", access = JsonProperty.Access.WRITE_ONLY) - private GuestOSType guestOSType; - - /* - * The list of Virtual NICs - */ - @JsonProperty(value = "properties.nics") - private List nics; - - /* - * The number of CPU cores - */ - @JsonProperty(value = "properties.numberOfCores") - private Integer numberOfCores; - - /* - * Password for login. Deprecated - use customization property - */ - @JsonProperty(value = "properties.password") - private String password; - - /* - * Private Cloud Id - */ - @JsonProperty(value = "properties.privateCloudId") - private String privateCloudId; - - /* - * The provisioning status of the resource - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /* - * The public ip of Virtual Machine - */ - @JsonProperty(value = "properties.publicIP", access = JsonProperty.Access.WRITE_ONLY) - private String publicIp; - - /* - * Virtual Machines Resource Pool - */ - @JsonProperty(value = "properties.resourcePool") - private ResourcePoolInner resourcePool; - - /* - * The status of Virtual machine - */ - @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) - private VirtualMachineStatus status; - - /* - * Virtual Machine Template Id - */ - @JsonProperty(value = "properties.templateId") - private String templateId; - - /* - * Username for login. Deprecated - use customization property - */ - @JsonProperty(value = "properties.username") - private String username; + @JsonProperty(value = "properties") + private VirtualMachinePropertiesInner innerProperties; - /* - * The list of Virtual VSphere Networks + /** + * Get the innerProperties property: Virtual machine properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.vSphereNetworks") - private List vSphereNetworks; + private VirtualMachinePropertiesInner innerProperties() { + return this.innerProperties; + } - /* - * The internal id of Virtual Machine in VCenter - */ - @JsonProperty(value = "properties.vmId", access = JsonProperty.Access.WRITE_ONLY) - private String vmId; + /** {@inheritDoc} */ + @Override + public VirtualMachineInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * VMware tools version - */ - @JsonProperty(value = "properties.vmwaretools", access = JsonProperty.Access.WRITE_ONLY) - private String vmwaretools; + /** {@inheritDoc} */ + @Override + public VirtualMachineInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the amountOfRam property: The amount of memory. @@ -162,7 +57,7 @@ public class VirtualMachineInner extends Resource { * @return the amountOfRam value. */ public Integer amountOfRam() { - return this.amountOfRam; + return this.innerProperties() == null ? null : this.innerProperties().amountOfRam(); } /** @@ -172,7 +67,10 @@ public Integer amountOfRam() { * @return the VirtualMachineInner object itself. */ public VirtualMachineInner withAmountOfRam(Integer amountOfRam) { - this.amountOfRam = amountOfRam; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachinePropertiesInner(); + } + this.innerProperties().withAmountOfRam(amountOfRam); return this; } @@ -182,7 +80,7 @@ public VirtualMachineInner withAmountOfRam(Integer amountOfRam) { * @return the controllers value. */ public List controllers() { - return this.controllers; + return this.innerProperties() == null ? null : this.innerProperties().controllers(); } /** @@ -191,7 +89,7 @@ public List controllers() { * @return the customization value. */ public GuestOSCustomization customization() { - return this.customization; + return this.innerProperties() == null ? null : this.innerProperties().customization(); } /** @@ -201,7 +99,10 @@ public GuestOSCustomization customization() { * @return the VirtualMachineInner object itself. */ public VirtualMachineInner withCustomization(GuestOSCustomization customization) { - this.customization = customization; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachinePropertiesInner(); + } + this.innerProperties().withCustomization(customization); return this; } @@ -211,7 +112,7 @@ public VirtualMachineInner withCustomization(GuestOSCustomization customization) * @return the disks value. */ public List disks() { - return this.disks; + return this.innerProperties() == null ? null : this.innerProperties().disks(); } /** @@ -221,7 +122,10 @@ public List disks() { * @return the VirtualMachineInner object itself. */ public VirtualMachineInner withDisks(List disks) { - this.disks = disks; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachinePropertiesInner(); + } + this.innerProperties().withDisks(disks); return this; } @@ -231,7 +135,7 @@ public VirtualMachineInner withDisks(List disks) { * @return the dnsname value. */ public String dnsname() { - return this.dnsname; + return this.innerProperties() == null ? null : this.innerProperties().dnsname(); } /** @@ -240,7 +144,7 @@ public String dnsname() { * @return the exposeToGuestVM value. */ public Boolean exposeToGuestVM() { - return this.exposeToGuestVM; + return this.innerProperties() == null ? null : this.innerProperties().exposeToGuestVM(); } /** @@ -250,7 +154,10 @@ public Boolean exposeToGuestVM() { * @return the VirtualMachineInner object itself. */ public VirtualMachineInner withExposeToGuestVM(Boolean exposeToGuestVM) { - this.exposeToGuestVM = exposeToGuestVM; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachinePropertiesInner(); + } + this.innerProperties().withExposeToGuestVM(exposeToGuestVM); return this; } @@ -260,7 +167,7 @@ public VirtualMachineInner withExposeToGuestVM(Boolean exposeToGuestVM) { * @return the folder value. */ public String folder() { - return this.folder; + return this.innerProperties() == null ? null : this.innerProperties().folder(); } /** @@ -269,7 +176,7 @@ public String folder() { * @return the guestOS value. */ public String guestOS() { - return this.guestOS; + return this.innerProperties() == null ? null : this.innerProperties().guestOS(); } /** @@ -278,7 +185,7 @@ public String guestOS() { * @return the guestOSType value. */ public GuestOSType guestOSType() { - return this.guestOSType; + return this.innerProperties() == null ? null : this.innerProperties().guestOSType(); } /** @@ -287,7 +194,7 @@ public GuestOSType guestOSType() { * @return the nics value. */ public List nics() { - return this.nics; + return this.innerProperties() == null ? null : this.innerProperties().nics(); } /** @@ -297,7 +204,10 @@ public List nics() { * @return the VirtualMachineInner object itself. */ public VirtualMachineInner withNics(List nics) { - this.nics = nics; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachinePropertiesInner(); + } + this.innerProperties().withNics(nics); return this; } @@ -307,7 +217,7 @@ public VirtualMachineInner withNics(List nics) { * @return the numberOfCores value. */ public Integer numberOfCores() { - return this.numberOfCores; + return this.innerProperties() == null ? null : this.innerProperties().numberOfCores(); } /** @@ -317,7 +227,10 @@ public Integer numberOfCores() { * @return the VirtualMachineInner object itself. */ public VirtualMachineInner withNumberOfCores(Integer numberOfCores) { - this.numberOfCores = numberOfCores; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachinePropertiesInner(); + } + this.innerProperties().withNumberOfCores(numberOfCores); return this; } @@ -327,7 +240,7 @@ public VirtualMachineInner withNumberOfCores(Integer numberOfCores) { * @return the password value. */ public String password() { - return this.password; + return this.innerProperties() == null ? null : this.innerProperties().password(); } /** @@ -337,7 +250,10 @@ public String password() { * @return the VirtualMachineInner object itself. */ public VirtualMachineInner withPassword(String password) { - this.password = password; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachinePropertiesInner(); + } + this.innerProperties().withPassword(password); return this; } @@ -347,7 +263,7 @@ public VirtualMachineInner withPassword(String password) { * @return the privateCloudId value. */ public String privateCloudId() { - return this.privateCloudId; + return this.innerProperties() == null ? null : this.innerProperties().privateCloudId(); } /** @@ -357,7 +273,10 @@ public String privateCloudId() { * @return the VirtualMachineInner object itself. */ public VirtualMachineInner withPrivateCloudId(String privateCloudId) { - this.privateCloudId = privateCloudId; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachinePropertiesInner(); + } + this.innerProperties().withPrivateCloudId(privateCloudId); return this; } @@ -367,7 +286,7 @@ public VirtualMachineInner withPrivateCloudId(String privateCloudId) { * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -376,7 +295,7 @@ public String provisioningState() { * @return the publicIp value. */ public String publicIp() { - return this.publicIp; + return this.innerProperties() == null ? null : this.innerProperties().publicIp(); } /** @@ -385,7 +304,7 @@ public String publicIp() { * @return the resourcePool value. */ public ResourcePoolInner resourcePool() { - return this.resourcePool; + return this.innerProperties() == null ? null : this.innerProperties().resourcePool(); } /** @@ -395,7 +314,10 @@ public ResourcePoolInner resourcePool() { * @return the VirtualMachineInner object itself. */ public VirtualMachineInner withResourcePool(ResourcePoolInner resourcePool) { - this.resourcePool = resourcePool; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachinePropertiesInner(); + } + this.innerProperties().withResourcePool(resourcePool); return this; } @@ -405,7 +327,7 @@ public VirtualMachineInner withResourcePool(ResourcePoolInner resourcePool) { * @return the status value. */ public VirtualMachineStatus status() { - return this.status; + return this.innerProperties() == null ? null : this.innerProperties().status(); } /** @@ -414,7 +336,7 @@ public VirtualMachineStatus status() { * @return the templateId value. */ public String templateId() { - return this.templateId; + return this.innerProperties() == null ? null : this.innerProperties().templateId(); } /** @@ -424,7 +346,10 @@ public String templateId() { * @return the VirtualMachineInner object itself. */ public VirtualMachineInner withTemplateId(String templateId) { - this.templateId = templateId; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachinePropertiesInner(); + } + this.innerProperties().withTemplateId(templateId); return this; } @@ -434,7 +359,7 @@ public VirtualMachineInner withTemplateId(String templateId) { * @return the username value. */ public String username() { - return this.username; + return this.innerProperties() == null ? null : this.innerProperties().username(); } /** @@ -444,7 +369,10 @@ public String username() { * @return the VirtualMachineInner object itself. */ public VirtualMachineInner withUsername(String username) { - this.username = username; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachinePropertiesInner(); + } + this.innerProperties().withUsername(username); return this; } @@ -454,7 +382,7 @@ public VirtualMachineInner withUsername(String username) { * @return the vSphereNetworks value. */ public List vSphereNetworks() { - return this.vSphereNetworks; + return this.innerProperties() == null ? null : this.innerProperties().vSphereNetworks(); } /** @@ -464,7 +392,10 @@ public List vSphereNetworks() { * @return the VirtualMachineInner object itself. */ public VirtualMachineInner withVSphereNetworks(List vSphereNetworks) { - this.vSphereNetworks = vSphereNetworks; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachinePropertiesInner(); + } + this.innerProperties().withVSphereNetworks(vSphereNetworks); return this; } @@ -474,7 +405,7 @@ public VirtualMachineInner withVSphereNetworks(List vSphereNetworks) { * @return the vmId value. */ public String vmId() { - return this.vmId; + return this.innerProperties() == null ? null : this.innerProperties().vmId(); } /** @@ -483,21 +414,7 @@ public String vmId() { * @return the vmwaretools value. */ public String vmwaretools() { - return this.vmwaretools; - } - - /** {@inheritDoc} */ - @Override - public VirtualMachineInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public VirtualMachineInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().vmwaretools(); } /** @@ -506,20 +423,8 @@ public VirtualMachineInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (controllers() != null) { - controllers().forEach(e -> e.validate()); - } - if (customization() != null) { - customization().validate(); - } - if (disks() != null) { - disks().forEach(e -> e.validate()); - } - if (nics() != null) { - nics().forEach(e -> e.validate()); - } - if (resourcePool() != null) { - resourcePool().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualMachinePropertiesInner.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualMachinePropertiesInner.java new file mode 100644 index 000000000000..3973038877bc --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualMachinePropertiesInner.java @@ -0,0 +1,513 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.vmwarecloudsimple.models.GuestOSCustomization; +import com.azure.resourcemanager.vmwarecloudsimple.models.GuestOSType; +import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualDisk; +import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualDiskController; +import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualMachineStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties of virtual machine. */ +@Fluent +public final class VirtualMachinePropertiesInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachinePropertiesInner.class); + + /* + * The amount of memory + */ + @JsonProperty(value = "amountOfRam", required = true) + private int amountOfRam; + + /* + * The list of Virtual Disks' Controllers + */ + @JsonProperty(value = "controllers", access = JsonProperty.Access.WRITE_ONLY) + private List controllers; + + /* + * Virtual machine properties + */ + @JsonProperty(value = "customization") + private GuestOSCustomization customization; + + /* + * The list of Virtual Disks + */ + @JsonProperty(value = "disks") + private List disks; + + /* + * The DNS name of Virtual Machine in VCenter + */ + @JsonProperty(value = "dnsname", access = JsonProperty.Access.WRITE_ONLY) + private String dnsname; + + /* + * Expose Guest OS or not + */ + @JsonProperty(value = "exposeToGuestVM") + private Boolean exposeToGuestVM; + + /* + * The path to virtual machine folder in VCenter + */ + @JsonProperty(value = "folder", access = JsonProperty.Access.WRITE_ONLY) + private String folder; + + /* + * The name of Guest OS + */ + @JsonProperty(value = "guestOS", access = JsonProperty.Access.WRITE_ONLY) + private String guestOS; + + /* + * The Guest OS type + */ + @JsonProperty(value = "guestOSType", access = JsonProperty.Access.WRITE_ONLY) + private GuestOSType guestOSType; + + /* + * The list of Virtual NICs + */ + @JsonProperty(value = "nics") + private List nics; + + /* + * The number of CPU cores + */ + @JsonProperty(value = "numberOfCores", required = true) + private int numberOfCores; + + /* + * Password for login. Deprecated - use customization property + */ + @JsonProperty(value = "password") + private String password; + + /* + * Private Cloud Id + */ + @JsonProperty(value = "privateCloudId", required = true) + private String privateCloudId; + + /* + * The provisioning status of the resource + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The public ip of Virtual Machine + */ + @JsonProperty(value = "publicIP", access = JsonProperty.Access.WRITE_ONLY) + private String publicIp; + + /* + * Virtual Machines Resource Pool + */ + @JsonProperty(value = "resourcePool") + private ResourcePoolInner resourcePool; + + /* + * The status of Virtual machine + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private VirtualMachineStatus status; + + /* + * Virtual Machine Template Id + */ + @JsonProperty(value = "templateId") + private String templateId; + + /* + * Username for login. Deprecated - use customization property + */ + @JsonProperty(value = "username") + private String username; + + /* + * The list of Virtual VSphere Networks + */ + @JsonProperty(value = "vSphereNetworks") + private List vSphereNetworks; + + /* + * The internal id of Virtual Machine in VCenter + */ + @JsonProperty(value = "vmId", access = JsonProperty.Access.WRITE_ONLY) + private String vmId; + + /* + * VMware tools version + */ + @JsonProperty(value = "vmwaretools", access = JsonProperty.Access.WRITE_ONLY) + private String vmwaretools; + + /** + * Get the amountOfRam property: The amount of memory. + * + * @return the amountOfRam value. + */ + public int amountOfRam() { + return this.amountOfRam; + } + + /** + * Set the amountOfRam property: The amount of memory. + * + * @param amountOfRam the amountOfRam value to set. + * @return the VirtualMachinePropertiesInner object itself. + */ + public VirtualMachinePropertiesInner withAmountOfRam(int amountOfRam) { + this.amountOfRam = amountOfRam; + return this; + } + + /** + * Get the controllers property: The list of Virtual Disks' Controllers. + * + * @return the controllers value. + */ + public List controllers() { + return this.controllers; + } + + /** + * Get the customization property: Virtual machine properties. + * + * @return the customization value. + */ + public GuestOSCustomization customization() { + return this.customization; + } + + /** + * Set the customization property: Virtual machine properties. + * + * @param customization the customization value to set. + * @return the VirtualMachinePropertiesInner object itself. + */ + public VirtualMachinePropertiesInner withCustomization(GuestOSCustomization customization) { + this.customization = customization; + return this; + } + + /** + * Get the disks property: The list of Virtual Disks. + * + * @return the disks value. + */ + public List disks() { + return this.disks; + } + + /** + * Set the disks property: The list of Virtual Disks. + * + * @param disks the disks value to set. + * @return the VirtualMachinePropertiesInner object itself. + */ + public VirtualMachinePropertiesInner withDisks(List disks) { + this.disks = disks; + return this; + } + + /** + * Get the dnsname property: The DNS name of Virtual Machine in VCenter. + * + * @return the dnsname value. + */ + public String dnsname() { + return this.dnsname; + } + + /** + * Get the exposeToGuestVM property: Expose Guest OS or not. + * + * @return the exposeToGuestVM value. + */ + public Boolean exposeToGuestVM() { + return this.exposeToGuestVM; + } + + /** + * Set the exposeToGuestVM property: Expose Guest OS or not. + * + * @param exposeToGuestVM the exposeToGuestVM value to set. + * @return the VirtualMachinePropertiesInner object itself. + */ + public VirtualMachinePropertiesInner withExposeToGuestVM(Boolean exposeToGuestVM) { + this.exposeToGuestVM = exposeToGuestVM; + return this; + } + + /** + * Get the folder property: The path to virtual machine folder in VCenter. + * + * @return the folder value. + */ + public String folder() { + return this.folder; + } + + /** + * Get the guestOS property: The name of Guest OS. + * + * @return the guestOS value. + */ + public String guestOS() { + return this.guestOS; + } + + /** + * Get the guestOSType property: The Guest OS type. + * + * @return the guestOSType value. + */ + public GuestOSType guestOSType() { + return this.guestOSType; + } + + /** + * Get the nics property: The list of Virtual NICs. + * + * @return the nics value. + */ + public List nics() { + return this.nics; + } + + /** + * Set the nics property: The list of Virtual NICs. + * + * @param nics the nics value to set. + * @return the VirtualMachinePropertiesInner object itself. + */ + public VirtualMachinePropertiesInner withNics(List nics) { + this.nics = nics; + return this; + } + + /** + * Get the numberOfCores property: The number of CPU cores. + * + * @return the numberOfCores value. + */ + public int numberOfCores() { + return this.numberOfCores; + } + + /** + * Set the numberOfCores property: The number of CPU cores. + * + * @param numberOfCores the numberOfCores value to set. + * @return the VirtualMachinePropertiesInner object itself. + */ + public VirtualMachinePropertiesInner withNumberOfCores(int numberOfCores) { + this.numberOfCores = numberOfCores; + return this; + } + + /** + * Get the password property: Password for login. Deprecated - use customization property. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: Password for login. Deprecated - use customization property. + * + * @param password the password value to set. + * @return the VirtualMachinePropertiesInner object itself. + */ + public VirtualMachinePropertiesInner withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the privateCloudId property: Private Cloud Id. + * + * @return the privateCloudId value. + */ + public String privateCloudId() { + return this.privateCloudId; + } + + /** + * Set the privateCloudId property: Private Cloud Id. + * + * @param privateCloudId the privateCloudId value to set. + * @return the VirtualMachinePropertiesInner object itself. + */ + public VirtualMachinePropertiesInner withPrivateCloudId(String privateCloudId) { + this.privateCloudId = privateCloudId; + return this; + } + + /** + * Get the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the publicIp property: The public ip of Virtual Machine. + * + * @return the publicIp value. + */ + public String publicIp() { + return this.publicIp; + } + + /** + * Get the resourcePool property: Virtual Machines Resource Pool. + * + * @return the resourcePool value. + */ + public ResourcePoolInner resourcePool() { + return this.resourcePool; + } + + /** + * Set the resourcePool property: Virtual Machines Resource Pool. + * + * @param resourcePool the resourcePool value to set. + * @return the VirtualMachinePropertiesInner object itself. + */ + public VirtualMachinePropertiesInner withResourcePool(ResourcePoolInner resourcePool) { + this.resourcePool = resourcePool; + return this; + } + + /** + * Get the status property: The status of Virtual machine. + * + * @return the status value. + */ + public VirtualMachineStatus status() { + return this.status; + } + + /** + * Get the templateId property: Virtual Machine Template Id. + * + * @return the templateId value. + */ + public String templateId() { + return this.templateId; + } + + /** + * Set the templateId property: Virtual Machine Template Id. + * + * @param templateId the templateId value to set. + * @return the VirtualMachinePropertiesInner object itself. + */ + public VirtualMachinePropertiesInner withTemplateId(String templateId) { + this.templateId = templateId; + return this; + } + + /** + * Get the username property: Username for login. Deprecated - use customization property. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: Username for login. Deprecated - use customization property. + * + * @param username the username value to set. + * @return the VirtualMachinePropertiesInner object itself. + */ + public VirtualMachinePropertiesInner withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the vSphereNetworks property: The list of Virtual VSphere Networks. + * + * @return the vSphereNetworks value. + */ + public List vSphereNetworks() { + return this.vSphereNetworks; + } + + /** + * Set the vSphereNetworks property: The list of Virtual VSphere Networks. + * + * @param vSphereNetworks the vSphereNetworks value to set. + * @return the VirtualMachinePropertiesInner object itself. + */ + public VirtualMachinePropertiesInner withVSphereNetworks(List vSphereNetworks) { + this.vSphereNetworks = vSphereNetworks; + return this; + } + + /** + * Get the vmId property: The internal id of Virtual Machine in VCenter. + * + * @return the vmId value. + */ + public String vmId() { + return this.vmId; + } + + /** + * Get the vmwaretools property: VMware tools version. + * + * @return the vmwaretools value. + */ + public String vmwaretools() { + return this.vmwaretools; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (controllers() != null) { + controllers().forEach(e -> e.validate()); + } + if (customization() != null) { + customization().validate(); + } + if (disks() != null) { + disks().forEach(e -> e.validate()); + } + if (nics() != null) { + nics().forEach(e -> e.validate()); + } + if (privateCloudId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property privateCloudId in model VirtualMachinePropertiesInner")); + } + if (resourcePool() != null) { + resourcePool().validate(); + } + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualMachineTemplateInner.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualMachineTemplateInner.java index 95e5a8d07c4a..4d95d12ecb50 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualMachineTemplateInner.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualMachineTemplateInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualDisk; import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualDiskController; @@ -14,9 +13,8 @@ import java.util.List; /** Virtual machine template model. */ -@JsonFlatten @Fluent -public class VirtualMachineTemplateInner { +public final class VirtualMachineTemplateInner { @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachineTemplateInner.class); /* @@ -38,94 +36,16 @@ public class VirtualMachineTemplateInner { private String name; /* - * {resourceProviderNamespace}/{resourceType} - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /* - * The amount of memory - */ - @JsonProperty(value = "properties.amountOfRam") - private Integer amountOfRam; - - /* - * The list of Virtual Disk Controllers - */ - @JsonProperty(value = "properties.controllers") - private List controllers; - - /* - * The description of Virtual Machine Template - */ - @JsonProperty(value = "properties.description") - private String description; - - /* - * The list of Virtual Disks - */ - @JsonProperty(value = "properties.disks") - private List disks; - - /* - * Expose Guest OS or not - */ - @JsonProperty(value = "properties.exposeToGuestVM") - private Boolean exposeToGuestVM; - - /* - * The Guest OS - */ - @JsonProperty(value = "properties.guestOS", access = JsonProperty.Access.WRITE_ONLY) - private String guestOS; - - /* - * The Guest OS types + * The Virtual Machine Template properties */ - @JsonProperty(value = "properties.guestOSType", access = JsonProperty.Access.WRITE_ONLY) - private String guestOSType; + @JsonProperty(value = "properties") + private VirtualMachineTemplateProperties innerProperties; /* - * The list of Virtual NICs - */ - @JsonProperty(value = "properties.nics") - private List nics; - - /* - * The number of CPU cores - */ - @JsonProperty(value = "properties.numberOfCores") - private Integer numberOfCores; - - /* - * path to folder - */ - @JsonProperty(value = "properties.path") - private String path; - - /* - * The Private Cloud Id - */ - @JsonProperty(value = "properties.privateCloudId") - private String privateCloudId; - - /* - * The list of VSphere networks - */ - @JsonProperty(value = "properties.vSphereNetworks") - private List vSphereNetworks; - - /* - * The tags from VSphere - */ - @JsonProperty(value = "properties.vSphereTags") - private List vSphereTags; - - /* - * The VMware tools version + * {resourceProviderNamespace}/{resourceType} */ - @JsonProperty(value = "properties.vmwaretools", access = JsonProperty.Access.WRITE_ONLY) - private String vmwaretools; + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; /** * Get the id property: virtual machine template id (privateCloudId:vsphereId). @@ -165,6 +85,15 @@ public String name() { return this.name; } + /** + * Get the innerProperties property: The Virtual Machine Template properties. + * + * @return the innerProperties value. + */ + private VirtualMachineTemplateProperties innerProperties() { + return this.innerProperties; + } + /** * Get the type property: {resourceProviderNamespace}/{resourceType}. * @@ -180,7 +109,7 @@ public String type() { * @return the amountOfRam value. */ public Integer amountOfRam() { - return this.amountOfRam; + return this.innerProperties() == null ? null : this.innerProperties().amountOfRam(); } /** @@ -190,7 +119,10 @@ public Integer amountOfRam() { * @return the VirtualMachineTemplateInner object itself. */ public VirtualMachineTemplateInner withAmountOfRam(Integer amountOfRam) { - this.amountOfRam = amountOfRam; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachineTemplateProperties(); + } + this.innerProperties().withAmountOfRam(amountOfRam); return this; } @@ -200,7 +132,7 @@ public VirtualMachineTemplateInner withAmountOfRam(Integer amountOfRam) { * @return the controllers value. */ public List controllers() { - return this.controllers; + return this.innerProperties() == null ? null : this.innerProperties().controllers(); } /** @@ -210,7 +142,10 @@ public List controllers() { * @return the VirtualMachineTemplateInner object itself. */ public VirtualMachineTemplateInner withControllers(List controllers) { - this.controllers = controllers; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachineTemplateProperties(); + } + this.innerProperties().withControllers(controllers); return this; } @@ -220,7 +155,7 @@ public VirtualMachineTemplateInner withControllers(List c * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -230,7 +165,10 @@ public String description() { * @return the VirtualMachineTemplateInner object itself. */ public VirtualMachineTemplateInner withDescription(String description) { - this.description = description; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachineTemplateProperties(); + } + this.innerProperties().withDescription(description); return this; } @@ -240,7 +178,7 @@ public VirtualMachineTemplateInner withDescription(String description) { * @return the disks value. */ public List disks() { - return this.disks; + return this.innerProperties() == null ? null : this.innerProperties().disks(); } /** @@ -250,7 +188,10 @@ public List disks() { * @return the VirtualMachineTemplateInner object itself. */ public VirtualMachineTemplateInner withDisks(List disks) { - this.disks = disks; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachineTemplateProperties(); + } + this.innerProperties().withDisks(disks); return this; } @@ -260,7 +201,7 @@ public VirtualMachineTemplateInner withDisks(List disks) { * @return the exposeToGuestVM value. */ public Boolean exposeToGuestVM() { - return this.exposeToGuestVM; + return this.innerProperties() == null ? null : this.innerProperties().exposeToGuestVM(); } /** @@ -270,7 +211,10 @@ public Boolean exposeToGuestVM() { * @return the VirtualMachineTemplateInner object itself. */ public VirtualMachineTemplateInner withExposeToGuestVM(Boolean exposeToGuestVM) { - this.exposeToGuestVM = exposeToGuestVM; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachineTemplateProperties(); + } + this.innerProperties().withExposeToGuestVM(exposeToGuestVM); return this; } @@ -280,7 +224,7 @@ public VirtualMachineTemplateInner withExposeToGuestVM(Boolean exposeToGuestVM) * @return the guestOS value. */ public String guestOS() { - return this.guestOS; + return this.innerProperties() == null ? null : this.innerProperties().guestOS(); } /** @@ -289,7 +233,7 @@ public String guestOS() { * @return the guestOSType value. */ public String guestOSType() { - return this.guestOSType; + return this.innerProperties() == null ? null : this.innerProperties().guestOSType(); } /** @@ -298,7 +242,7 @@ public String guestOSType() { * @return the nics value. */ public List nics() { - return this.nics; + return this.innerProperties() == null ? null : this.innerProperties().nics(); } /** @@ -308,7 +252,10 @@ public List nics() { * @return the VirtualMachineTemplateInner object itself. */ public VirtualMachineTemplateInner withNics(List nics) { - this.nics = nics; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachineTemplateProperties(); + } + this.innerProperties().withNics(nics); return this; } @@ -318,7 +265,7 @@ public VirtualMachineTemplateInner withNics(List nics) { * @return the numberOfCores value. */ public Integer numberOfCores() { - return this.numberOfCores; + return this.innerProperties() == null ? null : this.innerProperties().numberOfCores(); } /** @@ -328,7 +275,10 @@ public Integer numberOfCores() { * @return the VirtualMachineTemplateInner object itself. */ public VirtualMachineTemplateInner withNumberOfCores(Integer numberOfCores) { - this.numberOfCores = numberOfCores; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachineTemplateProperties(); + } + this.innerProperties().withNumberOfCores(numberOfCores); return this; } @@ -338,7 +288,7 @@ public VirtualMachineTemplateInner withNumberOfCores(Integer numberOfCores) { * @return the path value. */ public String path() { - return this.path; + return this.innerProperties() == null ? null : this.innerProperties().path(); } /** @@ -348,7 +298,10 @@ public String path() { * @return the VirtualMachineTemplateInner object itself. */ public VirtualMachineTemplateInner withPath(String path) { - this.path = path; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachineTemplateProperties(); + } + this.innerProperties().withPath(path); return this; } @@ -358,7 +311,7 @@ public VirtualMachineTemplateInner withPath(String path) { * @return the privateCloudId value. */ public String privateCloudId() { - return this.privateCloudId; + return this.innerProperties() == null ? null : this.innerProperties().privateCloudId(); } /** @@ -368,7 +321,10 @@ public String privateCloudId() { * @return the VirtualMachineTemplateInner object itself. */ public VirtualMachineTemplateInner withPrivateCloudId(String privateCloudId) { - this.privateCloudId = privateCloudId; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachineTemplateProperties(); + } + this.innerProperties().withPrivateCloudId(privateCloudId); return this; } @@ -378,7 +334,7 @@ public VirtualMachineTemplateInner withPrivateCloudId(String privateCloudId) { * @return the vSphereNetworks value. */ public List vSphereNetworks() { - return this.vSphereNetworks; + return this.innerProperties() == null ? null : this.innerProperties().vSphereNetworks(); } /** @@ -388,7 +344,10 @@ public List vSphereNetworks() { * @return the VirtualMachineTemplateInner object itself. */ public VirtualMachineTemplateInner withVSphereNetworks(List vSphereNetworks) { - this.vSphereNetworks = vSphereNetworks; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachineTemplateProperties(); + } + this.innerProperties().withVSphereNetworks(vSphereNetworks); return this; } @@ -398,7 +357,7 @@ public VirtualMachineTemplateInner withVSphereNetworks(List vSphereNetwo * @return the vSphereTags value. */ public List vSphereTags() { - return this.vSphereTags; + return this.innerProperties() == null ? null : this.innerProperties().vSphereTags(); } /** @@ -408,7 +367,10 @@ public List vSphereTags() { * @return the VirtualMachineTemplateInner object itself. */ public VirtualMachineTemplateInner withVSphereTags(List vSphereTags) { - this.vSphereTags = vSphereTags; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualMachineTemplateProperties(); + } + this.innerProperties().withVSphereTags(vSphereTags); return this; } @@ -418,7 +380,7 @@ public VirtualMachineTemplateInner withVSphereTags(List vSphereTags) { * @return the vmwaretools value. */ public String vmwaretools() { - return this.vmwaretools; + return this.innerProperties() == null ? null : this.innerProperties().vmwaretools(); } /** @@ -427,14 +389,8 @@ public String vmwaretools() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (controllers() != null) { - controllers().forEach(e -> e.validate()); - } - if (disks() != null) { - disks().forEach(e -> e.validate()); - } - if (nics() != null) { - nics().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualMachineTemplateProperties.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualMachineTemplateProperties.java new file mode 100644 index 000000000000..6eb6180a2202 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualMachineTemplateProperties.java @@ -0,0 +1,373 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualDisk; +import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualDiskController; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties of virtual machine template. */ +@Fluent +public final class VirtualMachineTemplateProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachineTemplateProperties.class); + + /* + * The amount of memory + */ + @JsonProperty(value = "amountOfRam") + private Integer amountOfRam; + + /* + * The list of Virtual Disk Controllers + */ + @JsonProperty(value = "controllers") + private List controllers; + + /* + * The description of Virtual Machine Template + */ + @JsonProperty(value = "description") + private String description; + + /* + * The list of Virtual Disks + */ + @JsonProperty(value = "disks") + private List disks; + + /* + * Expose Guest OS or not + */ + @JsonProperty(value = "exposeToGuestVM") + private Boolean exposeToGuestVM; + + /* + * The Guest OS + */ + @JsonProperty(value = "guestOS", access = JsonProperty.Access.WRITE_ONLY) + private String guestOS; + + /* + * The Guest OS types + */ + @JsonProperty(value = "guestOSType", access = JsonProperty.Access.WRITE_ONLY) + private String guestOSType; + + /* + * The list of Virtual NICs + */ + @JsonProperty(value = "nics") + private List nics; + + /* + * The number of CPU cores + */ + @JsonProperty(value = "numberOfCores") + private Integer numberOfCores; + + /* + * path to folder + */ + @JsonProperty(value = "path") + private String path; + + /* + * The Private Cloud Id + */ + @JsonProperty(value = "privateCloudId", required = true) + private String privateCloudId; + + /* + * The list of VSphere networks + */ + @JsonProperty(value = "vSphereNetworks") + private List vSphereNetworks; + + /* + * The tags from VSphere + */ + @JsonProperty(value = "vSphereTags") + private List vSphereTags; + + /* + * The VMware tools version + */ + @JsonProperty(value = "vmwaretools", access = JsonProperty.Access.WRITE_ONLY) + private String vmwaretools; + + /** + * Get the amountOfRam property: The amount of memory. + * + * @return the amountOfRam value. + */ + public Integer amountOfRam() { + return this.amountOfRam; + } + + /** + * Set the amountOfRam property: The amount of memory. + * + * @param amountOfRam the amountOfRam value to set. + * @return the VirtualMachineTemplateProperties object itself. + */ + public VirtualMachineTemplateProperties withAmountOfRam(Integer amountOfRam) { + this.amountOfRam = amountOfRam; + return this; + } + + /** + * Get the controllers property: The list of Virtual Disk Controllers. + * + * @return the controllers value. + */ + public List controllers() { + return this.controllers; + } + + /** + * Set the controllers property: The list of Virtual Disk Controllers. + * + * @param controllers the controllers value to set. + * @return the VirtualMachineTemplateProperties object itself. + */ + public VirtualMachineTemplateProperties withControllers(List controllers) { + this.controllers = controllers; + return this; + } + + /** + * Get the description property: The description of Virtual Machine Template. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of Virtual Machine Template. + * + * @param description the description value to set. + * @return the VirtualMachineTemplateProperties object itself. + */ + public VirtualMachineTemplateProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the disks property: The list of Virtual Disks. + * + * @return the disks value. + */ + public List disks() { + return this.disks; + } + + /** + * Set the disks property: The list of Virtual Disks. + * + * @param disks the disks value to set. + * @return the VirtualMachineTemplateProperties object itself. + */ + public VirtualMachineTemplateProperties withDisks(List disks) { + this.disks = disks; + return this; + } + + /** + * Get the exposeToGuestVM property: Expose Guest OS or not. + * + * @return the exposeToGuestVM value. + */ + public Boolean exposeToGuestVM() { + return this.exposeToGuestVM; + } + + /** + * Set the exposeToGuestVM property: Expose Guest OS or not. + * + * @param exposeToGuestVM the exposeToGuestVM value to set. + * @return the VirtualMachineTemplateProperties object itself. + */ + public VirtualMachineTemplateProperties withExposeToGuestVM(Boolean exposeToGuestVM) { + this.exposeToGuestVM = exposeToGuestVM; + return this; + } + + /** + * Get the guestOS property: The Guest OS. + * + * @return the guestOS value. + */ + public String guestOS() { + return this.guestOS; + } + + /** + * Get the guestOSType property: The Guest OS types. + * + * @return the guestOSType value. + */ + public String guestOSType() { + return this.guestOSType; + } + + /** + * Get the nics property: The list of Virtual NICs. + * + * @return the nics value. + */ + public List nics() { + return this.nics; + } + + /** + * Set the nics property: The list of Virtual NICs. + * + * @param nics the nics value to set. + * @return the VirtualMachineTemplateProperties object itself. + */ + public VirtualMachineTemplateProperties withNics(List nics) { + this.nics = nics; + return this; + } + + /** + * Get the numberOfCores property: The number of CPU cores. + * + * @return the numberOfCores value. + */ + public Integer numberOfCores() { + return this.numberOfCores; + } + + /** + * Set the numberOfCores property: The number of CPU cores. + * + * @param numberOfCores the numberOfCores value to set. + * @return the VirtualMachineTemplateProperties object itself. + */ + public VirtualMachineTemplateProperties withNumberOfCores(Integer numberOfCores) { + this.numberOfCores = numberOfCores; + return this; + } + + /** + * Get the path property: path to folder. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: path to folder. + * + * @param path the path value to set. + * @return the VirtualMachineTemplateProperties object itself. + */ + public VirtualMachineTemplateProperties withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the privateCloudId property: The Private Cloud Id. + * + * @return the privateCloudId value. + */ + public String privateCloudId() { + return this.privateCloudId; + } + + /** + * Set the privateCloudId property: The Private Cloud Id. + * + * @param privateCloudId the privateCloudId value to set. + * @return the VirtualMachineTemplateProperties object itself. + */ + public VirtualMachineTemplateProperties withPrivateCloudId(String privateCloudId) { + this.privateCloudId = privateCloudId; + return this; + } + + /** + * Get the vSphereNetworks property: The list of VSphere networks. + * + * @return the vSphereNetworks value. + */ + public List vSphereNetworks() { + return this.vSphereNetworks; + } + + /** + * Set the vSphereNetworks property: The list of VSphere networks. + * + * @param vSphereNetworks the vSphereNetworks value to set. + * @return the VirtualMachineTemplateProperties object itself. + */ + public VirtualMachineTemplateProperties withVSphereNetworks(List vSphereNetworks) { + this.vSphereNetworks = vSphereNetworks; + return this; + } + + /** + * Get the vSphereTags property: The tags from VSphere. + * + * @return the vSphereTags value. + */ + public List vSphereTags() { + return this.vSphereTags; + } + + /** + * Set the vSphereTags property: The tags from VSphere. + * + * @param vSphereTags the vSphereTags value to set. + * @return the VirtualMachineTemplateProperties object itself. + */ + public VirtualMachineTemplateProperties withVSphereTags(List vSphereTags) { + this.vSphereTags = vSphereTags; + return this; + } + + /** + * Get the vmwaretools property: The VMware tools version. + * + * @return the vmwaretools value. + */ + public String vmwaretools() { + return this.vmwaretools; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (controllers() != null) { + controllers().forEach(e -> e.validate()); + } + if (disks() != null) { + disks().forEach(e -> e.validate()); + } + if (nics() != null) { + nics().forEach(e -> e.validate()); + } + if (privateCloudId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property privateCloudId in model VirtualMachineTemplateProperties")); + } + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualNetworkInner.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualNetworkInner.java index 5fe486de4af7..373f118f4a1f 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualNetworkInner.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualNetworkInner.java @@ -5,15 +5,13 @@ package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Virtual network model. */ -@JsonFlatten @Fluent -public class VirtualNetworkInner { +public final class VirtualNetworkInner { @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkInner.class); /* @@ -41,16 +39,16 @@ public class VirtualNetworkInner { private String name; /* - * {resourceProviderNamespace}/{resourceType} + * Virtual Network properties */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; + @JsonProperty(value = "properties") + private VirtualNetworkProperties innerProperties; /* - * The Private Cloud id + * {resourceProviderNamespace}/{resourceType} */ - @JsonProperty(value = "properties.privateCloudId", access = JsonProperty.Access.WRITE_ONLY) - private String privateCloudId; + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; /** * Get the assignable property: can be used in vm creation/deletion. @@ -99,6 +97,15 @@ public String name() { return this.name; } + /** + * Get the innerProperties property: Virtual Network properties. + * + * @return the innerProperties value. + */ + private VirtualNetworkProperties innerProperties() { + return this.innerProperties; + } + /** * Get the type property: {resourceProviderNamespace}/{resourceType}. * @@ -114,7 +121,7 @@ public String type() { * @return the privateCloudId value. */ public String privateCloudId() { - return this.privateCloudId; + return this.innerProperties() == null ? null : this.innerProperties().privateCloudId(); } /** @@ -128,5 +135,8 @@ public void validate() { .logExceptionAsError( new IllegalArgumentException("Missing required property id in model VirtualNetworkInner")); } + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualNetworkProperties.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualNetworkProperties.java new file mode 100644 index 000000000000..e680a8793331 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/fluent/models/VirtualNetworkProperties.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of virtual network. */ +@Immutable +public final class VirtualNetworkProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkProperties.class); + + /* + * The Private Cloud id + */ + @JsonProperty(value = "privateCloudId", access = JsonProperty.Access.WRITE_ONLY) + private String privateCloudId; + + /** + * Get the privateCloudId property: The Private Cloud id. + * + * @return the privateCloudId value. + */ + public String privateCloudId() { + return this.privateCloudId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/CustomizationPoliciesClientImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/CustomizationPoliciesClientImpl.java index 15d0abe0c6bd..a2aa56bee725 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/CustomizationPoliciesClientImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/CustomizationPoliciesClientImpl.java @@ -113,7 +113,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of customization polices response model. + * @return list of customization polices response model along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -173,7 +174,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of customization polices response model. + * @return list of customization polices response model along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -229,7 +231,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of customization polices response model. + * @return list of customization polices response model as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String regionId, String pcName, String filter) { @@ -245,7 +247,7 @@ private PagedFlux listAsync(String regionId, String pc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of customization polices response model. + * @return list of customization polices response model as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String regionId, String pcName) { @@ -265,7 +267,7 @@ private PagedFlux listAsync(String regionId, String pc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of customization polices response model. + * @return list of customization polices response model as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -283,7 +285,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of customization polices response model. + * @return list of customization polices response model as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String regionId, String pcName) { @@ -302,7 +304,7 @@ public PagedIterable list(String regionId, String pcNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of customization polices response model. + * @return list of customization polices response model as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -319,7 +321,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the virtual machine customization policy. + * @return the virtual machine customization policy along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -374,7 +377,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the virtual machine customization policy. + * @return the virtual machine customization policy along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -425,7 +429,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the virtual machine customization policy. + * @return the virtual machine customization policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String regionId, String pcName, String customizationPolicyName) { @@ -466,7 +470,7 @@ public CustomizationPolicyInner get(String regionId, String pcName, String custo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the virtual machine customization policy. + * @return the virtual machine customization policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -481,7 +485,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of customization polices response model. + * @return list of customization polices response model along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -517,7 +522,8 @@ private Mono> listNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of customization polices response model. + * @return list of customization polices response model along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/DedicatedCloudNodeImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/DedicatedCloudNodeImpl.java index bd09c32ad09c..5dbb4f9192f0 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/DedicatedCloudNodeImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/DedicatedCloudNodeImpl.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.vmwarecloudsimple.models.NodeStatus; import com.azure.resourcemanager.vmwarecloudsimple.models.PatchPayload; import com.azure.resourcemanager.vmwarecloudsimple.models.Sku; +import java.time.OffsetDateTime; import java.util.Collections; import java.util.Map; import java.util.UUID; @@ -62,11 +63,11 @@ public String cloudRackName() { return this.innerModel().cloudRackName(); } - public Object created() { + public OffsetDateTime created() { return this.innerModel().created(); } - public Integer nodesCount() { + public int nodesCount() { return this.innerModel().nodesCount(); } @@ -102,12 +103,12 @@ public String vmwareClusterName() { return this.innerModel().vmwareClusterName(); } - public String idPropertiesSkuDescriptionId() { - return this.innerModel().idPropertiesSkuDescriptionId(); + public String idPropertiesId() { + return this.innerModel().idPropertiesId(); } - public String namePropertiesSkuDescriptionName() { - return this.innerModel().namePropertiesSkuDescriptionName(); + public String namePropertiesName() { + return this.innerModel().namePropertiesName(); } public Region region() { @@ -130,6 +131,8 @@ private com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager man private String dedicatedCloudNodeName; + private String createReferer; + private PatchPayload updateDedicatedCloudNodeRequest; public DedicatedCloudNodeImpl withExistingResourceGroup(String resourceGroupName) { @@ -142,7 +145,8 @@ public DedicatedCloudNode create() { serviceManager .serviceClient() .getDedicatedCloudNodes() - .createOrUpdate(resourceGroupName, dedicatedCloudNodeName, this.innerModel(), Context.NONE); + .createOrUpdate( + resourceGroupName, createReferer, dedicatedCloudNodeName, this.innerModel(), Context.NONE); return this; } @@ -151,7 +155,7 @@ public DedicatedCloudNode create(Context context) { serviceManager .serviceClient() .getDedicatedCloudNodes() - .createOrUpdate(resourceGroupName, dedicatedCloudNodeName, this.innerModel(), context); + .createOrUpdate(resourceGroupName, createReferer, dedicatedCloudNodeName, this.innerModel(), context); return this; } @@ -160,6 +164,7 @@ public DedicatedCloudNode create(Context context) { this.innerObject = new DedicatedCloudNodeInner(); this.serviceManager = serviceManager; this.dedicatedCloudNodeName = name; + this.createReferer = null; } public DedicatedCloudNodeImpl update() { @@ -247,7 +252,7 @@ public DedicatedCloudNodeImpl withAvailabilityZoneId(String availabilityZoneId) return this; } - public DedicatedCloudNodeImpl withNodesCount(Integer nodesCount) { + public DedicatedCloudNodeImpl withNodesCount(int nodesCount) { this.innerModel().withNodesCount(nodesCount); return this; } @@ -262,13 +267,18 @@ public DedicatedCloudNodeImpl withPurchaseId(UUID purchaseId) { return this; } - public DedicatedCloudNodeImpl withIdPropertiesSkuDescriptionId(String idPropertiesSkuDescriptionId) { - this.innerModel().withIdPropertiesSkuDescriptionId(idPropertiesSkuDescriptionId); + public DedicatedCloudNodeImpl withIdPropertiesId(String idPropertiesId) { + this.innerModel().withIdPropertiesId(idPropertiesId); + return this; + } + + public DedicatedCloudNodeImpl withNamePropertiesName(String namePropertiesName) { + this.innerModel().withNamePropertiesName(namePropertiesName); return this; } - public DedicatedCloudNodeImpl withNamePropertiesSkuDescriptionName(String namePropertiesSkuDescriptionName) { - this.innerModel().withNamePropertiesSkuDescriptionName(namePropertiesSkuDescriptionName); + public DedicatedCloudNodeImpl withReferer(String referer) { + this.createReferer = referer; return this; } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/DedicatedCloudNodesClientImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/DedicatedCloudNodesClientImpl.java index a5380f59a812..d1556f9e55f3 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/DedicatedCloudNodesClientImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/DedicatedCloudNodesClientImpl.java @@ -193,7 +193,8 @@ Mono> listByResourceGroupNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -246,7 +247,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -295,7 +297,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter, Integer top, String skipToken) { @@ -309,7 +311,7 @@ private PagedFlux listAsync(String filter, Integer top, * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -331,7 +333,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -346,7 +348,7 @@ private PagedFlux listAsync( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -366,7 +368,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Integer top, String skipToken, Context context) { @@ -383,7 +385,8 @@ public PagedIterable list(String filter, Integer top, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -442,7 +445,8 @@ private Mono> listByResourceGroupSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -497,7 +501,7 @@ private Mono> listByResourceGroupSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -514,7 +518,7 @@ private PagedFlux listByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -537,7 +541,7 @@ private PagedFlux listByResourceGroupAsync(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -554,7 +558,7 @@ private PagedFlux listByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -575,7 +579,7 @@ public PagedIterable listByResourceGroup(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup( @@ -591,7 +595,7 @@ public PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud node model. + * @return dedicated cloud node model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -642,7 +646,7 @@ private Mono> getByResourceGroupWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud node model. + * @return dedicated cloud node model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -689,7 +693,7 @@ private Mono> getByResourceGroupWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud node model. + * @return dedicated cloud node model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync( @@ -729,7 +733,7 @@ public DedicatedCloudNodeInner getByResourceGroup(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud node model. + * @return dedicated cloud node model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -741,16 +745,20 @@ public Response getByResourceGroupWithResponse( * Returns dedicated cloud node by its name. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param dedicatedCloudNodeName dedicated cloud node name. * @param dedicatedCloudNodeRequest Create Dedicated Cloud Node 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 dedicated cloud node model. + * @return dedicated cloud node model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String dedicatedCloudNodeName, DedicatedCloudNodeInner dedicatedCloudNodeRequest) { + String resourceGroupName, + String referer, + String dedicatedCloudNodeName, + DedicatedCloudNodeInner dedicatedCloudNodeRequest) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -767,10 +775,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (this.client.getReferer() == null) { - return Mono - .error( - new IllegalArgumentException("Parameter this.client.getReferer() is required and cannot be null.")); + if (referer == null) { + return Mono.error(new IllegalArgumentException("Parameter referer is required and cannot be null.")); } if (dedicatedCloudNodeName == null) { return Mono @@ -794,7 +800,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getReferer(), + referer, dedicatedCloudNodeName, this.client.getApiVersion(), dedicatedCloudNodeRequest, @@ -807,17 +813,19 @@ private Mono>> createOrUpdateWithResponseAsync( * Returns dedicated cloud node by its name. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param dedicatedCloudNodeName dedicated cloud node name. * @param dedicatedCloudNodeRequest Create Dedicated Cloud Node 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 dedicated cloud node model. + * @return dedicated cloud node model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( String resourceGroupName, + String referer, String dedicatedCloudNodeName, DedicatedCloudNodeInner dedicatedCloudNodeRequest, Context context) { @@ -837,10 +845,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (this.client.getReferer() == null) { - return Mono - .error( - new IllegalArgumentException("Parameter this.client.getReferer() is required and cannot be null.")); + if (referer == null) { + return Mono.error(new IllegalArgumentException("Parameter referer is required and cannot be null.")); } if (dedicatedCloudNodeName == null) { return Mono @@ -862,7 +868,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getReferer(), + referer, dedicatedCloudNodeName, this.client.getApiVersion(), dedicatedCloudNodeRequest, @@ -874,18 +880,23 @@ private Mono>> createOrUpdateWithResponseAsync( * Returns dedicated cloud node by its name. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param dedicatedCloudNodeName dedicated cloud node name. * @param dedicatedCloudNodeRequest Create Dedicated Cloud Node 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 dedicated cloud node model. + * @return the {@link PollerFlux} for polling of dedicated cloud node model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DedicatedCloudNodeInner> beginCreateOrUpdateAsync( - String resourceGroupName, String dedicatedCloudNodeName, DedicatedCloudNodeInner dedicatedCloudNodeRequest) { + String resourceGroupName, + String referer, + String dedicatedCloudNodeName, + DedicatedCloudNodeInner dedicatedCloudNodeRequest) { Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, dedicatedCloudNodeName, dedicatedCloudNodeRequest); + createOrUpdateWithResponseAsync( + resourceGroupName, referer, dedicatedCloudNodeName, dedicatedCloudNodeRequest); return this .client .getLroResult( @@ -893,31 +904,33 @@ private PollerFlux, DedicatedCloudNodeInner> this.client.getHttpPipeline(), DedicatedCloudNodeInner.class, DedicatedCloudNodeInner.class, - Context.NONE); + this.client.getContext()); } /** * Returns dedicated cloud node by its name. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param dedicatedCloudNodeName dedicated cloud node name. * @param dedicatedCloudNodeRequest Create Dedicated Cloud Node 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 dedicated cloud node model. + * @return the {@link PollerFlux} for polling of dedicated cloud node model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DedicatedCloudNodeInner> beginCreateOrUpdateAsync( String resourceGroupName, + String referer, String dedicatedCloudNodeName, DedicatedCloudNodeInner dedicatedCloudNodeRequest, Context context) { context = this.client.mergeContext(context); Mono>> mono = createOrUpdateWithResponseAsync( - resourceGroupName, dedicatedCloudNodeName, dedicatedCloudNodeRequest, context); + resourceGroupName, referer, dedicatedCloudNodeName, dedicatedCloudNodeRequest, context); return this .client .getLroResult( @@ -932,17 +945,21 @@ private PollerFlux, DedicatedCloudNodeInner> * Returns dedicated cloud node by its name. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param dedicatedCloudNodeName dedicated cloud node name. * @param dedicatedCloudNodeRequest Create Dedicated Cloud Node 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 dedicated cloud node model. + * @return the {@link SyncPoller} for polling of dedicated cloud node model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DedicatedCloudNodeInner> beginCreateOrUpdate( - String resourceGroupName, String dedicatedCloudNodeName, DedicatedCloudNodeInner dedicatedCloudNodeRequest) { - return beginCreateOrUpdateAsync(resourceGroupName, dedicatedCloudNodeName, dedicatedCloudNodeRequest) + String resourceGroupName, + String referer, + String dedicatedCloudNodeName, + DedicatedCloudNodeInner dedicatedCloudNodeRequest) { + return beginCreateOrUpdateAsync(resourceGroupName, referer, dedicatedCloudNodeName, dedicatedCloudNodeRequest) .getSyncPoller(); } @@ -950,21 +967,24 @@ public SyncPoller, DedicatedCloudNodeInner> * Returns dedicated cloud node by its name. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param dedicatedCloudNodeName dedicated cloud node name. * @param dedicatedCloudNodeRequest Create Dedicated Cloud Node 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 dedicated cloud node model. + * @return the {@link SyncPoller} for polling of dedicated cloud node model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DedicatedCloudNodeInner> beginCreateOrUpdate( String resourceGroupName, + String referer, String dedicatedCloudNodeName, DedicatedCloudNodeInner dedicatedCloudNodeRequest, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, dedicatedCloudNodeName, dedicatedCloudNodeRequest, context) + return beginCreateOrUpdateAsync( + resourceGroupName, referer, dedicatedCloudNodeName, dedicatedCloudNodeRequest, context) .getSyncPoller(); } @@ -972,17 +992,21 @@ public SyncPoller, DedicatedCloudNodeInner> * Returns dedicated cloud node by its name. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param dedicatedCloudNodeName dedicated cloud node name. * @param dedicatedCloudNodeRequest Create Dedicated Cloud Node 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 dedicated cloud node model. + * @return dedicated cloud node model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( - String resourceGroupName, String dedicatedCloudNodeName, DedicatedCloudNodeInner dedicatedCloudNodeRequest) { - return beginCreateOrUpdateAsync(resourceGroupName, dedicatedCloudNodeName, dedicatedCloudNodeRequest) + String resourceGroupName, + String referer, + String dedicatedCloudNodeName, + DedicatedCloudNodeInner dedicatedCloudNodeRequest) { + return beginCreateOrUpdateAsync(resourceGroupName, referer, dedicatedCloudNodeName, dedicatedCloudNodeRequest) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -991,21 +1015,24 @@ private Mono createOrUpdateAsync( * Returns dedicated cloud node by its name. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param dedicatedCloudNodeName dedicated cloud node name. * @param dedicatedCloudNodeRequest Create Dedicated Cloud Node 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 dedicated cloud node model. + * @return dedicated cloud node model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( String resourceGroupName, + String referer, String dedicatedCloudNodeName, DedicatedCloudNodeInner dedicatedCloudNodeRequest, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, dedicatedCloudNodeName, dedicatedCloudNodeRequest, context) + return beginCreateOrUpdateAsync( + resourceGroupName, referer, dedicatedCloudNodeName, dedicatedCloudNodeRequest, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1014,6 +1041,7 @@ private Mono createOrUpdateAsync( * Returns dedicated cloud node by its name. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param dedicatedCloudNodeName dedicated cloud node name. * @param dedicatedCloudNodeRequest Create Dedicated Cloud Node request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1023,14 +1051,19 @@ private Mono createOrUpdateAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public DedicatedCloudNodeInner createOrUpdate( - String resourceGroupName, String dedicatedCloudNodeName, DedicatedCloudNodeInner dedicatedCloudNodeRequest) { - return createOrUpdateAsync(resourceGroupName, dedicatedCloudNodeName, dedicatedCloudNodeRequest).block(); + String resourceGroupName, + String referer, + String dedicatedCloudNodeName, + DedicatedCloudNodeInner dedicatedCloudNodeRequest) { + return createOrUpdateAsync(resourceGroupName, referer, dedicatedCloudNodeName, dedicatedCloudNodeRequest) + .block(); } /** * Returns dedicated cloud node by its name. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param dedicatedCloudNodeName dedicated cloud node name. * @param dedicatedCloudNodeRequest Create Dedicated Cloud Node request. * @param context The context to associate with this operation. @@ -1042,10 +1075,12 @@ public DedicatedCloudNodeInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) public DedicatedCloudNodeInner createOrUpdate( String resourceGroupName, + String referer, String dedicatedCloudNodeName, DedicatedCloudNodeInner dedicatedCloudNodeRequest, Context context) { - return createOrUpdateAsync(resourceGroupName, dedicatedCloudNodeName, dedicatedCloudNodeRequest, context) + return createOrUpdateAsync( + resourceGroupName, referer, dedicatedCloudNodeName, dedicatedCloudNodeRequest, context) .block(); } @@ -1057,7 +1092,7 @@ public DedicatedCloudNodeInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String dedicatedCloudNodeName) { @@ -1107,7 +1142,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -1154,7 +1189,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String dedicatedCloudNodeName) { @@ -1185,7 +1220,7 @@ public void delete(String resourceGroupName, String dedicatedCloudNodeName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String dedicatedCloudNodeName, Context context) { @@ -1201,7 +1236,7 @@ public Response deleteWithResponse(String resourceGroupName, String dedica * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud node model. + * @return dedicated cloud node model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1262,7 +1297,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud node model. + * @return dedicated cloud node model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1322,7 +1357,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud node model. + * @return dedicated cloud node model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1365,7 +1400,7 @@ public DedicatedCloudNodeInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud node model. + * @return dedicated cloud node model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1384,7 +1419,8 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1421,7 +1457,8 @@ private Mono> listBySubscriptionNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync( @@ -1457,7 +1494,8 @@ private Mono> listBySubscriptionNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1494,7 +1532,8 @@ private Mono> listByResourceGroupNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/DedicatedCloudNodesImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/DedicatedCloudNodesImpl.java index fa5d6ef9c9d8..75fd7824fd46 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/DedicatedCloudNodesImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/DedicatedCloudNodesImpl.java @@ -144,7 +144,7 @@ public void deleteById(String id) { .format( "The resource ID '%s' is not valid. Missing path segment 'dedicatedCloudNodes'.", id))); } - this.deleteWithResponse(resourceGroupName, dedicatedCloudNodeName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, dedicatedCloudNodeName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/DedicatedCloudServicesClientImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/DedicatedCloudServicesClientImpl.java index 97a8ab2d15a7..96b723eae54d 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/DedicatedCloudServicesClientImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/DedicatedCloudServicesClientImpl.java @@ -193,7 +193,8 @@ Mono> listByResourceGroupNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -246,7 +247,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -295,7 +297,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter, Integer top, String skipToken) { @@ -309,7 +311,7 @@ private PagedFlux listAsync(String filter, Integer t * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -331,7 +333,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -346,7 +348,7 @@ private PagedFlux listAsync( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -366,7 +368,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -384,7 +386,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -443,7 +446,8 @@ private Mono> listByResourceGroupSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -498,7 +502,7 @@ private Mono> listByResourceGroupSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -515,7 +519,7 @@ private PagedFlux listByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -538,7 +542,7 @@ private PagedFlux listByResourceGroupAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -555,7 +559,7 @@ private PagedFlux listByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -576,7 +580,7 @@ public PagedIterable listByResourceGroup(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup( @@ -592,7 +596,7 @@ public PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -644,7 +648,7 @@ private Mono> getByResourceGroupWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -692,7 +696,7 @@ private Mono> getByResourceGroupWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync( @@ -732,7 +736,7 @@ public DedicatedCloudServiceInner getByResourceGroup(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -749,7 +753,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -813,7 +817,7 @@ private Mono> createOrUpdateWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -874,7 +878,7 @@ private Mono> createOrUpdateWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -922,7 +926,7 @@ public DedicatedCloudServiceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -943,7 +947,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -995,7 +999,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1043,15 +1047,16 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String dedicatedCloudServiceName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, dedicatedCloudServiceName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1063,9 +1068,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String dedicatedCloudServiceName, Context context) { context = this.client.mergeContext(context); @@ -1084,9 +1089,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String dedicatedCloudServiceName) { return beginDeleteAsync(resourceGroupName, dedicatedCloudServiceName).getSyncPoller(); } @@ -1100,9 +1105,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String dedicatedCloudServiceName, Context context) { return beginDeleteAsync(resourceGroupName, dedicatedCloudServiceName, context).getSyncPoller(); @@ -1116,7 +1121,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String dedicatedCloudServiceName) { @@ -1134,7 +1139,7 @@ private Mono deleteAsync(String resourceGroupName, String dedicatedCloudSe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String dedicatedCloudServiceName, Context context) { @@ -1181,7 +1186,7 @@ public void delete(String resourceGroupName, String dedicatedCloudServiceName, C * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1243,7 +1248,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1304,7 +1309,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1347,7 +1352,7 @@ public DedicatedCloudServiceInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1367,7 +1372,8 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1404,7 +1410,8 @@ private Mono> listBySubscriptionNextSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync( @@ -1440,7 +1447,8 @@ private Mono> listBySubscriptionNextSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1477,7 +1485,8 @@ private Mono> listByResourceGroupNextS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/OperationsClientImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/OperationsClientImpl.java index 07fb2e4f0df3..313ceea6811d 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/OperationsClientImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/OperationsClientImpl.java @@ -103,7 +103,7 @@ Mono> listNext( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of available operations. + * @return list of available operations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -136,7 +136,7 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of available operations. + * @return list of available operations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -166,7 +166,7 @@ private Mono> listSinglePageAsync(Context * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of available operations. + * @return list of available operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -180,7 +180,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of available operations. + * @return list of available operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -193,7 +193,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of available operations. + * @return list of available operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -207,7 +207,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of available operations. + * @return list of available operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -218,14 +218,15 @@ public PagedIterable list(Context context) { * Return an async operation. * * @param regionId The region Id (westus, eastus). + * @param referer referer url. * @param operationId operation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status response. + * @return operation status response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync(String regionId, String operationId) { + private Mono getWithResponseAsync(String regionId, String referer, String operationId) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -241,10 +242,8 @@ private Mono getWithResponseAsync(String regionId, String if (regionId == null) { return Mono.error(new IllegalArgumentException("Parameter regionId is required and cannot be null.")); } - if (this.client.getReferer() == null) { - return Mono - .error( - new IllegalArgumentException("Parameter this.client.getReferer() is required and cannot be null.")); + if (referer == null) { + return Mono.error(new IllegalArgumentException("Parameter referer is required and cannot be null.")); } if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); @@ -259,7 +258,7 @@ private Mono getWithResponseAsync(String regionId, String this.client.getSubscriptionId(), this.client.getApiVersion(), regionId, - this.client.getReferer(), + referer, operationId, accept, context)) @@ -270,15 +269,17 @@ private Mono getWithResponseAsync(String regionId, String * Return an async operation. * * @param regionId The region Id (westus, eastus). + * @param referer referer url. * @param operationId operation id. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status response. + * @return operation status response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync(String regionId, String operationId, Context context) { + private Mono getWithResponseAsync( + String regionId, String referer, String operationId, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -294,10 +295,8 @@ private Mono getWithResponseAsync(String regionId, String if (regionId == null) { return Mono.error(new IllegalArgumentException("Parameter regionId is required and cannot be null.")); } - if (this.client.getReferer() == null) { - return Mono - .error( - new IllegalArgumentException("Parameter this.client.getReferer() is required and cannot be null.")); + if (referer == null) { + return Mono.error(new IllegalArgumentException("Parameter referer is required and cannot be null.")); } if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); @@ -310,7 +309,7 @@ private Mono getWithResponseAsync(String regionId, String this.client.getSubscriptionId(), this.client.getApiVersion(), regionId, - this.client.getReferer(), + referer, operationId, accept, context); @@ -320,15 +319,16 @@ private Mono getWithResponseAsync(String regionId, String * Return an async operation. * * @param regionId The region Id (westus, eastus). + * @param referer referer url. * @param operationId operation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status response. + * @return operation status response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String regionId, String operationId) { - return getWithResponseAsync(regionId, operationId) + private Mono getAsync(String regionId, String referer, String operationId) { + return getWithResponseAsync(regionId, referer, operationId) .flatMap( (OperationsGetResponse res) -> { if (res.getValue() != null) { @@ -343,6 +343,7 @@ private Mono getAsync(String regionId, String operationI * Return an async operation. * * @param regionId The region Id (westus, eastus). + * @param referer referer url. * @param operationId operation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -350,14 +351,15 @@ private Mono getAsync(String regionId, String operationI * @return operation status response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationResourceInner get(String regionId, String operationId) { - return getAsync(regionId, operationId).block(); + public OperationResourceInner get(String regionId, String referer, String operationId) { + return getAsync(regionId, referer, operationId).block(); } /** * Return an async operation. * * @param regionId The region Id (westus, eastus). + * @param referer referer url. * @param operationId operation id. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -366,8 +368,8 @@ public OperationResourceInner get(String regionId, String operationId) { * @return operation status response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationsGetResponse getWithResponse(String regionId, String operationId, Context context) { - return getWithResponseAsync(regionId, operationId, context).block(); + public OperationsGetResponse getWithResponse(String regionId, String referer, String operationId, Context context) { + return getWithResponseAsync(regionId, referer, operationId, context).block(); } /** @@ -377,7 +379,7 @@ public OperationsGetResponse getWithResponse(String regionId, String operationId * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of available operations. + * @return list of available operations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -413,7 +415,7 @@ private Mono> listNextSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of available operations. + * @return list of available operations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/OperationsImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/OperationsImpl.java index 6bf6e5ab6d59..74dac6a92103 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/OperationsImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/OperationsImpl.java @@ -42,8 +42,8 @@ public PagedIterable list(Context context) { return Utils.mapPage(inner, inner1 -> new AvailableOperationImpl(inner1, this.manager())); } - public OperationResource get(String regionId, String operationId) { - OperationResourceInner inner = this.serviceClient().get(regionId, operationId); + public OperationResource get(String regionId, String referer, String operationId) { + OperationResourceInner inner = this.serviceClient().get(regionId, referer, operationId); if (inner != null) { return new OperationResourceImpl(inner, this.manager()); } else { @@ -51,8 +51,9 @@ public OperationResource get(String regionId, String operationId) { } } - public Response getWithResponse(String regionId, String operationId, Context context) { - OperationsGetResponse inner = this.serviceClient().getWithResponse(regionId, operationId, context); + public Response getWithResponse( + String regionId, String referer, String operationId, Context context) { + OperationsGetResponse inner = this.serviceClient().getWithResponse(regionId, referer, operationId, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/PrivateCloudsClientImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/PrivateCloudsClientImpl.java index bdc08b228bc7..e1faa5e68a55 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/PrivateCloudsClientImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/PrivateCloudsClientImpl.java @@ -104,7 +104,7 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private clouds. + * @return list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String regionId) { @@ -155,7 +155,7 @@ private Mono> listSinglePageAsync(String region * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private clouds. + * @return list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String regionId, Context context) { @@ -202,7 +202,7 @@ private Mono> listSinglePageAsync(String region * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private clouds. + * @return list of private clouds as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String regionId) { @@ -217,7 +217,7 @@ private PagedFlux listAsync(String regionId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private clouds. + * @return list of private clouds as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String regionId, Context context) { @@ -232,7 +232,7 @@ private PagedFlux listAsync(String regionId, Context context) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private clouds. + * @return list of private clouds as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String regionId) { @@ -247,7 +247,7 @@ public PagedIterable list(String regionId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private clouds. + * @return list of private clouds as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String regionId, Context context) { @@ -262,7 +262,7 @@ public PagedIterable list(String regionId, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private cloud model. + * @return private cloud model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String pcName, String regionId) { @@ -309,7 +309,7 @@ private Mono> getWithResponseAsync(String pcName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private cloud model. + * @return private cloud model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String pcName, String regionId, Context context) { @@ -352,7 +352,7 @@ private Mono> getWithResponseAsync(String pcName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private cloud model. + * @return private cloud model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String pcName, String regionId) { @@ -391,7 +391,7 @@ public PrivateCloudInner get(String pcName, String regionId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private cloud model. + * @return private cloud model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String pcName, String regionId, Context context) { @@ -405,7 +405,7 @@ public Response getWithResponse(String pcName, String regionI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private clouds. + * @return list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -441,7 +441,7 @@ private Mono> listNextSinglePageAsync(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private clouds. + * @return list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/ResourcePoolsClientImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/ResourcePoolsClientImpl.java index 75577c388bb4..29f43455ff5c 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/ResourcePoolsClientImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/ResourcePoolsClientImpl.java @@ -109,7 +109,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource pools response model. + * @return list of resource pools response model along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String regionId, String pcName) { @@ -165,7 +166,8 @@ private Mono> listSinglePageAsync(String region * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource pools response model. + * @return list of resource pools response model along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -218,7 +220,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource pools response model. + * @return list of resource pools response model as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String regionId, String pcName) { @@ -235,7 +237,7 @@ private PagedFlux listAsync(String regionId, String pcName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource pools response model. + * @return list of resource pools response model as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String regionId, String pcName, Context context) { @@ -252,7 +254,7 @@ private PagedFlux listAsync(String regionId, String pcName, C * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource pools response model. + * @return list of resource pools response model as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String regionId, String pcName) { @@ -268,7 +270,7 @@ public PagedIterable list(String regionId, String pcName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource pools response model. + * @return list of resource pools response model as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String regionId, String pcName, Context context) { @@ -284,7 +286,7 @@ public PagedIterable list(String regionId, String pcName, Con * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return resource pool model. + * @return resource pool model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -338,7 +340,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return resource pool model. + * @return resource pool model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -388,7 +390,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return resource pool model. + * @return resource pool model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String regionId, String pcName, String resourcePoolName) { @@ -429,7 +431,7 @@ public ResourcePoolInner get(String regionId, String pcName, String resourcePool * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return resource pool model. + * @return resource pool model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -444,7 +446,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource pools response model. + * @return list of resource pools response model along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -480,7 +483,8 @@ private Mono> listNextSinglePageAsync(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource pools response model. + * @return list of resource pools response model along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/SkusAvailabilitiesClientImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/SkusAvailabilitiesClientImpl.java index 54208269849c..e4d94961b064 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/SkusAvailabilitiesClientImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/SkusAvailabilitiesClientImpl.java @@ -92,7 +92,7 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU availabilities. + * @return list of SKU availabilities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String regionId, String skuId) { @@ -145,7 +145,7 @@ private Mono> listSinglePageAsync(String reg * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU availabilities. + * @return list of SKU availabilities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -195,7 +195,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU availabilities. + * @return list of SKU availabilities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String regionId, String skuId) { @@ -210,7 +210,7 @@ private PagedFlux listAsync(String regionId, String skuId) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU availabilities. + * @return list of SKU availabilities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String regionId) { @@ -228,7 +228,7 @@ private PagedFlux listAsync(String regionId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU availabilities. + * @return list of SKU availabilities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String regionId, String skuId, Context context) { @@ -244,7 +244,7 @@ private PagedFlux listAsync(String regionId, String skuId, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU availabilities. + * @return list of SKU availabilities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String regionId) { @@ -261,7 +261,7 @@ public PagedIterable list(String regionId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU availabilities. + * @return list of SKU availabilities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String regionId, String skuId, Context context) { @@ -275,7 +275,7 @@ public PagedIterable list(String regionId, String skuId, C * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU availabilities. + * @return list of SKU availabilities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -311,7 +311,7 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU availabilities. + * @return list of SKU availabilities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/UsagesClientImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/UsagesClientImpl.java index 53248f1074c0..2e3b647b35ff 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/UsagesClientImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/UsagesClientImpl.java @@ -91,7 +91,7 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of usages. + * @return list of usages along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String regionId, String filter) { @@ -145,7 +145,7 @@ private Mono> listSinglePageAsync(String regionId, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of usages. + * @return list of usages along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String regionId, String filter, Context context) { @@ -195,7 +195,7 @@ private Mono> listSinglePageAsync(String regionId, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of usages. + * @return list of usages as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String regionId, String filter) { @@ -210,7 +210,7 @@ private PagedFlux listAsync(String regionId, String filter) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of usages. + * @return list of usages as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String regionId) { @@ -229,7 +229,7 @@ private PagedFlux listAsync(String regionId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of usages. + * @return list of usages as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String regionId, String filter, Context context) { @@ -245,7 +245,7 @@ private PagedFlux listAsync(String regionId, String filter, Context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of usages. + * @return list of usages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String regionId) { @@ -263,7 +263,7 @@ public PagedIterable list(String regionId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of usages. + * @return list of usages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String regionId, String filter, Context context) { @@ -277,7 +277,7 @@ public PagedIterable list(String regionId, String filter, Context co * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of usages. + * @return list of usages along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -313,7 +313,7 @@ private Mono> listNextSinglePageAsync(String nextLink) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of usages. + * @return list of usages along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VMwareCloudSimpleBuilder.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VMwareCloudSimpleBuilder.java index 85d56b4ee31c..9ec5f556491b 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VMwareCloudSimpleBuilder.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VMwareCloudSimpleBuilder.java @@ -34,22 +34,6 @@ public VMwareCloudSimpleBuilder subscriptionId(String subscriptionId) { return this; } - /* - * referer url - */ - private String referer; - - /** - * Sets referer url. - * - * @param referer the referer value. - * @return the VMwareCloudSimpleBuilder. - */ - public VMwareCloudSimpleBuilder referer(String referer) { - this.referer = referer; - return this; - } - /* * server parameter */ @@ -156,7 +140,7 @@ public VMwareCloudSimpleImpl buildClient() { } VMwareCloudSimpleImpl client = new VMwareCloudSimpleImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, referer, endpoint); + pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); return client; } } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VMwareCloudSimpleImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VMwareCloudSimpleImpl.java index 2ef4321b179c..ec1f1f8c7cf8 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VMwareCloudSimpleImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VMwareCloudSimpleImpl.java @@ -60,18 +60,6 @@ public String getSubscriptionId() { return this.subscriptionId; } - /** referer url. */ - private final String referer; - - /** - * Gets referer url. - * - * @return the referer value. - */ - public String getReferer() { - return this.referer; - } - /** server parameter. */ private final String endpoint; @@ -272,7 +260,6 @@ public VirtualMachinesClient getVirtualMachines() { * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. * @param subscriptionId The subscription ID. - * @param referer referer url. * @param endpoint server parameter. */ VMwareCloudSimpleImpl( @@ -281,13 +268,11 @@ public VirtualMachinesClient getVirtualMachines() { Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, - String referer, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; - this.referer = referer; this.endpoint = endpoint; this.apiVersion = "2019-04-01"; this.operations = new OperationsClientImpl(this); diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachineImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachineImpl.java index 39a5ae2118b3..a18353601ec4 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachineImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachineImpl.java @@ -13,12 +13,10 @@ import com.azure.resourcemanager.vmwarecloudsimple.models.GuestOSType; import com.azure.resourcemanager.vmwarecloudsimple.models.PatchPayload; import com.azure.resourcemanager.vmwarecloudsimple.models.ResourcePool; -import com.azure.resourcemanager.vmwarecloudsimple.models.StopMode; import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualDisk; import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualDiskController; import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualMachine; import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualMachineStatus; -import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualMachineStopMode; import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualNic; import java.util.Collections; import java.util.List; @@ -55,7 +53,7 @@ public Map tags() { } } - public Integer amountOfRam() { + public int amountOfRam() { return this.innerModel().amountOfRam(); } @@ -115,7 +113,7 @@ public List nics() { } } - public Integer numberOfCores() { + public int numberOfCores() { return this.innerModel().numberOfCores(); } @@ -193,6 +191,8 @@ private com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager man private String virtualMachineName; + private String createReferer; + private PatchPayload updateVirtualMachineRequest; public VirtualMachineImpl withExistingResourceGroup(String resourceGroupName) { @@ -205,7 +205,7 @@ public VirtualMachine create() { serviceManager .serviceClient() .getVirtualMachines() - .createOrUpdate(resourceGroupName, virtualMachineName, this.innerModel(), Context.NONE); + .createOrUpdate(resourceGroupName, createReferer, virtualMachineName, this.innerModel(), Context.NONE); return this; } @@ -214,7 +214,7 @@ public VirtualMachine create(Context context) { serviceManager .serviceClient() .getVirtualMachines() - .createOrUpdate(resourceGroupName, virtualMachineName, this.innerModel(), context); + .createOrUpdate(resourceGroupName, createReferer, virtualMachineName, this.innerModel(), context); return this; } @@ -223,6 +223,7 @@ public VirtualMachine create(Context context) { this.innerObject = new VirtualMachineInner(); this.serviceManager = serviceManager; this.virtualMachineName = name; + this.createReferer = null; } public VirtualMachineImpl update() { @@ -277,26 +278,6 @@ public VirtualMachine refresh(Context context) { return this; } - public void start() { - serviceManager.virtualMachines().start(resourceGroupName, virtualMachineName); - } - - public void start(Context context) { - serviceManager.virtualMachines().start(resourceGroupName, virtualMachineName, context); - } - - public void stop(StopMode mode, VirtualMachineStopMode m) { - serviceManager.virtualMachines().stop(resourceGroupName, virtualMachineName, mode, m); - } - - public void stop() { - serviceManager.virtualMachines().stop(resourceGroupName, virtualMachineName); - } - - public void stop(StopMode mode, VirtualMachineStopMode m, Context context) { - serviceManager.virtualMachines().stop(resourceGroupName, virtualMachineName, mode, m, context); - } - public VirtualMachineImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -317,7 +298,7 @@ public VirtualMachineImpl withTags(Map tags) { } } - public VirtualMachineImpl withAmountOfRam(Integer amountOfRam) { + public VirtualMachineImpl withAmountOfRam(int amountOfRam) { this.innerModel().withAmountOfRam(amountOfRam); return this; } @@ -342,7 +323,7 @@ public VirtualMachineImpl withNics(List nics) { return this; } - public VirtualMachineImpl withNumberOfCores(Integer numberOfCores) { + public VirtualMachineImpl withNumberOfCores(int numberOfCores) { this.innerModel().withNumberOfCores(numberOfCores); return this; } @@ -377,6 +358,11 @@ public VirtualMachineImpl withVSphereNetworks(List vSphereNetworks) { return this; } + public VirtualMachineImpl withReferer(String referer) { + this.createReferer = referer; + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachinePropertiesImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachinePropertiesImpl.java new file mode 100644 index 000000000000..ac48a0bf4f87 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachinePropertiesImpl.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.implementation; + +import com.azure.resourcemanager.vmwarecloudsimple.fluent.models.ResourcePoolInner; +import com.azure.resourcemanager.vmwarecloudsimple.fluent.models.VirtualMachinePropertiesInner; +import com.azure.resourcemanager.vmwarecloudsimple.fluent.models.VirtualNicInner; +import com.azure.resourcemanager.vmwarecloudsimple.models.GuestOSCustomization; +import com.azure.resourcemanager.vmwarecloudsimple.models.GuestOSType; +import com.azure.resourcemanager.vmwarecloudsimple.models.ResourcePool; +import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualDisk; +import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualDiskController; +import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualMachineProperties; +import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualMachineStatus; +import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualNic; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class VirtualMachinePropertiesImpl implements VirtualMachineProperties { + private VirtualMachinePropertiesInner innerObject; + + private final com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager serviceManager; + + VirtualMachinePropertiesImpl( + VirtualMachinePropertiesInner innerObject, + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public int amountOfRam() { + return this.innerModel().amountOfRam(); + } + + public List controllers() { + List inner = this.innerModel().controllers(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public GuestOSCustomization customization() { + return this.innerModel().customization(); + } + + public List disks() { + List inner = this.innerModel().disks(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String dnsname() { + return this.innerModel().dnsname(); + } + + public Boolean exposeToGuestVM() { + return this.innerModel().exposeToGuestVM(); + } + + public String folder() { + return this.innerModel().folder(); + } + + public String guestOS() { + return this.innerModel().guestOS(); + } + + public GuestOSType guestOSType() { + return this.innerModel().guestOSType(); + } + + public List nics() { + List inner = this.innerModel().nics(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new VirtualNicImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public int numberOfCores() { + return this.innerModel().numberOfCores(); + } + + public String password() { + return this.innerModel().password(); + } + + public String privateCloudId() { + return this.innerModel().privateCloudId(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public String publicIp() { + return this.innerModel().publicIp(); + } + + public ResourcePool resourcePool() { + ResourcePoolInner inner = this.innerModel().resourcePool(); + if (inner != null) { + return new ResourcePoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public VirtualMachineStatus status() { + return this.innerModel().status(); + } + + public String templateId() { + return this.innerModel().templateId(); + } + + public String username() { + return this.innerModel().username(); + } + + public List vSphereNetworks() { + List inner = this.innerModel().vSphereNetworks(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String vmId() { + return this.innerModel().vmId(); + } + + public String vmwaretools() { + return this.innerModel().vmwaretools(); + } + + public VirtualMachinePropertiesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachineTemplatesClientImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachineTemplatesClientImpl.java index 8b261de8c2b0..686310a8843b 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachineTemplatesClientImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachineTemplatesClientImpl.java @@ -112,7 +112,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machine templates. + * @return list of virtual machine templates along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -175,7 +176,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machine templates. + * @return list of virtual machine templates along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -234,7 +236,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machine templates. + * @return list of virtual machine templates as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String pcName, String regionId, String resourcePoolName) { @@ -253,7 +255,7 @@ private PagedFlux listAsync(String pcName, String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machine templates. + * @return list of virtual machine templates as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -272,7 +274,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machine templates. + * @return list of virtual machine templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String pcName, String regionId, String resourcePoolName) { @@ -289,7 +291,7 @@ public PagedIterable list(String pcName, String reg * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machine templates. + * @return list of virtual machine templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -306,7 +308,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine template model. + * @return virtual machine template model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -362,7 +364,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine template model. + * @return virtual machine template model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -414,7 +416,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine template model. + * @return virtual machine template model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -456,7 +458,7 @@ public VirtualMachineTemplateInner get(String regionId, String pcName, String vi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine template model. + * @return virtual machine template model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -471,7 +473,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machine templates. + * @return list of virtual machine templates along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -507,7 +510,8 @@ private Mono> listNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machine templates. + * @return list of virtual machine templates along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachinesClientImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachinesClientImpl.java index d63383639838..8d1e0d92f2a5 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachinesClientImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachinesClientImpl.java @@ -231,7 +231,7 @@ Mono> listByResourceGroupNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String filter, Integer top, String skipToken) { @@ -283,7 +283,7 @@ private Mono> listSinglePageAsync(String filt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -332,7 +332,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter, Integer top, String skipToken) { @@ -346,7 +346,7 @@ private PagedFlux listAsync(String filter, Integer top, Str * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -368,7 +368,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter, Integer top, String skipToken, Context context) { @@ -382,7 +382,7 @@ private PagedFlux listAsync(String filter, Integer top, Str * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -402,7 +402,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String filter, Integer top, String skipToken, Context context) { @@ -419,7 +419,7 @@ public PagedIterable list(String filter, Integer top, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -478,7 +478,7 @@ private Mono> listByResourceGroupSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -533,7 +533,7 @@ private Mono> listByResourceGroupSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -550,7 +550,7 @@ private PagedFlux listByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -573,7 +573,7 @@ private PagedFlux listByResourceGroupAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -590,7 +590,7 @@ private PagedFlux listByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -611,7 +611,7 @@ public PagedIterable listByResourceGroup(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup( @@ -627,7 +627,7 @@ public PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -677,7 +677,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -723,7 +723,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String virtualMachineName) { @@ -762,7 +762,7 @@ public VirtualMachineInner getByResourceGroup(String resourceGroupName, String v * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -774,16 +774,20 @@ public Response getByResourceGroupWithResponse( * Create Or Update Virtual Machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param virtualMachineRequest Create or Update Virtual Machine 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 virtual machine model. + * @return virtual machine model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineRequest) { + String resourceGroupName, + String referer, + String virtualMachineName, + VirtualMachineInner virtualMachineRequest) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -800,10 +804,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (this.client.getReferer() == null) { - return Mono - .error( - new IllegalArgumentException("Parameter this.client.getReferer() is required and cannot be null.")); + if (referer == null) { + return Mono.error(new IllegalArgumentException("Parameter referer is required and cannot be null.")); } if (virtualMachineName == null) { return Mono @@ -824,7 +826,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getReferer(), + referer, virtualMachineName, this.client.getApiVersion(), virtualMachineRequest, @@ -837,17 +839,19 @@ private Mono>> createOrUpdateWithResponseAsync( * Create Or Update Virtual Machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param virtualMachineRequest Create or Update Virtual Machine 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 virtual machine model. + * @return virtual machine model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( String resourceGroupName, + String referer, String virtualMachineName, VirtualMachineInner virtualMachineRequest, Context context) { @@ -867,10 +871,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (this.client.getReferer() == null) { - return Mono - .error( - new IllegalArgumentException("Parameter this.client.getReferer() is required and cannot be null.")); + if (referer == null) { + return Mono.error(new IllegalArgumentException("Parameter referer is required and cannot be null.")); } if (virtualMachineName == null) { return Mono @@ -889,7 +891,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getReferer(), + referer, virtualMachineName, this.client.getApiVersion(), virtualMachineRequest, @@ -901,18 +903,22 @@ private Mono>> createOrUpdateWithResponseAsync( * Create Or Update Virtual Machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param virtualMachineRequest Create or Update Virtual Machine 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 virtual machine model. + * @return the {@link PollerFlux} for polling of virtual machine model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualMachineInner> beginCreateOrUpdateAsync( - String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineRequest) { + String resourceGroupName, + String referer, + String virtualMachineName, + VirtualMachineInner virtualMachineRequest) { Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, virtualMachineName, virtualMachineRequest); + createOrUpdateWithResponseAsync(resourceGroupName, referer, virtualMachineName, virtualMachineRequest); return this .client .getLroResult( @@ -920,30 +926,33 @@ private PollerFlux, VirtualMachineInner> beginCr this.client.getHttpPipeline(), VirtualMachineInner.class, VirtualMachineInner.class, - Context.NONE); + this.client.getContext()); } /** * Create Or Update Virtual Machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param virtualMachineRequest Create or Update Virtual Machine 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 virtual machine model. + * @return the {@link PollerFlux} for polling of virtual machine model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualMachineInner> beginCreateOrUpdateAsync( String resourceGroupName, + String referer, String virtualMachineName, VirtualMachineInner virtualMachineRequest, Context context) { context = this.client.mergeContext(context); Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, virtualMachineName, virtualMachineRequest, context); + createOrUpdateWithResponseAsync( + resourceGroupName, referer, virtualMachineName, virtualMachineRequest, context); return this .client .getLroResult( @@ -954,38 +963,45 @@ private PollerFlux, VirtualMachineInner> beginCr * Create Or Update Virtual Machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param virtualMachineRequest Create or Update Virtual Machine 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 virtual machine model. + * @return the {@link SyncPoller} for polling of virtual machine model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualMachineInner> beginCreateOrUpdate( - String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineRequest) { - return beginCreateOrUpdateAsync(resourceGroupName, virtualMachineName, virtualMachineRequest).getSyncPoller(); + String resourceGroupName, + String referer, + String virtualMachineName, + VirtualMachineInner virtualMachineRequest) { + return beginCreateOrUpdateAsync(resourceGroupName, referer, virtualMachineName, virtualMachineRequest) + .getSyncPoller(); } /** * Create Or Update Virtual Machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param virtualMachineRequest Create or Update Virtual Machine 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 virtual machine model. + * @return the {@link SyncPoller} for polling of virtual machine model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualMachineInner> beginCreateOrUpdate( String resourceGroupName, + String referer, String virtualMachineName, VirtualMachineInner virtualMachineRequest, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, virtualMachineName, virtualMachineRequest, context) + return beginCreateOrUpdateAsync(resourceGroupName, referer, virtualMachineName, virtualMachineRequest, context) .getSyncPoller(); } @@ -993,17 +1009,21 @@ public SyncPoller, VirtualMachineInner> beginCre * Create Or Update Virtual Machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param virtualMachineRequest Create or Update Virtual Machine 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 virtual machine model. + * @return virtual machine model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( - String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineRequest) { - return beginCreateOrUpdateAsync(resourceGroupName, virtualMachineName, virtualMachineRequest) + String resourceGroupName, + String referer, + String virtualMachineName, + VirtualMachineInner virtualMachineRequest) { + return beginCreateOrUpdateAsync(resourceGroupName, referer, virtualMachineName, virtualMachineRequest) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1012,21 +1032,23 @@ private Mono createOrUpdateAsync( * Create Or Update Virtual Machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param virtualMachineRequest Create or Update Virtual Machine 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 virtual machine model. + * @return virtual machine model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( String resourceGroupName, + String referer, String virtualMachineName, VirtualMachineInner virtualMachineRequest, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, virtualMachineName, virtualMachineRequest, context) + return beginCreateOrUpdateAsync(resourceGroupName, referer, virtualMachineName, virtualMachineRequest, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1035,6 +1057,7 @@ private Mono createOrUpdateAsync( * Create Or Update Virtual Machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param virtualMachineRequest Create or Update Virtual Machine request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1044,14 +1067,18 @@ private Mono createOrUpdateAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public VirtualMachineInner createOrUpdate( - String resourceGroupName, String virtualMachineName, VirtualMachineInner virtualMachineRequest) { - return createOrUpdateAsync(resourceGroupName, virtualMachineName, virtualMachineRequest).block(); + String resourceGroupName, + String referer, + String virtualMachineName, + VirtualMachineInner virtualMachineRequest) { + return createOrUpdateAsync(resourceGroupName, referer, virtualMachineName, virtualMachineRequest).block(); } /** * Create Or Update Virtual Machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param virtualMachineRequest Create or Update Virtual Machine request. * @param context The context to associate with this operation. @@ -1063,25 +1090,28 @@ public VirtualMachineInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) public VirtualMachineInner createOrUpdate( String resourceGroupName, + String referer, String virtualMachineName, VirtualMachineInner virtualMachineRequest, Context context) { - return createOrUpdateAsync(resourceGroupName, virtualMachineName, virtualMachineRequest, context).block(); + return createOrUpdateAsync(resourceGroupName, referer, virtualMachineName, virtualMachineRequest, context) + .block(); } /** * Delete virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( - String resourceGroupName, String virtualMachineName) { + String resourceGroupName, String referer, String virtualMachineName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1098,10 +1128,8 @@ private Mono>> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (this.client.getReferer() == null) { - return Mono - .error( - new IllegalArgumentException("Parameter this.client.getReferer() is required and cannot be null.")); + if (referer == null) { + return Mono.error(new IllegalArgumentException("Parameter referer is required and cannot be null.")); } if (virtualMachineName == null) { return Mono @@ -1116,7 +1144,7 @@ private Mono>> deleteWithResponseAsync( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getReferer(), + referer, virtualMachineName, this.client.getApiVersion(), accept, @@ -1128,16 +1156,17 @@ private Mono>> deleteWithResponseAsync( * Delete virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( - String resourceGroupName, String virtualMachineName, Context context) { + String resourceGroupName, String referer, String virtualMachineName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1154,10 +1183,8 @@ private Mono>> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (this.client.getReferer() == null) { - return Mono - .error( - new IllegalArgumentException("Parameter this.client.getReferer() is required and cannot be null.")); + if (referer == null) { + return Mono.error(new IllegalArgumentException("Parameter referer is required and cannot be null.")); } if (virtualMachineName == null) { return Mono @@ -1170,7 +1197,7 @@ private Mono>> deleteWithResponseAsync( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getReferer(), + referer, virtualMachineName, this.client.getApiVersion(), accept, @@ -1181,36 +1208,41 @@ private Mono>> deleteWithResponseAsync( * Delete virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualMachineName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, virtualMachineName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String referer, String virtualMachineName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, referer, virtualMachineName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** * Delete virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String virtualMachineName, Context context) { + String resourceGroupName, String referer, String virtualMachineName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, virtualMachineName, context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, referer, virtualMachineName, context); return this .client .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); @@ -1220,47 +1252,51 @@ private PollerFlux, Void> beginDeleteAsync( * Delete virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualMachineName) { - return beginDeleteAsync(resourceGroupName, virtualMachineName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String referer, String virtualMachineName) { + return beginDeleteAsync(resourceGroupName, referer, virtualMachineName).getSyncPoller(); } /** * Delete virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( - String resourceGroupName, String virtualMachineName, Context context) { - return beginDeleteAsync(resourceGroupName, virtualMachineName, context).getSyncPoller(); + String resourceGroupName, String referer, String virtualMachineName, Context context) { + return beginDeleteAsync(resourceGroupName, referer, virtualMachineName, context).getSyncPoller(); } /** * Delete virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String virtualMachineName) { - return beginDeleteAsync(resourceGroupName, virtualMachineName) + private Mono deleteAsync(String resourceGroupName, String referer, String virtualMachineName) { + return beginDeleteAsync(resourceGroupName, referer, virtualMachineName) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1269,16 +1305,18 @@ private Mono deleteAsync(String resourceGroupName, String virtualMachineNa * Delete virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String virtualMachineName, Context context) { - return beginDeleteAsync(resourceGroupName, virtualMachineName, context) + private Mono deleteAsync( + String resourceGroupName, String referer, String virtualMachineName, Context context) { + return beginDeleteAsync(resourceGroupName, referer, virtualMachineName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1287,20 +1325,22 @@ private Mono deleteAsync(String resourceGroupName, String virtualMachineNa * Delete virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String virtualMachineName) { - deleteAsync(resourceGroupName, virtualMachineName).block(); + public void delete(String resourceGroupName, String referer, String virtualMachineName) { + deleteAsync(resourceGroupName, referer, virtualMachineName).block(); } /** * Delete virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1308,8 +1348,8 @@ public void delete(String resourceGroupName, String virtualMachineName) { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String virtualMachineName, Context context) { - deleteAsync(resourceGroupName, virtualMachineName, context).block(); + public void delete(String resourceGroupName, String referer, String virtualMachineName, Context context) { + deleteAsync(resourceGroupName, referer, virtualMachineName, context).block(); } /** @@ -1321,7 +1361,7 @@ public void delete(String resourceGroupName, String virtualMachineName, Context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine model. + * @return virtual machine model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1379,7 +1419,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine model. + * @return virtual machine model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1433,9 +1473,9 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine model. + * @return the {@link PollerFlux} for polling of virtual machine model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualMachineInner> beginUpdateAsync( String resourceGroupName, String virtualMachineName, PatchPayload virtualMachineRequest) { Mono>> mono = @@ -1447,7 +1487,7 @@ private PollerFlux, VirtualMachineInner> beginUp this.client.getHttpPipeline(), VirtualMachineInner.class, VirtualMachineInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1460,9 +1500,9 @@ private PollerFlux, VirtualMachineInner> beginUp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine model. + * @return the {@link PollerFlux} for polling of virtual machine model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualMachineInner> beginUpdateAsync( String resourceGroupName, String virtualMachineName, PatchPayload virtualMachineRequest, Context context) { context = this.client.mergeContext(context); @@ -1483,9 +1523,9 @@ private PollerFlux, VirtualMachineInner> beginUp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine model. + * @return the {@link SyncPoller} for polling of virtual machine model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualMachineInner> beginUpdate( String resourceGroupName, String virtualMachineName, PatchPayload virtualMachineRequest) { return beginUpdateAsync(resourceGroupName, virtualMachineName, virtualMachineRequest).getSyncPoller(); @@ -1501,9 +1541,9 @@ public SyncPoller, VirtualMachineInner> beginUpd * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine model. + * @return the {@link SyncPoller} for polling of virtual machine model. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualMachineInner> beginUpdate( String resourceGroupName, String virtualMachineName, PatchPayload virtualMachineRequest, Context context) { return beginUpdateAsync(resourceGroupName, virtualMachineName, virtualMachineRequest, context).getSyncPoller(); @@ -1518,7 +1558,7 @@ public SyncPoller, VirtualMachineInner> beginUpd * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine model. + * @return virtual machine model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1538,7 +1578,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine model. + * @return virtual machine model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1587,15 +1627,16 @@ public VirtualMachineInner update( * Power on virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync( - String resourceGroupName, String virtualMachineName) { + String resourceGroupName, String referer, String virtualMachineName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1612,10 +1653,8 @@ private Mono>> startWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (this.client.getReferer() == null) { - return Mono - .error( - new IllegalArgumentException("Parameter this.client.getReferer() is required and cannot be null.")); + if (referer == null) { + return Mono.error(new IllegalArgumentException("Parameter referer is required and cannot be null.")); } if (virtualMachineName == null) { return Mono @@ -1630,7 +1669,7 @@ private Mono>> startWithResponseAsync( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getReferer(), + referer, virtualMachineName, this.client.getApiVersion(), accept, @@ -1642,16 +1681,17 @@ private Mono>> startWithResponseAsync( * Power on virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync( - String resourceGroupName, String virtualMachineName, Context context) { + String resourceGroupName, String referer, String virtualMachineName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1668,10 +1708,8 @@ private Mono>> startWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (this.client.getReferer() == null) { - return Mono - .error( - new IllegalArgumentException("Parameter this.client.getReferer() is required and cannot be null.")); + if (referer == null) { + return Mono.error(new IllegalArgumentException("Parameter referer is required and cannot be null.")); } if (virtualMachineName == null) { return Mono @@ -1684,7 +1722,7 @@ private Mono>> startWithResponseAsync( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getReferer(), + referer, virtualMachineName, this.client.getApiVersion(), accept, @@ -1695,36 +1733,41 @@ private Mono>> startWithResponseAsync( * Power on virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginStartAsync(String resourceGroupName, String virtualMachineName) { - Mono>> mono = startWithResponseAsync(resourceGroupName, virtualMachineName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStartAsync( + String resourceGroupName, String referer, String virtualMachineName) { + Mono>> mono = startWithResponseAsync(resourceGroupName, referer, virtualMachineName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** * Power on virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync( - String resourceGroupName, String virtualMachineName, Context context) { + String resourceGroupName, String referer, String virtualMachineName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = startWithResponseAsync(resourceGroupName, virtualMachineName, context); + Mono>> mono = + startWithResponseAsync(resourceGroupName, referer, virtualMachineName, context); return this .client .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); @@ -1734,47 +1777,51 @@ private PollerFlux, Void> beginStartAsync( * Power on virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginStart(String resourceGroupName, String virtualMachineName) { - return beginStartAsync(resourceGroupName, virtualMachineName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStart( + String resourceGroupName, String referer, String virtualMachineName) { + return beginStartAsync(resourceGroupName, referer, virtualMachineName).getSyncPoller(); } /** * Power on virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart( - String resourceGroupName, String virtualMachineName, Context context) { - return beginStartAsync(resourceGroupName, virtualMachineName, context).getSyncPoller(); + String resourceGroupName, String referer, String virtualMachineName, Context context) { + return beginStartAsync(resourceGroupName, referer, virtualMachineName, context).getSyncPoller(); } /** * Power on virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String virtualMachineName) { - return beginStartAsync(resourceGroupName, virtualMachineName) + private Mono startAsync(String resourceGroupName, String referer, String virtualMachineName) { + return beginStartAsync(resourceGroupName, referer, virtualMachineName) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1783,16 +1830,18 @@ private Mono startAsync(String resourceGroupName, String virtualMachineNam * Power on virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String virtualMachineName, Context context) { - return beginStartAsync(resourceGroupName, virtualMachineName, context) + private Mono startAsync( + String resourceGroupName, String referer, String virtualMachineName, Context context) { + return beginStartAsync(resourceGroupName, referer, virtualMachineName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1801,20 +1850,22 @@ private Mono startAsync(String resourceGroupName, String virtualMachineNam * Power on virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 resourceGroupName, String virtualMachineName) { - startAsync(resourceGroupName, virtualMachineName).block(); + public void start(String resourceGroupName, String referer, String virtualMachineName) { + startAsync(resourceGroupName, referer, virtualMachineName).block(); } /** * Power on virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1822,25 +1873,26 @@ public void start(String resourceGroupName, String virtualMachineName) { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String resourceGroupName, String virtualMachineName, Context context) { - startAsync(resourceGroupName, virtualMachineName, context).block(); + public void start(String resourceGroupName, String referer, String virtualMachineName, Context context) { + startAsync(resourceGroupName, referer, virtualMachineName, context).block(); } /** * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param mode query stop mode parameter (reboot, shutdown, etc...). * @param m body stop mode parameter (reboot, shutdown, etc...). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync( - String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m) { + String resourceGroupName, String referer, String virtualMachineName, StopMode mode, VirtualMachineStopMode m) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1857,10 +1909,8 @@ private Mono>> stopWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (this.client.getReferer() == null) { - return Mono - .error( - new IllegalArgumentException("Parameter this.client.getReferer() is required and cannot be null.")); + if (referer == null) { + return Mono.error(new IllegalArgumentException("Parameter referer is required and cannot be null.")); } if (virtualMachineName == null) { return Mono @@ -1878,7 +1928,7 @@ private Mono>> stopWithResponseAsync( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getReferer(), + referer, virtualMachineName, mode, this.client.getApiVersion(), @@ -1892,6 +1942,7 @@ private Mono>> stopWithResponseAsync( * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param mode query stop mode parameter (reboot, shutdown, etc...). * @param m body stop mode parameter (reboot, shutdown, etc...). @@ -1899,11 +1950,16 @@ private Mono>> stopWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync( - String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m, Context context) { + String resourceGroupName, + String referer, + String virtualMachineName, + StopMode mode, + VirtualMachineStopMode m, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1920,10 +1976,8 @@ private Mono>> stopWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (this.client.getReferer() == null) { - return Mono - .error( - new IllegalArgumentException("Parameter this.client.getReferer() is required and cannot be null.")); + if (referer == null) { + return Mono.error(new IllegalArgumentException("Parameter referer is required and cannot be null.")); } if (virtualMachineName == null) { return Mono @@ -1939,7 +1993,7 @@ private Mono>> stopWithResponseAsync( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getReferer(), + referer, virtualMachineName, mode, this.client.getApiVersion(), @@ -1952,27 +2006,31 @@ private Mono>> stopWithResponseAsync( * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param mode query stop mode parameter (reboot, shutdown, etc...). * @param m body stop mode parameter (reboot, shutdown, etc...). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( - String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m) { - Mono>> mono = stopWithResponseAsync(resourceGroupName, virtualMachineName, mode, m); + String resourceGroupName, String referer, String virtualMachineName, StopMode mode, VirtualMachineStopMode m) { + Mono>> mono = + stopWithResponseAsync(resourceGroupName, referer, virtualMachineName, mode, m); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param mode query stop mode parameter (reboot, shutdown, etc...). * @param m body stop mode parameter (reboot, shutdown, etc...). @@ -1980,14 +2038,19 @@ private PollerFlux, Void> beginStopAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( - String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m, Context context) { + String resourceGroupName, + String referer, + String virtualMachineName, + StopMode mode, + VirtualMachineStopMode m, + Context context) { context = this.client.mergeContext(context); Mono>> mono = - stopWithResponseAsync(resourceGroupName, virtualMachineName, mode, m, context); + stopWithResponseAsync(resourceGroupName, referer, virtualMachineName, mode, m, context); return this .client .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); @@ -1997,24 +2060,26 @@ private PollerFlux, Void> beginStopAsync( * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param mode query stop mode parameter (reboot, shutdown, etc...). * @param m body stop mode parameter (reboot, shutdown, etc...). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop( - String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m) { - return beginStopAsync(resourceGroupName, virtualMachineName, mode, m).getSyncPoller(); + String resourceGroupName, String referer, String virtualMachineName, StopMode mode, VirtualMachineStopMode m) { + return beginStopAsync(resourceGroupName, referer, virtualMachineName, mode, m).getSyncPoller(); } /** * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param mode query stop mode parameter (reboot, shutdown, etc...). * @param m body stop mode parameter (reboot, shutdown, etc...). @@ -2022,30 +2087,36 @@ public SyncPoller, Void> beginStop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop( - String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m, Context context) { - return beginStopAsync(resourceGroupName, virtualMachineName, mode, m, context).getSyncPoller(); + String resourceGroupName, + String referer, + String virtualMachineName, + StopMode mode, + VirtualMachineStopMode m, + Context context) { + return beginStopAsync(resourceGroupName, referer, virtualMachineName, mode, m, context).getSyncPoller(); } /** * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param mode query stop mode parameter (reboot, shutdown, etc...). * @param m body stop mode parameter (reboot, shutdown, etc...). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync( - String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m) { - return beginStopAsync(resourceGroupName, virtualMachineName, mode, m) + String resourceGroupName, String referer, String virtualMachineName, StopMode mode, VirtualMachineStopMode m) { + return beginStopAsync(resourceGroupName, referer, virtualMachineName, mode, m) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2054,17 +2125,18 @@ private Mono stopAsync( * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String virtualMachineName) { + private Mono stopAsync(String resourceGroupName, String referer, String virtualMachineName) { final StopMode mode = null; final VirtualMachineStopMode m = null; - return beginStopAsync(resourceGroupName, virtualMachineName, mode, m) + return beginStopAsync(resourceGroupName, referer, virtualMachineName, mode, m) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2073,6 +2145,7 @@ private Mono stopAsync(String resourceGroupName, String virtualMachineName * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param mode query stop mode parameter (reboot, shutdown, etc...). * @param m body stop mode parameter (reboot, shutdown, etc...). @@ -2080,12 +2153,17 @@ private Mono stopAsync(String resourceGroupName, String virtualMachineName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync( - String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m, Context context) { - return beginStopAsync(resourceGroupName, virtualMachineName, mode, m, context) + String resourceGroupName, + String referer, + String virtualMachineName, + StopMode mode, + VirtualMachineStopMode m, + Context context) { + return beginStopAsync(resourceGroupName, referer, virtualMachineName, mode, m, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2094,6 +2172,7 @@ private Mono stopAsync( * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param mode query stop mode parameter (reboot, shutdown, etc...). * @param m body stop mode parameter (reboot, shutdown, etc...). @@ -2102,30 +2181,33 @@ private Mono stopAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m) { - stopAsync(resourceGroupName, virtualMachineName, mode, m).block(); + public void stop( + String resourceGroupName, String referer, String virtualMachineName, StopMode mode, VirtualMachineStopMode m) { + stopAsync(resourceGroupName, referer, virtualMachineName, mode, m).block(); } /** * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 stop(String resourceGroupName, String virtualMachineName) { + public void stop(String resourceGroupName, String referer, String virtualMachineName) { final StopMode mode = null; final VirtualMachineStopMode m = null; - stopAsync(resourceGroupName, virtualMachineName, mode, m).block(); + stopAsync(resourceGroupName, referer, virtualMachineName, mode, m).block(); } /** * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param mode query stop mode parameter (reboot, shutdown, etc...). * @param m body stop mode parameter (reboot, shutdown, etc...). @@ -2136,8 +2218,13 @@ public void stop(String resourceGroupName, String virtualMachineName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void stop( - String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m, Context context) { - stopAsync(resourceGroupName, virtualMachineName, mode, m, context).block(); + String resourceGroupName, + String referer, + String virtualMachineName, + StopMode mode, + VirtualMachineStopMode m, + Context context) { + stopAsync(resourceGroupName, referer, virtualMachineName, mode, m, context).block(); } /** @@ -2147,7 +2234,7 @@ public void stop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -2184,7 +2271,7 @@ private Mono> listBySubscriptionNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync( @@ -2220,7 +2307,7 @@ private Mono> listBySubscriptionNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -2257,7 +2344,7 @@ private Mono> listByResourceGroupNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachinesImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachinesImpl.java index 8aa961008584..35305e004f18 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachinesImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualMachinesImpl.java @@ -77,33 +77,39 @@ public Response getByResourceGroupWithResponse( } } - public void deleteByResourceGroup(String resourceGroupName, String virtualMachineName) { - this.serviceClient().delete(resourceGroupName, virtualMachineName); + public void delete(String resourceGroupName, String referer, String virtualMachineName) { + this.serviceClient().delete(resourceGroupName, referer, virtualMachineName); } - public void delete(String resourceGroupName, String virtualMachineName, Context context) { - this.serviceClient().delete(resourceGroupName, virtualMachineName, context); + public void delete(String resourceGroupName, String referer, String virtualMachineName, Context context) { + this.serviceClient().delete(resourceGroupName, referer, virtualMachineName, context); } - public void start(String resourceGroupName, String virtualMachineName) { - this.serviceClient().start(resourceGroupName, virtualMachineName); + public void start(String resourceGroupName, String referer, String virtualMachineName) { + this.serviceClient().start(resourceGroupName, referer, virtualMachineName); } - public void start(String resourceGroupName, String virtualMachineName, Context context) { - this.serviceClient().start(resourceGroupName, virtualMachineName, context); + public void start(String resourceGroupName, String referer, String virtualMachineName, Context context) { + this.serviceClient().start(resourceGroupName, referer, virtualMachineName, context); } - public void stop(String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m) { - this.serviceClient().stop(resourceGroupName, virtualMachineName, mode, m); + public void stop( + String resourceGroupName, String referer, String virtualMachineName, StopMode mode, VirtualMachineStopMode m) { + this.serviceClient().stop(resourceGroupName, referer, virtualMachineName, mode, m); } - public void stop(String resourceGroupName, String virtualMachineName) { - this.serviceClient().stop(resourceGroupName, virtualMachineName); + public void stop(String resourceGroupName, String referer, String virtualMachineName) { + this.serviceClient().stop(resourceGroupName, referer, virtualMachineName); } public void stop( - String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m, Context context) { - this.serviceClient().stop(resourceGroupName, virtualMachineName, mode, m, context); + String resourceGroupName, + String referer, + String virtualMachineName, + StopMode mode, + VirtualMachineStopMode m, + Context context) { + this.serviceClient().stop(resourceGroupName, referer, virtualMachineName, mode, m, context); } public VirtualMachine getById(String id) { @@ -163,10 +169,11 @@ public void deleteById(String id) { String .format("The resource ID '%s' is not valid. Missing path segment 'virtualMachines'.", id))); } - this.delete(resourceGroupName, virtualMachineName, Context.NONE); + String localReferer = null; + this.delete(resourceGroupName, localReferer, virtualMachineName, Context.NONE); } - public void deleteByIdWithResponse(String id, Context context) { + public void deleteByIdWithResponse(String id, String referer, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw logger @@ -183,7 +190,7 @@ public void deleteByIdWithResponse(String id, Context context) { String .format("The resource ID '%s' is not valid. Missing path segment 'virtualMachines'.", id))); } - this.delete(resourceGroupName, virtualMachineName, context); + this.delete(resourceGroupName, referer, virtualMachineName, context); } private VirtualMachinesClient serviceClient() { diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualNetworksClientImpl.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualNetworksClientImpl.java index e1dc97d3417a..d495aa07fa0e 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualNetworksClientImpl.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/implementation/VirtualNetworksClientImpl.java @@ -111,7 +111,7 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual networks. + * @return list of virtual networks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -174,7 +174,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual networks. + * @return list of virtual networks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -233,7 +233,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual networks. + * @return list of virtual networks as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String regionId, String pcName, String resourcePoolName) { @@ -252,7 +252,7 @@ private PagedFlux listAsync(String regionId, String pcName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual networks. + * @return list of virtual networks as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -271,7 +271,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual networks. + * @return list of virtual networks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String regionId, String pcName, String resourcePoolName) { @@ -288,7 +288,7 @@ public PagedIterable list(String regionId, String pcName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual networks. + * @return list of virtual networks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -305,7 +305,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network model. + * @return virtual network model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -359,7 +359,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network model. + * @return virtual network model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -409,7 +409,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network model. + * @return virtual network model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String regionId, String pcName, String virtualNetworkName) { @@ -450,7 +450,7 @@ public VirtualNetworkInner get(String regionId, String pcName, String virtualNet * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network model. + * @return virtual network model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -465,7 +465,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual networks. + * @return list of virtual networks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -501,7 +501,7 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual networks. + * @return list of virtual networks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/CustomizationPolicies.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/CustomizationPolicies.java index 3c961c02e600..fb02775742ef 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/CustomizationPolicies.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/CustomizationPolicies.java @@ -18,7 +18,7 @@ public interface CustomizationPolicies { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of customization polices response model. + * @return list of customization polices response model as paginated response with {@link PagedIterable}. */ PagedIterable list(String regionId, String pcName); @@ -33,7 +33,7 @@ public interface CustomizationPolicies { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of customization polices response model. + * @return list of customization polices response model as paginated response with {@link PagedIterable}. */ PagedIterable list(String regionId, String pcName, String filter, Context context); @@ -60,7 +60,7 @@ public interface CustomizationPolicies { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the virtual machine customization policy. + * @return the virtual machine customization policy along with {@link Response}. */ Response getWithResponse( String regionId, String pcName, String customizationPolicyName, Context context); diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/DedicatedCloudNode.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/DedicatedCloudNode.java index 0a8e3b931822..db06084adcbd 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/DedicatedCloudNode.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/DedicatedCloudNode.java @@ -7,6 +7,7 @@ import com.azure.core.management.Region; import com.azure.core.util.Context; import com.azure.resourcemanager.vmwarecloudsimple.fluent.models.DedicatedCloudNodeInner; +import java.time.OffsetDateTime; import java.util.Map; import java.util.UUID; @@ -80,14 +81,14 @@ public interface DedicatedCloudNode { * * @return the created value. */ - Object created(); + OffsetDateTime created(); /** * Gets the nodesCount property: count of nodes to create. * * @return the nodesCount value. */ - Integer nodesCount(); + int nodesCount(); /** * Gets the placementGroupId property: Placement Group id, e.g. "n1". @@ -146,18 +147,18 @@ public interface DedicatedCloudNode { String vmwareClusterName(); /** - * Gets the idPropertiesSkuDescriptionId property: SKU's id. + * Gets the idPropertiesId property: SKU's id. * - * @return the idPropertiesSkuDescriptionId value. + * @return the idPropertiesId value. */ - String idPropertiesSkuDescriptionId(); + String idPropertiesId(); /** - * Gets the namePropertiesSkuDescriptionName property: SKU's name. + * Gets the namePropertiesName property: SKU's name. * - * @return the namePropertiesSkuDescriptionName value. + * @return the namePropertiesName value. */ - String namePropertiesSkuDescriptionName(); + String namePropertiesName(); /** * Gets the region of the resource. @@ -231,8 +232,9 @@ interface WithCreate DefinitionStages.WithNodesCount, DefinitionStages.WithPlacementGroupId, DefinitionStages.WithPurchaseId, - DefinitionStages.WithIdPropertiesSkuDescriptionId, - DefinitionStages.WithNamePropertiesSkuDescriptionName { + DefinitionStages.WithIdPropertiesId, + DefinitionStages.WithNamePropertiesName, + DefinitionStages.WithReferer { /** * Executes the create request. * @@ -286,7 +288,7 @@ interface WithNodesCount { * @param nodesCount count of nodes to create. * @return the next definition stage. */ - WithCreate withNodesCount(Integer nodesCount); + WithCreate withNodesCount(int nodesCount); } /** The stage of the DedicatedCloudNode definition allowing to specify placementGroupId. */ interface WithPlacementGroupId { @@ -308,25 +310,35 @@ interface WithPurchaseId { */ WithCreate withPurchaseId(UUID purchaseId); } - /** The stage of the DedicatedCloudNode definition allowing to specify idPropertiesSkuDescriptionId. */ - interface WithIdPropertiesSkuDescriptionId { + /** The stage of the DedicatedCloudNode definition allowing to specify idPropertiesId. */ + interface WithIdPropertiesId { /** - * Specifies the idPropertiesSkuDescriptionId property: SKU's id. + * Specifies the idPropertiesId property: SKU's id. * - * @param idPropertiesSkuDescriptionId SKU's id. + * @param idPropertiesId SKU's id. * @return the next definition stage. */ - WithCreate withIdPropertiesSkuDescriptionId(String idPropertiesSkuDescriptionId); + WithCreate withIdPropertiesId(String idPropertiesId); } - /** The stage of the DedicatedCloudNode definition allowing to specify namePropertiesSkuDescriptionName. */ - interface WithNamePropertiesSkuDescriptionName { + /** The stage of the DedicatedCloudNode definition allowing to specify namePropertiesName. */ + interface WithNamePropertiesName { /** - * Specifies the namePropertiesSkuDescriptionName property: SKU's name. + * Specifies the namePropertiesName property: SKU's name. * - * @param namePropertiesSkuDescriptionName SKU's name. + * @param namePropertiesName SKU's name. * @return the next definition stage. */ - WithCreate withNamePropertiesSkuDescriptionName(String namePropertiesSkuDescriptionName); + WithCreate withNamePropertiesName(String namePropertiesName); + } + /** The stage of the DedicatedCloudNode definition allowing to specify referer. */ + interface WithReferer { + /** + * Specifies the referer property: referer url. + * + * @param referer referer url. + * @return the next definition stage. + */ + WithCreate withReferer(String referer); } } /** diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/DedicatedCloudNodes.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/DedicatedCloudNodes.java index 71d4865ac373..aa4141423a4d 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/DedicatedCloudNodes.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/DedicatedCloudNodes.java @@ -15,7 +15,7 @@ public interface DedicatedCloudNodes { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -29,7 +29,7 @@ public interface DedicatedCloudNodes { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedIterable}. */ PagedIterable list(String filter, Integer top, String skipToken, Context context); @@ -40,7 +40,7 @@ public interface DedicatedCloudNodes { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -55,7 +55,7 @@ public interface DedicatedCloudNodes { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated nodes response model. + * @return list of dedicated nodes response model as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup( String resourceGroupName, String filter, Integer top, String skipToken, Context context); @@ -81,7 +81,7 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud node model. + * @return dedicated cloud node model along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String dedicatedCloudNodeName, Context context); @@ -106,7 +106,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String dedicatedCloudNodeName, Context context); @@ -117,7 +117,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud node model. + * @return dedicated cloud node model along with {@link Response}. */ DedicatedCloudNode getById(String id); @@ -129,7 +129,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud node model. + * @return dedicated cloud node model along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -151,7 +151,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/DedicatedCloudServices.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/DedicatedCloudServices.java index fb40b1652749..a04f67d258c2 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/DedicatedCloudServices.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/DedicatedCloudServices.java @@ -15,7 +15,7 @@ public interface DedicatedCloudServices { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -29,7 +29,7 @@ public interface DedicatedCloudServices { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedIterable}. */ PagedIterable list(String filter, Integer top, String skipToken, Context context); @@ -40,7 +40,7 @@ public interface DedicatedCloudServices { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -55,7 +55,7 @@ public interface DedicatedCloudServices { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of dedicated cloud services. + * @return list of dedicated cloud services as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup( String resourceGroupName, String filter, Integer top, String skipToken, Context context); @@ -81,7 +81,7 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String dedicatedCloudServiceName, Context context); @@ -116,7 +116,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model along with {@link Response}. */ DedicatedCloudService getById(String id); @@ -128,7 +128,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dedicated cloud service model. + * @return dedicated cloud service model along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/Operations.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/Operations.java index 51cbdb14af7f..655d02d36a76 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/Operations.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/Operations.java @@ -15,7 +15,7 @@ public interface Operations { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of available operations. + * @return list of available operations as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -26,7 +26,7 @@ public interface Operations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of available operations. + * @return list of available operations as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -34,18 +34,20 @@ public interface Operations { * Return an async operation. * * @param regionId The region Id (westus, eastus). + * @param referer referer url. * @param operationId operation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return operation status response. */ - OperationResource get(String regionId, String operationId); + OperationResource get(String regionId, String referer, String operationId); /** * Return an async operation. * * @param regionId The region Id (westus, eastus). + * @param referer referer url. * @param operationId operation id. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -53,5 +55,5 @@ public interface Operations { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return operation status response. */ - Response getWithResponse(String regionId, String operationId, Context context); + Response getWithResponse(String regionId, String referer, String operationId, Context context); } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/PatchPayload.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/PatchPayload.java index a1a03ced97f2..3de07c89952c 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/PatchPayload.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/PatchPayload.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -19,6 +20,7 @@ public final class PatchPayload { * The tags key:value pairs */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/PrivateClouds.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/PrivateClouds.java index 234ab73659b7..6f164922bc89 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/PrivateClouds.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/PrivateClouds.java @@ -17,7 +17,7 @@ public interface PrivateClouds { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private clouds. + * @return list of private clouds as paginated response with {@link PagedIterable}. */ PagedIterable list(String regionId); @@ -29,7 +29,7 @@ public interface PrivateClouds { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private clouds. + * @return list of private clouds as paginated response with {@link PagedIterable}. */ PagedIterable list(String regionId, Context context); @@ -54,7 +54,7 @@ public interface PrivateClouds { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private cloud model. + * @return private cloud model along with {@link Response}. */ Response getWithResponse(String pcName, String regionId, Context context); } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/ResourcePools.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/ResourcePools.java index 78154bc61ea1..ddcc95ffa5af 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/ResourcePools.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/ResourcePools.java @@ -18,7 +18,7 @@ public interface ResourcePools { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource pools response model. + * @return list of resource pools response model as paginated response with {@link PagedIterable}. */ PagedIterable list(String regionId, String pcName); @@ -31,7 +31,7 @@ public interface ResourcePools { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of resource pools response model. + * @return list of resource pools response model as paginated response with {@link PagedIterable}. */ PagedIterable list(String regionId, String pcName, Context context); @@ -58,7 +58,7 @@ public interface ResourcePools { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return resource pool model. + * @return resource pool model along with {@link Response}. */ Response getWithResponse(String regionId, String pcName, String resourcePoolName, Context context); } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/SkusAvailabilities.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/SkusAvailabilities.java index f59a4e78ba19..26d601c9d8e2 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/SkusAvailabilities.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/SkusAvailabilities.java @@ -16,7 +16,7 @@ public interface SkusAvailabilities { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU availabilities. + * @return list of SKU availabilities as paginated response with {@link PagedIterable}. */ PagedIterable list(String regionId); @@ -29,7 +29,7 @@ public interface SkusAvailabilities { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of SKU availabilities. + * @return list of SKU availabilities as paginated response with {@link PagedIterable}. */ PagedIterable list(String regionId, String skuId, Context context); } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/Usages.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/Usages.java index 74e5a260140f..ce2086de1a8a 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/Usages.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/Usages.java @@ -16,7 +16,7 @@ public interface Usages { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of usages. + * @return list of usages as paginated response with {@link PagedIterable}. */ PagedIterable list(String regionId); @@ -30,7 +30,7 @@ public interface Usages { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of usages. + * @return list of usages as paginated response with {@link PagedIterable}. */ PagedIterable list(String regionId, String filter, Context context); } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualMachine.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualMachine.java index e74dc48d06b5..fd77415730a4 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualMachine.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualMachine.java @@ -54,7 +54,7 @@ public interface VirtualMachine { * * @return the amountOfRam value. */ - Integer amountOfRam(); + int amountOfRam(); /** * Gets the controllers property: The list of Virtual Disks' Controllers. @@ -124,7 +124,7 @@ public interface VirtualMachine { * * @return the numberOfCores value. */ - Integer numberOfCores(); + int numberOfCores(); /** * Gets the password property: Password for login. Deprecated - use customization property. @@ -281,7 +281,8 @@ interface WithCreate DefinitionStages.WithResourcePool, DefinitionStages.WithTemplateId, DefinitionStages.WithUsername, - DefinitionStages.WithVSphereNetworks { + DefinitionStages.WithVSphereNetworks, + DefinitionStages.WithReferer { /** * Executes the create request. * @@ -315,7 +316,7 @@ interface WithAmountOfRam { * @param amountOfRam The amount of memory. * @return the next definition stage. */ - WithCreate withAmountOfRam(Integer amountOfRam); + WithCreate withAmountOfRam(int amountOfRam); } /** The stage of the VirtualMachine definition allowing to specify customization. */ interface WithCustomization { @@ -365,7 +366,7 @@ interface WithNumberOfCores { * @param numberOfCores The number of CPU cores. * @return the next definition stage. */ - WithCreate withNumberOfCores(Integer numberOfCores); + WithCreate withNumberOfCores(int numberOfCores); } /** The stage of the VirtualMachine definition allowing to specify password. */ interface WithPassword { @@ -427,6 +428,16 @@ interface WithVSphereNetworks { */ WithCreate withVSphereNetworks(List vSphereNetworks); } + /** The stage of the VirtualMachine definition allowing to specify referer. */ + interface WithReferer { + /** + * Specifies the referer property: referer url. + * + * @param referer referer url. + * @return the next definition stage. + */ + WithCreate withReferer(String referer); + } } /** * Begins update for the VirtualMachine resource. @@ -479,53 +490,4 @@ interface WithTags { * @return the refreshed resource. */ VirtualMachine refresh(Context context); - - /** - * Power on virtual machine. - * - * @throws com.azure.core.management.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(); - - /** - * Power on virtual machine. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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(Context context); - - /** - * Power off virtual machine, options: shutdown, poweroff, and suspend. - * - * @param mode query stop mode parameter (reboot, shutdown, etc...). - * @param m body stop mode parameter (reboot, shutdown, etc...). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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(StopMode mode, VirtualMachineStopMode m); - - /** - * Power off virtual machine, options: shutdown, poweroff, and suspend. - * - * @throws com.azure.core.management.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(); - - /** - * Power off virtual machine, options: shutdown, poweroff, and suspend. - * - * @param mode query stop mode parameter (reboot, shutdown, etc...). - * @param m body stop mode parameter (reboot, shutdown, etc...). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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(StopMode mode, VirtualMachineStopMode m, Context context); } diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualMachineProperties.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualMachineProperties.java new file mode 100644 index 000000000000..a3556289f2c9 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualMachineProperties.java @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.models; + +import com.azure.resourcemanager.vmwarecloudsimple.fluent.models.VirtualMachinePropertiesInner; +import java.util.List; + +/** An immutable client-side representation of VirtualMachineProperties. */ +public interface VirtualMachineProperties { + /** + * Gets the amountOfRam property: The amount of memory. + * + * @return the amountOfRam value. + */ + int amountOfRam(); + + /** + * Gets the controllers property: The list of Virtual Disks' Controllers. + * + * @return the controllers value. + */ + List controllers(); + + /** + * Gets the customization property: Virtual machine properties. + * + * @return the customization value. + */ + GuestOSCustomization customization(); + + /** + * Gets the disks property: The list of Virtual Disks. + * + * @return the disks value. + */ + List disks(); + + /** + * Gets the dnsname property: The DNS name of Virtual Machine in VCenter. + * + * @return the dnsname value. + */ + String dnsname(); + + /** + * Gets the exposeToGuestVM property: Expose Guest OS or not. + * + * @return the exposeToGuestVM value. + */ + Boolean exposeToGuestVM(); + + /** + * Gets the folder property: The path to virtual machine folder in VCenter. + * + * @return the folder value. + */ + String folder(); + + /** + * Gets the guestOS property: The name of Guest OS. + * + * @return the guestOS value. + */ + String guestOS(); + + /** + * Gets the guestOSType property: The Guest OS type. + * + * @return the guestOSType value. + */ + GuestOSType guestOSType(); + + /** + * Gets the nics property: The list of Virtual NICs. + * + * @return the nics value. + */ + List nics(); + + /** + * Gets the numberOfCores property: The number of CPU cores. + * + * @return the numberOfCores value. + */ + int numberOfCores(); + + /** + * Gets the password property: Password for login. Deprecated - use customization property. + * + * @return the password value. + */ + String password(); + + /** + * Gets the privateCloudId property: Private Cloud Id. + * + * @return the privateCloudId value. + */ + String privateCloudId(); + + /** + * Gets the provisioningState property: The provisioning status of the resource. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the publicIp property: The public ip of Virtual Machine. + * + * @return the publicIp value. + */ + String publicIp(); + + /** + * Gets the resourcePool property: Virtual Machines Resource Pool. + * + * @return the resourcePool value. + */ + ResourcePool resourcePool(); + + /** + * Gets the status property: The status of Virtual machine. + * + * @return the status value. + */ + VirtualMachineStatus status(); + + /** + * Gets the templateId property: Virtual Machine Template Id. + * + * @return the templateId value. + */ + String templateId(); + + /** + * Gets the username property: Username for login. Deprecated - use customization property. + * + * @return the username value. + */ + String username(); + + /** + * Gets the vSphereNetworks property: The list of Virtual VSphere Networks. + * + * @return the vSphereNetworks value. + */ + List vSphereNetworks(); + + /** + * Gets the vmId property: The internal id of Virtual Machine in VCenter. + * + * @return the vmId value. + */ + String vmId(); + + /** + * Gets the vmwaretools property: VMware tools version. + * + * @return the vmwaretools value. + */ + String vmwaretools(); + + /** + * Gets the inner com.azure.resourcemanager.vmwarecloudsimple.fluent.models.VirtualMachinePropertiesInner object. + * + * @return the inner object. + */ + VirtualMachinePropertiesInner innerModel(); +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualMachineTemplates.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualMachineTemplates.java index d974bc89eb1b..39a08a4ca9b1 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualMachineTemplates.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualMachineTemplates.java @@ -19,7 +19,7 @@ public interface VirtualMachineTemplates { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machine templates. + * @return list of virtual machine templates as paginated response with {@link PagedIterable}. */ PagedIterable list(String pcName, String regionId, String resourcePoolName); @@ -33,7 +33,7 @@ public interface VirtualMachineTemplates { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machine templates. + * @return list of virtual machine templates as paginated response with {@link PagedIterable}. */ PagedIterable list( String pcName, String regionId, String resourcePoolName, Context context); @@ -61,7 +61,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine template model. + * @return virtual machine template model along with {@link Response}. */ Response getWithResponse( String regionId, String pcName, String virtualMachineTemplateName, Context context); diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualMachines.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualMachines.java index 984f64893ac8..7c65a53c164b 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualMachines.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualMachines.java @@ -15,7 +15,7 @@ public interface VirtualMachines { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -29,7 +29,7 @@ public interface VirtualMachines { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedIterable}. */ PagedIterable list(String filter, Integer top, String skipToken, Context context); @@ -40,7 +40,7 @@ public interface VirtualMachines { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -55,7 +55,7 @@ public interface VirtualMachines { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual machines. + * @return list of virtual machines as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup( String resourceGroupName, String filter, Integer top, String skipToken, Context context); @@ -81,7 +81,7 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String virtualMachineName, Context context); @@ -90,52 +90,57 @@ Response getByResourceGroupWithResponse( * Delete virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteByResourceGroup(String resourceGroupName, String virtualMachineName); + void delete(String resourceGroupName, String referer, String virtualMachineName); /** * Delete virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete(String resourceGroupName, String virtualMachineName, Context context); + void delete(String resourceGroupName, String referer, String virtualMachineName, Context context); /** * Power on virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 resourceGroupName, String virtualMachineName); + void start(String resourceGroupName, String referer, String virtualMachineName); /** * Power on virtual machine. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 resourceGroupName, String virtualMachineName, Context context); + void start(String resourceGroupName, String referer, String virtualMachineName, Context context); /** * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param mode query stop mode parameter (reboot, shutdown, etc...). * @param m body stop mode parameter (reboot, shutdown, etc...). @@ -143,23 +148,26 @@ Response getByResourceGroupWithResponse( * @throws com.azure.core.management.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 resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m); + void stop( + String resourceGroupName, String referer, String virtualMachineName, StopMode mode, VirtualMachineStopMode m); /** * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 resourceGroupName, String virtualMachineName); + void stop(String resourceGroupName, String referer, String virtualMachineName); /** * Power off virtual machine, options: shutdown, poweroff, and suspend. * * @param resourceGroupName The name of the resource group. + * @param referer referer url. * @param virtualMachineName virtual machine name. * @param mode query stop mode parameter (reboot, shutdown, etc...). * @param m body stop mode parameter (reboot, shutdown, etc...). @@ -169,7 +177,12 @@ Response getByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void stop( - String resourceGroupName, String virtualMachineName, StopMode mode, VirtualMachineStopMode m, Context context); + String resourceGroupName, + String referer, + String virtualMachineName, + StopMode mode, + VirtualMachineStopMode m, + Context context); /** * Get virtual machine. @@ -178,7 +191,7 @@ void stop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine along with {@link Response}. */ VirtualMachine getById(String id); @@ -190,7 +203,7 @@ void stop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual machine. + * @return virtual machine along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -208,12 +221,13 @@ void stop( * Delete virtual machine. * * @param id the resource ID. + * @param referer referer url. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteByIdWithResponse(String id, Context context); + void deleteByIdWithResponse(String id, String referer, Context context); /** * Begins definition for a new VirtualMachine resource. diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualNetworks.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualNetworks.java index 6f997442bd63..8d1f5140274f 100644 --- a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualNetworks.java +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/main/java/com/azure/resourcemanager/vmwarecloudsimple/models/VirtualNetworks.java @@ -19,7 +19,7 @@ public interface VirtualNetworks { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual networks. + * @return list of virtual networks as paginated response with {@link PagedIterable}. */ PagedIterable list(String regionId, String pcName, String resourcePoolName); @@ -33,7 +33,7 @@ public interface VirtualNetworks { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of virtual networks. + * @return list of virtual networks as paginated response with {@link PagedIterable}. */ PagedIterable list(String regionId, String pcName, String resourcePoolName, Context context); @@ -60,7 +60,7 @@ public interface VirtualNetworks { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network model. + * @return virtual network model along with {@link Response}. */ Response getWithResponse( String regionId, String pcName, String virtualNetworkName, Context context); diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/CustomizationPoliciesGetSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/CustomizationPoliciesGetSamples.java new file mode 100644 index 000000000000..396adb22a983 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/CustomizationPoliciesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for CustomizationPolicies Get. */ +public final class CustomizationPoliciesGetSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetCustomizationPolicy.json + */ + /** + * Sample code: GetCustomizationPolicy. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getCustomizationPolicy( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.customizationPolicies().getWithResponse("myResourceGroup", "myPrivateCloud", "Linux1", Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/CustomizationPoliciesListSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/CustomizationPoliciesListSamples.java new file mode 100644 index 000000000000..fd76f50f5be9 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/CustomizationPoliciesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for CustomizationPolicies List. */ +public final class CustomizationPoliciesListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListCustomizationPolicies.json + */ + /** + * Sample code: ListCustomizationPolicies. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listCustomizationPolicies( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.customizationPolicies().list("myResourceGroup", "myPrivateCloud", null, Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesCreateOrUpdateSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..6f13d28c9041 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesCreateOrUpdateSamples.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.resourcemanager.vmwarecloudsimple.models.Sku; +import java.util.UUID; + +/** Samples for DedicatedCloudNodes CreateOrUpdate. */ +public final class DedicatedCloudNodesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/CreateDedicatedCloudNode.json + */ + /** + * Sample code: CreateDedicatedCloudNode. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void createDedicatedCloudNode( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .dedicatedCloudNodes() + .define("myNode") + .withRegion("westus") + .withExistingResourceGroup("myResourceGroup") + .withSku(new Sku().withName("VMware_CloudSimple_CS28")) + .withAvailabilityZoneId("az1") + .withNodesCount(1) + .withPlacementGroupId("n1") + .withPurchaseId(UUID.fromString("56acbd46-3d36-4bbf-9b08-57c30fdf6932")) + .withIdPropertiesId("general") + .withNamePropertiesName("CS28-Node") + .withReferer("https://management.azure.com/") + .create(); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesDeleteSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesDeleteSamples.java new file mode 100644 index 000000000000..b90e8d7dc981 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for DedicatedCloudNodes Delete. */ +public final class DedicatedCloudNodesDeleteSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/DeleteDedicatedCloudNode.json + */ + /** + * Sample code: DeleteDedicatedCloudNode. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void deleteDedicatedCloudNode( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.dedicatedCloudNodes().deleteWithResponse("myResourceGroup", "myNode", Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesGetByResourceGroupSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesGetByResourceGroupSamples.java new file mode 100644 index 000000000000..61c5d39b3a8e --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for DedicatedCloudNodes GetByResourceGroup. */ +public final class DedicatedCloudNodesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetDedicatedCloudNode.json + */ + /** + * Sample code: GetDedicatedCloudNode. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getDedicatedCloudNode( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.dedicatedCloudNodes().getByResourceGroupWithResponse("myResourceGroup", "myNode", Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesListByResourceGroupSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesListByResourceGroupSamples.java new file mode 100644 index 000000000000..76b7346a653d --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for DedicatedCloudNodes ListByResourceGroup. */ +public final class DedicatedCloudNodesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListRGDedicatedCloudNodes.json + */ + /** + * Sample code: ListRGDedicatedCloudNodes. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listRGDedicatedCloudNodes( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.dedicatedCloudNodes().listByResourceGroup("myResourceGroup", null, null, null, Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesListSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesListSamples.java new file mode 100644 index 000000000000..5fd407bee74a --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for DedicatedCloudNodes List. */ +public final class DedicatedCloudNodesListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListDedicatedCloudNodes.json + */ + /** + * Sample code: ListDedicatedCloudNodes. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listDedicatedCloudNodes( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.dedicatedCloudNodes().list(null, null, null, Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesUpdateSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesUpdateSamples.java new file mode 100644 index 000000000000..25cef2056f92 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudNodesUpdateSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.vmwarecloudsimple.models.DedicatedCloudNode; +import java.util.HashMap; +import java.util.Map; + +/** Samples for DedicatedCloudNodes Update. */ +public final class DedicatedCloudNodesUpdateSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/PatchDedicatedCloudNode.json + */ + /** + * Sample code: PatchDedicatedCloudNode. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void patchDedicatedCloudNode( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + DedicatedCloudNode resource = + manager + .dedicatedCloudNodes() + .getByResourceGroupWithResponse("myResourceGroup", "myNode", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("myTag", "tagValue")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesCreateOrUpdateSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..dca7f8d43073 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesCreateOrUpdateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +/** Samples for DedicatedCloudServices CreateOrUpdate. */ +public final class DedicatedCloudServicesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/CreateDedicatedCloudService.json + */ + /** + * Sample code: CreateDedicatedCloudService. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void createDedicatedCloudService( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .dedicatedCloudServices() + .define("myService") + .withRegion("westus") + .withExistingResourceGroup("myResourceGroup") + .withGatewaySubnet("10.0.0.0") + .create(); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesDeleteSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesDeleteSamples.java new file mode 100644 index 000000000000..88c693d1c359 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for DedicatedCloudServices Delete. */ +public final class DedicatedCloudServicesDeleteSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/DeleteDedicatedCloudService.json + */ + /** + * Sample code: DeleteDedicatedCloudService. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void deleteDedicatedCloudService( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.dedicatedCloudServices().delete("myResourceGroup", "myService", Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesGetByResourceGroupSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesGetByResourceGroupSamples.java new file mode 100644 index 000000000000..3d9faccf440e --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for DedicatedCloudServices GetByResourceGroup. */ +public final class DedicatedCloudServicesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetDedicatedCloudService.json + */ + /** + * Sample code: GetDedicatedCloudService. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getDedicatedCloudService( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.dedicatedCloudServices().getByResourceGroupWithResponse("myResourceGroup", "myService", Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesListByResourceGroupSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesListByResourceGroupSamples.java new file mode 100644 index 000000000000..a361d3827d19 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for DedicatedCloudServices ListByResourceGroup. */ +public final class DedicatedCloudServicesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListRGDedicatedCloudServices.json + */ + /** + * Sample code: ListRGDedicatedCloudServices. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listRGDedicatedCloudServices( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.dedicatedCloudServices().listByResourceGroup("myResourceGroup", null, null, null, Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesListSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesListSamples.java new file mode 100644 index 000000000000..69da2462ae2f --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for DedicatedCloudServices List. */ +public final class DedicatedCloudServicesListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListDedicatedCloudServices.json + */ + /** + * Sample code: ListDedicatedCloudServices. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listDedicatedCloudServices( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.dedicatedCloudServices().list(null, null, null, Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesUpdateSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesUpdateSamples.java new file mode 100644 index 000000000000..620df1f801ee --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/DedicatedCloudServicesUpdateSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.vmwarecloudsimple.models.DedicatedCloudService; +import java.util.HashMap; +import java.util.Map; + +/** Samples for DedicatedCloudServices Update. */ +public final class DedicatedCloudServicesUpdateSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/PatchDedicatedService.json + */ + /** + * Sample code: PatchDedicatedService. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void patchDedicatedService( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + DedicatedCloudService resource = + manager + .dedicatedCloudServices() + .getByResourceGroupWithResponse("myResourceGroup", "myService", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("myTag", "tagValue")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/OperationsGetSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/OperationsGetSamples.java new file mode 100644 index 000000000000..25662885e181 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/OperationsGetSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for Operations Get. */ +public final class OperationsGetSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetFailedOperationResult.json + */ + /** + * Sample code: GetFailedOperationResult. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getFailedOperationResult( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .operations() + .getWithResponse( + "westus2", "https://management.azure.com/", "d030bb3f-7d53-11e9-8e09-9a86872085ff", Context.NONE); + } + + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetOperationResult.json + */ + /** + * Sample code: GetOperationResult. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getOperationResult( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .operations() + .getWithResponse( + "westus2", "https://management.azure.com/", "f8e1c8f1-7d52-11e9-8e07-9a86872085ff", Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/OperationsListSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/OperationsListSamples.java new file mode 100644 index 000000000000..fb417242c331 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/OperationsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListOperations.json + */ + /** + * Sample code: ListOperations. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listOperations(com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.operations().list(Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/PrivateCloudsGetSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/PrivateCloudsGetSamples.java new file mode 100644 index 000000000000..f9acc3dc78a0 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/PrivateCloudsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for PrivateClouds Get. */ +public final class PrivateCloudsGetSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetPrivateCloud.json + */ + /** + * Sample code: GetPrivateCloud. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getPrivateCloud(com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.privateClouds().getWithResponse("myPrivateCloud", "westus2", Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/PrivateCloudsListSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/PrivateCloudsListSamples.java new file mode 100644 index 000000000000..29ea0a535c5b --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/PrivateCloudsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for PrivateClouds List. */ +public final class PrivateCloudsListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListPrivateCloudInLocation.json + */ + /** + * Sample code: ListPrivateCloudInLocation. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listPrivateCloudInLocation( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.privateClouds().list("eastus", Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/ResourcePoolsGetSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/ResourcePoolsGetSamples.java new file mode 100644 index 000000000000..e83d44e407da --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/ResourcePoolsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for ResourcePools Get. */ +public final class ResourcePoolsGetSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetResourcePool.json + */ + /** + * Sample code: GetResourcePool. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getResourcePool(com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.resourcePools().getWithResponse("westus2", "myPrivateCloud", "resgroup-26", Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/ResourcePoolsListSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/ResourcePoolsListSamples.java new file mode 100644 index 000000000000..a83e8c911e46 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/ResourcePoolsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for ResourcePools List. */ +public final class ResourcePoolsListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListResourcePools.json + */ + /** + * Sample code: ListResourcePools. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listResourcePools(com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.resourcePools().list("westus2", "myPrivateCloud", Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/SkusAvailabilityListSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/SkusAvailabilityListSamples.java new file mode 100644 index 000000000000..81f82545ef68 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/SkusAvailabilityListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for SkusAvailability List. */ +public final class SkusAvailabilityListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListAvailabilities.json + */ + /** + * Sample code: ListAvailabilities. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listAvailabilities( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.skusAvailabilities().list("westus2", null, Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/UsagesListSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/UsagesListSamples.java new file mode 100644 index 000000000000..53a606447714 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/UsagesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for Usages List. */ +public final class UsagesListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListUsages.json + */ + /** + * Sample code: ListUsages. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listUsages(com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.usages().list("westus2", null, Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachineTemplatesGetSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachineTemplatesGetSamples.java new file mode 100644 index 000000000000..0066c17e9cf3 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachineTemplatesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachineTemplates Get. */ +public final class VirtualMachineTemplatesGetSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetVirtualMachineTemplate.json + */ + /** + * Sample code: GetVirtualMachineTemplate. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getVirtualMachineTemplate( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.virtualMachineTemplates().getWithResponse("westus2", "myPrivateCloud", "vm-34", Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachineTemplatesListSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachineTemplatesListSamples.java new file mode 100644 index 000000000000..d1028ce3da31 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachineTemplatesListSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachineTemplates List. */ +public final class VirtualMachineTemplatesListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListVirtualMachineTemplates.json + */ + /** + * Sample code: ListVirtualMachineTemplates. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listVirtualMachineTemplates( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .virtualMachineTemplates() + .list( + "myPrivateCloud", + "westus2", + "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26", + Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesCreateOrUpdateSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..1142230d5572 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesCreateOrUpdateSamples.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.resourcemanager.vmwarecloudsimple.fluent.models.ResourcePoolInner; +import com.azure.resourcemanager.vmwarecloudsimple.fluent.models.VirtualNetworkInner; +import com.azure.resourcemanager.vmwarecloudsimple.fluent.models.VirtualNicInner; +import com.azure.resourcemanager.vmwarecloudsimple.models.DiskIndependenceMode; +import com.azure.resourcemanager.vmwarecloudsimple.models.NicType; +import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualDisk; +import java.util.Arrays; + +/** Samples for VirtualMachines CreateOrUpdate. */ +public final class VirtualMachinesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/CreateVirtualMachine.json + */ + /** + * Sample code: CreateVirtualMachine. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void createVirtualMachine( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .virtualMachines() + .define("myVirtualMachine") + .withRegion("westus2") + .withExistingResourceGroup("myResourceGroup") + .withAmountOfRam(4096) + .withDisks( + Arrays + .asList( + new VirtualDisk() + .withControllerId("1000") + .withIndependenceMode(DiskIndependenceMode.PERSISTENT) + .withTotalSize(10485760) + .withVirtualDiskId("2000"))) + .withNics( + Arrays + .asList( + new VirtualNicInner() + .withNetwork( + new VirtualNetworkInner() + .withId( + "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19")) + .withNicType(NicType.E1000) + .withPowerOnBoot(true) + .withVirtualNicId("4000"))) + .withNumberOfCores(2) + .withPrivateCloudId( + "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud") + .withResourcePool( + new ResourcePoolInner() + .withId( + "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26")) + .withTemplateId( + "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34") + .withReferer("https://management.azure.com/") + .create(); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesDeleteSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesDeleteSamples.java new file mode 100644 index 000000000000..e807b6323570 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Delete. */ +public final class VirtualMachinesDeleteSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/DeleteVirtualMachine.json + */ + /** + * Sample code: DeleteVirtualMachine. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void deleteVirtualMachine( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .virtualMachines() + .delete("myResourceGroup", "https://management.azure.com/", "myVirtualMachine", Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesGetByResourceGroupSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesGetByResourceGroupSamples.java new file mode 100644 index 000000000000..9ab3b43a24f1 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesGetByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines GetByResourceGroup. */ +public final class VirtualMachinesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetVirtualMachine.json + */ + /** + * Sample code: GetVirtualMachine. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getVirtualMachine(com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.virtualMachines().getByResourceGroupWithResponse("myResourceGroup", "myVirtualMachine", Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesListByResourceGroupSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesListByResourceGroupSamples.java new file mode 100644 index 000000000000..e2fe93110501 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines ListByResourceGroup. */ +public final class VirtualMachinesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListRGVirtualMachines.json + */ + /** + * Sample code: ListRGVirtualMachines. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listRGVirtualMachines( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.virtualMachines().listByResourceGroup("myResourceGroup", null, null, null, Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesListSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesListSamples.java new file mode 100644 index 000000000000..4d027a92c21d --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines List. */ +public final class VirtualMachinesListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListVirtualMachines.json + */ + /** + * Sample code: ListVirtualMachines. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listVirtualMachines( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.virtualMachines().list(null, null, null, Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesStartSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesStartSamples.java new file mode 100644 index 000000000000..1a6e10a5e0d4 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesStartSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualMachines Start. */ +public final class VirtualMachinesStartSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/StartVirtualMachine.json + */ + /** + * Sample code: StartVirtualMachine. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void startVirtualMachine( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .virtualMachines() + .start("myResourceGroup", "https://management.azure.com/", "myVirtualMachine", Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesStopSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesStopSamples.java new file mode 100644 index 000000000000..814482572eb5 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesStopSamples.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.vmwarecloudsimple.models.StopMode; +import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualMachineStopMode; + +/** Samples for VirtualMachines Stop. */ +public final class VirtualMachinesStopSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/StopInBodyVirtualMachine.json + */ + /** + * Sample code: StopInBodyVirtualMachine. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void stopInBodyVirtualMachine( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .virtualMachines() + .stop( + "myResourceGroup", + "https://management.azure.com/", + "myVirtualMachine", + null, + new VirtualMachineStopMode(), + Context.NONE); + } + + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/StopInQueryVirtualMachine.json + */ + /** + * Sample code: StopInQueryVirtualMachine. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void stopInQueryVirtualMachine( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .virtualMachines() + .stop( + "myResourceGroup", + "https://management.azure.com/", + "myVirtualMachine", + StopMode.SUSPEND, + null, + Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesUpdateSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesUpdateSamples.java new file mode 100644 index 000000000000..633b7df671f3 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualMachinesUpdateSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualMachine; +import java.util.HashMap; +import java.util.Map; + +/** Samples for VirtualMachines Update. */ +public final class VirtualMachinesUpdateSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/PatchVirtualMachine.json + */ + /** + * Sample code: PatchVirtualMachine. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void patchVirtualMachine( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + VirtualMachine resource = + manager + .virtualMachines() + .getByResourceGroupWithResponse("myResourceGroup", "myVirtualMachine", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("myTag", "tagValue")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualNetworksGetSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualNetworksGetSamples.java new file mode 100644 index 000000000000..85000df995cb --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualNetworksGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualNetworks Get. */ +public final class VirtualNetworksGetSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/GetVirtualNetwork.json + */ + /** + * Sample code: GetVirtualNetwork. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void getVirtualNetwork(com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager.virtualNetworks().getWithResponse("westus2", "myPrivateCloud", "dvportgroup-19", Context.NONE); + } +} diff --git a/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualNetworksListSamples.java b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualNetworksListSamples.java new file mode 100644 index 000000000000..f002c8bcd433 --- /dev/null +++ b/sdk/vmwarecloudsimple/azure-resourcemanager-vmwarecloudsimple/src/samples/java/com/azure/resourcemanager/vmwarecloudsimple/generated/VirtualNetworksListSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.vmwarecloudsimple.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualNetworks List. */ +public final class VirtualNetworksListSamples { + /* + * x-ms-original-file: specification/vmwarecloudsimple/resource-manager/Microsoft.VMwareCloudSimple/stable/2019-04-01/examples/ListVirtualNetworks.json + */ + /** + * Sample code: ListVirtualNetworks. + * + * @param manager Entry point to VMwareCloudSimpleManager. + */ + public static void listVirtualNetworks( + com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager) { + manager + .virtualNetworks() + .list( + "westus2", + "myPrivateCloud", + "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26", + Context.NONE); + } +}