diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollbackStatusInfo.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollbackStatusInfo.java index 41ab79c76ce..e01e0eaf6cd 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollbackStatusInfo.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollbackStatusInfo.java @@ -28,7 +28,7 @@ public class RollbackStatusInfo { private Integer failedRolledbackInstanceCount; /** - * Error Details if OS rollback failed. + * Error details if OS rollback failed. */ @JsonProperty(value = "rollbackError", access = JsonProperty.Access.WRITE_ONLY) private ApiError rollbackError; @@ -52,7 +52,7 @@ public Integer failedRolledbackInstanceCount() { } /** - * Get error Details if OS rollback failed. + * Get error details if OS rollback failed. * * @return the rollbackError value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetIpTag.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetIpTag.java new file mode 100644 index 00000000000..c6f43e1bee4 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetIpTag.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains the IP tag associated with the public IP address. + */ +public class VirtualMachineScaleSetIpTag { + /** + * IP tag type. Example: FirstPartyUsage. + */ + @JsonProperty(value = "ipTagType") + private String ipTagType; + + /** + * IP tag associated with the public IP. Example: SQL, Storage etc. + */ + @JsonProperty(value = "tag") + private String tag; + + /** + * Get iP tag type. Example: FirstPartyUsage. + * + * @return the ipTagType value + */ + public String ipTagType() { + return this.ipTagType; + } + + /** + * Set iP tag type. Example: FirstPartyUsage. + * + * @param ipTagType the ipTagType value to set + * @return the VirtualMachineScaleSetIpTag object itself. + */ + public VirtualMachineScaleSetIpTag withIpTagType(String ipTagType) { + this.ipTagType = ipTagType; + return this; + } + + /** + * Get iP tag associated with the public IP. Example: SQL, Storage etc. + * + * @return the tag value + */ + public String tag() { + return this.tag; + } + + /** + * Set iP tag associated with the public IP. Example: SQL, Storage etc. + * + * @param tag the tag value to set + * @return the VirtualMachineScaleSetIpTag object itself. + */ + public VirtualMachineScaleSetIpTag withTag(String tag) { + this.tag = tag; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfiguration.java index 8254df14859..2ee501a8e8a 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfiguration.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfiguration.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.compute; +import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; @@ -35,6 +36,12 @@ public class VirtualMachineScaleSetPublicIPAddressConfiguration { @JsonProperty(value = "properties.dnsSettings") private VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings dnsSettings; + /** + * The list of IP tags associated with the public IP address. + */ + @JsonProperty(value = "properties.ipTags") + private List ipTags; + /** * Get the publicIP address configuration name. * @@ -95,4 +102,24 @@ public VirtualMachineScaleSetPublicIPAddressConfiguration withDnsSettings(Virtua return this; } + /** + * Get the list of IP tags associated with the public IP address. + * + * @return the ipTags value + */ + public List ipTags() { + return this.ipTags; + } + + /** + * Set the list of IP tags associated with the public IP address. + * + * @param ipTags the ipTags value to set + * @return the VirtualMachineScaleSetPublicIPAddressConfiguration object itself. + */ + public VirtualMachineScaleSetPublicIPAddressConfiguration withIpTags(List ipTags) { + this.ipTags = ipTags; + return this; + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java index 4f0e7eb94b5..bff9f747b1a 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java @@ -172,19 +172,6 @@ public VirtualMachineExtensionsInner virtualMachineExtensions() { return this.virtualMachineExtensions; } - /** - * The VirtualMachinesInner object to access its operations. - */ - private VirtualMachinesInner virtualMachines; - - /** - * Gets the VirtualMachinesInner object to access its operations. - * @return the VirtualMachinesInner object. - */ - public VirtualMachinesInner virtualMachines() { - return this.virtualMachines; - } - /** * The VirtualMachineImagesInner object to access its operations. */ @@ -237,6 +224,19 @@ public ImagesInner images() { return this.images; } + /** + * The VirtualMachinesInner object to access its operations. + */ + private VirtualMachinesInner virtualMachines; + + /** + * Gets the VirtualMachinesInner object to access its operations. + * @return the VirtualMachinesInner object. + */ + public VirtualMachinesInner virtualMachines() { + return this.virtualMachines; + } + /** * The VirtualMachineScaleSetsInner object to access its operations. */ @@ -405,11 +405,11 @@ protected void initialize() { this.availabilitySets = new AvailabilitySetsInner(restClient().retrofit(), this); this.virtualMachineExtensionImages = new VirtualMachineExtensionImagesInner(restClient().retrofit(), this); this.virtualMachineExtensions = new VirtualMachineExtensionsInner(restClient().retrofit(), this); - this.virtualMachines = new VirtualMachinesInner(restClient().retrofit(), this); this.virtualMachineImages = new VirtualMachineImagesInner(restClient().retrofit(), this); this.usages = new UsagesInner(restClient().retrofit(), this); this.virtualMachineSizes = new VirtualMachineSizesInner(restClient().retrofit(), this); this.images = new ImagesInner(restClient().retrofit(), this); + this.virtualMachines = new VirtualMachinesInner(restClient().retrofit(), this); this.virtualMachineScaleSets = new VirtualMachineScaleSetsInner(restClient().retrofit(), this); this.virtualMachineScaleSetExtensions = new VirtualMachineScaleSetExtensionsInner(restClient().retrofit(), this); this.virtualMachineScaleSetRollingUpgrades = new VirtualMachineScaleSetRollingUpgradesInner(restClient().retrofit(), this); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java index 9ab5d94e57f..84c17f91ea1 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java @@ -85,6 +85,10 @@ interface VirtualMachineExtensionsService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}") Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineExtensions list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions") + Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -795,4 +799,170 @@ private ServiceResponse getDelegate(Response listAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionsListResultInner object + */ + public Observable listAsync(String resourceGroupName, String vmName) { + return listWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, VirtualMachineExtensionsListResultInner>() { + @Override + public VirtualMachineExtensionsListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionsListResultInner object + */ + public Observable> listWithServiceResponseAsync(String resourceGroupName, String vmName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmName == null) { + throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final String expand = null; + return service.list(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineExtensionsListResultInner object if successful. + */ + public VirtualMachineExtensionsListResultInner list(String resourceGroupName, String vmName, String expand) { + return listWithServiceResponseAsync(resourceGroupName, vmName, expand).toBlocking().single().body(); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listAsync(String resourceGroupName, String vmName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, vmName, expand), serviceCallback); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionsListResultInner object + */ + public Observable listAsync(String resourceGroupName, String vmName, String expand) { + return listWithServiceResponseAsync(resourceGroupName, vmName, expand).map(new Func1, VirtualMachineExtensionsListResultInner>() { + @Override + public VirtualMachineExtensionsListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionsListResultInner object + */ + public Observable> listWithServiceResponseAsync(String resourceGroupName, String vmName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmName == null) { + throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.list(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java index b69dadbbf91..82f8fed75bd 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java @@ -70,10 +70,6 @@ public VirtualMachinesInner(Retrofit retrofit, ComputeManagementClientImpl clien * used by Retrofit to perform actually REST calls. */ interface VirtualMachinesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines getExtensions" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions") - Observable> getExtensions(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines capture" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture") Observable> capture(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineCaptureParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -204,172 +200,6 @@ interface VirtualMachinesService { } - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VirtualMachineExtensionsListResultInner object if successful. - */ - public VirtualMachineExtensionsListResultInner getExtensions(String resourceGroupName, String vmName) { - return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); - } - - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getExtensionsAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getExtensionsWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); - } - - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualMachineExtensionsListResultInner object - */ - public Observable getExtensionsAsync(String resourceGroupName, String vmName) { - return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, VirtualMachineExtensionsListResultInner>() { - @Override - public VirtualMachineExtensionsListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualMachineExtensionsListResultInner object - */ - public Observable> getExtensionsWithServiceResponseAsync(String resourceGroupName, String vmName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmName == null) { - throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2018-04-01"; - final String expand = null; - return service.getExtensions(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getExtensionsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @param expand The expand expression to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VirtualMachineExtensionsListResultInner object if successful. - */ - public VirtualMachineExtensionsListResultInner getExtensions(String resourceGroupName, String vmName, String expand) { - return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName, expand).toBlocking().single().body(); - } - - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @param expand The expand expression to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getExtensionsAsync(String resourceGroupName, String vmName, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getExtensionsWithServiceResponseAsync(resourceGroupName, vmName, expand), serviceCallback); - } - - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @param expand The expand expression to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualMachineExtensionsListResultInner object - */ - public Observable getExtensionsAsync(String resourceGroupName, String vmName, String expand) { - return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName, expand).map(new Func1, VirtualMachineExtensionsListResultInner>() { - @Override - public VirtualMachineExtensionsListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @param expand The expand expression to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualMachineExtensionsListResultInner object - */ - public Observable> getExtensionsWithServiceResponseAsync(String resourceGroupName, String vmName, String expand) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmName == null) { - throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2018-04-01"; - return service.getExtensions(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getExtensionsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getExtensionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. *