diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java index a8d809578f7..b4af193fcfa 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java @@ -10,6 +10,7 @@ import java.util.List; import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; @@ -41,7 +42,7 @@ public class AvailabilitySetUpdate extends UpdateResource { * The resource status information. */ @JsonProperty(value = "properties.statuses", access = JsonProperty.Access.WRITE_ONLY) - private List statuses; + private List statuses; /** * Sku of the availability set. @@ -114,7 +115,7 @@ public AvailabilitySetUpdate withVirtualMachines(List virtualMachin * * @return the statuses value */ - public List statuses() { + public List statuses() { return this.statuses; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java index 47f5ccd4dec..f937855d07f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java @@ -62,14 +62,14 @@ public class DataDisk { /** * Specifies how the virtual machine should be created.<br><br> - * Possible values are:<br><br> **Attach** This value is used - * when you are using a specialized disk to create the virtual - * machine.<br><br> **FromImage** This value is used when you - * are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. - * If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach'. + * Possible values are:<br><br> **Attach** \u2013 This value is + * used when you are using a specialized disk to create the virtual + * machine.<br><br> **FromImage** \u2013 This value is used + * when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element + * described above. If you are using a marketplace image, you also use the + * plan element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach'. */ @JsonProperty(value = "createOption", required = true) private DiskCreateOptionTypes createOption; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskInstanceView.java index 92474499e72..1034d96e779 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskInstanceView.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.compute; import java.util.List; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -32,7 +33,7 @@ public class DiskInstanceView { * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** * Get the name value. @@ -79,7 +80,7 @@ public DiskInstanceView withEncryptionSettings(List encr * * @return the statuses value */ - public List statuses() { + public List statuses() { return this.statuses; } @@ -89,7 +90,7 @@ public List statuses() { * @param statuses the statuses value to set * @return the DiskInstanceView object itself. */ - public DiskInstanceView withStatuses(List statuses) { + public DiskInstanceView withStatuses(List statuses) { this.statuses = statuses; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java index 13fec1deee9..0f6da66a142 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java @@ -74,14 +74,14 @@ public class OSDisk { /** * Specifies how the virtual machine should be created.<br><br> - * Possible values are:<br><br> **Attach** This value is used - * when you are using a specialized disk to create the virtual - * machine.<br><br> **FromImage** This value is used when you - * are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. - * If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach'. + * Possible values are:<br><br> **Attach** \u2013 This value is + * used when you are using a specialized disk to create the virtual + * machine.<br><br> **FromImage** \u2013 This value is used + * when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element + * described above. If you are using a marketplace image, you also use the + * plan element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach'. */ @JsonProperty(value = "createOption", required = true) private DiskCreateOptionTypes createOption; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandResult.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandResult.java new file mode 100644 index 00000000000..99db5878d7f --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandResult.java @@ -0,0 +1,45 @@ +/** + * 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; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Run command operation response. + */ +@JsonFlatten +public class RunCommandResult { + /** + * Operation output data (raw JSON). + */ + @JsonProperty(value = "properties.output") + private Object output; + + /** + * Get the output value. + * + * @return the output value + */ + public Object output() { + return this.output; + } + + /** + * Set the output value. + * + * @param output the output value to set + * @return the RunCommandResult object itself. + */ + public RunCommandResult withOutput(Object output) { + this.output = output; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineAgentInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineAgentInstanceView.java index a910f51fc87..452708005d7 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineAgentInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineAgentInstanceView.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.compute; import java.util.List; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -31,7 +32,7 @@ public class VirtualMachineAgentInstanceView { * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** * Get the vmAgentVersion value. @@ -78,7 +79,7 @@ public VirtualMachineAgentInstanceView withExtensionHandlers(List statuses() { + public List statuses() { return this.statuses; } @@ -88,7 +89,7 @@ public List statuses() { * @param statuses the statuses value to set * @return the VirtualMachineAgentInstanceView object itself. */ - public VirtualMachineAgentInstanceView withStatuses(List statuses) { + public VirtualMachineAgentInstanceView withStatuses(List statuses) { this.statuses = statuses; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionHandlerInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionHandlerInstanceView.java index 1623c25193b..8940b5ec06f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionHandlerInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionHandlerInstanceView.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.compute; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -31,7 +32,7 @@ public class VirtualMachineExtensionHandlerInstanceView { * The extension handler status. */ @JsonProperty(value = "status") - private InstanceViewStatus status; + private InstanceViewStatusInner status; /** * Get the type value. @@ -78,7 +79,7 @@ public VirtualMachineExtensionHandlerInstanceView withTypeHandlerVersion(String * * @return the status value */ - public InstanceViewStatus status() { + public InstanceViewStatusInner status() { return this.status; } @@ -88,7 +89,7 @@ public InstanceViewStatus status() { * @param status the status value to set * @return the VirtualMachineExtensionHandlerInstanceView object itself. */ - public VirtualMachineExtensionHandlerInstanceView withStatus(InstanceViewStatus status) { + public VirtualMachineExtensionHandlerInstanceView withStatus(InstanceViewStatusInner status) { this.status = status; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionInstanceView.java index 74926a3efc6..ea26c9a4262 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionInstanceView.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.compute; import java.util.List; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -38,13 +39,13 @@ public class VirtualMachineExtensionInstanceView { * The resource status information. */ @JsonProperty(value = "substatuses") - private List substatuses; + private List substatuses; /** * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** * Get the name value. @@ -111,7 +112,7 @@ public VirtualMachineExtensionInstanceView withTypeHandlerVersion(String typeHan * * @return the substatuses value */ - public List substatuses() { + public List substatuses() { return this.substatuses; } @@ -121,7 +122,7 @@ public List substatuses() { * @param substatuses the substatuses value to set * @return the VirtualMachineExtensionInstanceView object itself. */ - public VirtualMachineExtensionInstanceView withSubstatuses(List substatuses) { + public VirtualMachineExtensionInstanceView withSubstatuses(List substatuses) { this.substatuses = substatuses; return this; } @@ -131,7 +132,7 @@ public VirtualMachineExtensionInstanceView withSubstatuses(List statuses() { + public List statuses() { return this.statuses; } @@ -141,7 +142,7 @@ public List statuses() { * @param statuses the statuses value to set * @return the VirtualMachineExtensionInstanceView object itself. */ - public VirtualMachineExtensionInstanceView withStatuses(List statuses) { + public VirtualMachineExtensionInstanceView withStatuses(List statuses) { this.statuses = statuses; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineHealthStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineHealthStatus.java index 9a640f90c1b..e98e8986939 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineHealthStatus.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineHealthStatus.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.compute; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -18,14 +19,14 @@ public class VirtualMachineHealthStatus { * The health status information for the VM. */ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private InstanceViewStatus status; + private InstanceViewStatusInner status; /** * Get the status value. * * @return the status value */ - public InstanceViewStatus status() { + public InstanceViewStatusInner status() { return this.status; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java index 595f6da7931..34b6840c803 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java @@ -41,8 +41,8 @@ public class VirtualMachineScaleSetOSDisk { /** * Specifies how the virtual machines in the scale set should be * created.<br><br> The only allowed value is: **FromImage** - * This value is used when you are using an image to create the virtual - * machine. If you are using a platform image, you also use the + * \u2013 This value is used when you are using an image to create the + * virtual machine. If you are using a platform image, you also use the * imageReference element described above. If you are using a marketplace * image, you also use the plan element previously described. Possible * values include: 'FromImage', 'Empty', 'Attach'. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AccessUriInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AccessUriInner.java index 0bdf469df11..099d5ba1655 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AccessUriInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AccessUriInner.java @@ -9,17 +9,15 @@ package com.microsoft.azure.management.compute.implementation; import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; /** * A disk access SAS uri. */ -@JsonFlatten public class AccessUriInner { /** * A SAS uri for accessing a disk. */ - @JsonProperty(value = "properties.output.accessSAS", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "accessSAS", access = JsonProperty.Access.WRITE_ONLY) private String accessSAS; /** diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetInner.java index 182ef4a7cfc..21d2b0ae3ae 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetInner.java @@ -10,7 +10,6 @@ import java.util.List; import com.microsoft.azure.SubResource; -import com.microsoft.azure.management.compute.InstanceViewStatus; import com.microsoft.azure.management.compute.Sku; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; @@ -52,7 +51,7 @@ public class AvailabilitySetInner extends Resource { * The resource status information. */ @JsonProperty(value = "properties.statuses", access = JsonProperty.Access.WRITE_ONLY) - private List statuses; + private List statuses; /** * Sku of the availability set. @@ -125,7 +124,7 @@ public AvailabilitySetInner withVirtualMachines(List virtualMachine * * @return the statuses value */ - public List statuses() { + public List statuses() { return this.statuses; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java index 54e82371d0e..e2f0371f4a5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java @@ -40,7 +40,7 @@ * An instance of this class provides access to all the operations defined * in AvailabilitySets. */ -public class AvailabilitySetsInner implements InnerSupportsGet, InnerSupportsDelete { +public class AvailabilitySetsInner implements InnerSupportsGet, InnerSupportsDelete { /** The Retrofit service to perform REST calls. */ private AvailabilitySetsService service; /** The service client containing this operation class. */ @@ -158,7 +158,7 @@ public Observable> createOrUpdateWithServi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.createOrUpdate(resourceGroupName, availabilitySetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -250,7 +250,7 @@ public Observable> updateWithServiceRespon throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.update(resourceGroupName, availabilitySetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -280,10 +280,9 @@ private ServiceResponse updateDelegate(Response deleteAsync(String resourceGroupName, String availabilitySetName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String availabilitySetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, availabilitySetName), serviceCallback); } @@ -305,12 +304,12 @@ public ServiceFuture deleteAsync(String resourceGr * @param resourceGroupName The name of the resource group. * @param availabilitySetName The name of the availability set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable deleteAsync(String resourceGroupName, String availabilitySetName) { - return deleteWithServiceResponseAsync(resourceGroupName, availabilitySetName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String availabilitySetName) { + return deleteWithServiceResponseAsync(resourceGroupName, availabilitySetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -322,9 +321,9 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String availabilitySetName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String availabilitySetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -334,13 +333,13 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.delete(resourceGroupName, availabilitySetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteDelegate(response); + ServiceResponse clientResponse = deleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -349,9 +348,9 @@ public Observable> call(Response deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -419,7 +418,7 @@ public Observable> getByResourceGroupWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, availabilitySetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -500,7 +499,7 @@ public Observable>> listByResourceGro if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -589,7 +588,7 @@ public Observable>> listAvailableS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listAvailableSizes(resourceGroupName, availabilitySetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java index 60bbfac6a05..f7823911202 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java @@ -46,7 +46,7 @@ * An instance of this class provides access to all the operations defined * in Disks. */ -public class DisksInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class DisksInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private DisksService service; /** The service client containing this operation class. */ @@ -558,10 +558,9 @@ private ServiceResponse getByResourceGroupDelegate(Response deleteAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); } @@ -585,10 +584,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String diskName) { - return deleteWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String diskName) { + return deleteWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -602,7 +601,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String diskName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -614,7 +613,7 @@ public Observable> deleteWithServi } final String apiVersion = "2018-04-01"; Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -625,10 +624,9 @@ public Observable> deleteWithServi * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String diskName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, diskName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String diskName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, diskName).toBlocking().single().body(); } /** @@ -640,7 +638,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); } @@ -650,12 +648,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param resourceGroupName The name of the resource group. * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String diskName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String diskName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -667,9 +665,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String diskName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -681,11 +679,11 @@ public Observable> beginDeleteWith } final String apiVersion = "2018-04-01"; return service.beginDelete(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -694,9 +692,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1097,10 +1095,9 @@ private ServiceResponse beginGrantAccessDelegate(Response revokeAccessAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { + public ServiceFuture revokeAccessAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(revokeAccessWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); } @@ -1124,10 +1121,10 @@ public ServiceFuture revokeAccessAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable revokeAccessAsync(String resourceGroupName, String diskName) { - return revokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, OperationStatusResponseInner>() { + public Observable revokeAccessAsync(String resourceGroupName, String diskName) { + return revokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1141,7 +1138,7 @@ public OperationStatusResponseInner call(ServiceResponse> revokeAccessWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> revokeAccessWithServiceResponseAsync(String resourceGroupName, String diskName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1153,7 +1150,7 @@ public Observable> revokeAccessWit } final String apiVersion = "2018-04-01"; Observable> observable = service.revokeAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1164,10 +1161,9 @@ public Observable> revokeAccessWit * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRevokeAccess(String resourceGroupName, String diskName) { - return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName).toBlocking().single().body(); + public void beginRevokeAccess(String resourceGroupName, String diskName) { + beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName).toBlocking().single().body(); } /** @@ -1179,7 +1175,7 @@ public OperationStatusResponseInner beginRevokeAccess(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRevokeAccessAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRevokeAccessAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); } @@ -1189,12 +1185,12 @@ public ServiceFuture beginRevokeAccessAsync(String * @param resourceGroupName The name of the resource group. * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRevokeAccessAsync(String resourceGroupName, String diskName) { - return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRevokeAccessAsync(String resourceGroupName, String diskName) { + return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1206,9 +1202,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRevokeAccessWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> beginRevokeAccessWithServiceResponseAsync(String resourceGroupName, String diskName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1220,11 +1216,11 @@ public Observable> beginRevokeAcce } final String apiVersion = "2018-04-01"; return service.beginRevokeAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRevokeAccessDelegate(response); + ServiceResponse clientResponse = beginRevokeAccessDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1233,9 +1229,9 @@ public Observable> call(Response beginRevokeAccessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRevokeAccessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java index a62e0428b2f..755ce287a84 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java @@ -44,7 +44,7 @@ * An instance of this class provides access to all the operations defined * in Images. */ -public class ImagesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class ImagesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private ImagesService service; /** The service client containing this operation class. */ @@ -182,7 +182,7 @@ public Observable> createOrUpdateWithServiceResponse throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -257,7 +257,7 @@ public Observable> beginCreateOrUpdateWithServiceRes throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -350,7 +350,7 @@ public Observable> updateWithServiceResponseAsync(St throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -425,7 +425,7 @@ public Observable> beginUpdateWithServiceResponseAsy throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -456,10 +456,9 @@ private ServiceResponse beginUpdateDelegate(Response r * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner delete(String resourceGroupName, String imageName) { - return deleteWithServiceResponseAsync(resourceGroupName, imageName).toBlocking().last().body(); + public void delete(String resourceGroupName, String imageName) { + deleteWithServiceResponseAsync(resourceGroupName, imageName).toBlocking().last().body(); } /** @@ -471,7 +470,7 @@ public OperationStatusResponseInner delete(String resourceGroupName, String imag * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String imageName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String imageName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, imageName), serviceCallback); } @@ -483,10 +482,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String imageName) { - return deleteWithServiceResponseAsync(resourceGroupName, imageName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String imageName) { + return deleteWithServiceResponseAsync(resourceGroupName, imageName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -500,7 +499,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String imageName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String imageName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -510,9 +509,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, imageName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -523,10 +522,9 @@ public Observable> deleteWithServi * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String imageName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, imageName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String imageName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, imageName).toBlocking().single().body(); } /** @@ -538,7 +536,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String imageName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String imageName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, imageName), serviceCallback); } @@ -548,12 +546,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param resourceGroupName The name of the resource group. * @param imageName The name of the image. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String imageName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, imageName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String imageName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, imageName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -565,9 +563,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String imageName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String imageName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -577,13 +575,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, imageName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -592,9 +590,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -663,7 +661,7 @@ public Observable> getByResourceGroupWithServiceResp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, imageName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -745,7 +743,7 @@ public Observable> getByResourceGroupWithServiceResp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, imageName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -858,7 +856,7 @@ public Observable>> listByResourceGroupSinglePa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -963,7 +961,7 @@ public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/InstanceViewStatusInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/InstanceViewStatusInner.java new file mode 100644 index 00000000000..4072f36348c --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/InstanceViewStatusInner.java @@ -0,0 +1,149 @@ +/** + * 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.implementation; + +import com.microsoft.azure.management.compute.StatusLevelTypes; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Instance view status. + */ +public class InstanceViewStatusInner { + /** + * The status code. + */ + @JsonProperty(value = "code") + private String code; + + /** + * The level code. Possible values include: 'Info', 'Warning', 'Error'. + */ + @JsonProperty(value = "level") + private StatusLevelTypes level; + + /** + * The short localizable label for the status. + */ + @JsonProperty(value = "displayStatus") + private String displayStatus; + + /** + * The detailed status message, including for alerts and error messages. + */ + @JsonProperty(value = "message") + private String message; + + /** + * The time of the status. + */ + @JsonProperty(value = "time") + private DateTime time; + + /** + * Get the code value. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the code value. + * + * @param code the code value to set + * @return the InstanceViewStatusInner object itself. + */ + public InstanceViewStatusInner withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the level value. + * + * @return the level value + */ + public StatusLevelTypes level() { + return this.level; + } + + /** + * Set the level value. + * + * @param level the level value to set + * @return the InstanceViewStatusInner object itself. + */ + public InstanceViewStatusInner withLevel(StatusLevelTypes level) { + this.level = level; + return this; + } + + /** + * Get the displayStatus value. + * + * @return the displayStatus value + */ + public String displayStatus() { + return this.displayStatus; + } + + /** + * Set the displayStatus value. + * + * @param displayStatus the displayStatus value to set + * @return the InstanceViewStatusInner object itself. + */ + public InstanceViewStatusInner withDisplayStatus(String displayStatus) { + this.displayStatus = displayStatus; + return this; + } + + /** + * Get the message value. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the message value. + * + * @param message the message value to set + * @return the InstanceViewStatusInner object itself. + */ + public InstanceViewStatusInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the time value. + * + * @return the time value + */ + public DateTime time() { + return this.time; + } + + /** + * Set the time value. + * + * @param time the time value to set + * @return the InstanceViewStatusInner object itself. + */ + public InstanceViewStatusInner withTime(DateTime time) { + this.time = time; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java index 834eb1ac67c..d4f5a1599a3 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java @@ -136,7 +136,7 @@ public Observable> exportReque throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.exportRequestRateByInterval(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -204,7 +204,7 @@ public Observable> beginExport throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginExportRequestRateByInterval(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -290,7 +290,7 @@ public Observable> exportThrot throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.exportThrottledRequests(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -358,7 +358,7 @@ public Observable> beginExport throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginExportThrottledRequests(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsOperationResultInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsOperationResultInner.java index 8dd8065900d..0e4a96c88ce 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsOperationResultInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsOperationResultInner.java @@ -14,7 +14,7 @@ /** * LogAnalytics operation status response. */ -public class LogAnalyticsOperationResultInner extends OperationStatusResponseInner { +public class LogAnalyticsOperationResultInner { /** * LogAnalyticsOutput. */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java index bdff105f020..88d162435d5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java @@ -102,7 +102,7 @@ public List call(ServiceResponse>> listWithServiceResponseAsync() { - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java index fa3f54f8c94..c2cf34357fc 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java @@ -46,7 +46,7 @@ * An instance of this class provides access to all the operations defined * in Snapshots. */ -public class SnapshotsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class SnapshotsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private SnapshotsService service; /** The service client containing this operation class. */ @@ -558,10 +558,9 @@ private ServiceResponse getByResourceGroupDelegate(Response deleteAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); } @@ -585,10 +584,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String snapshotName) { - return deleteWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String snapshotName) { + return deleteWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -602,7 +601,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -614,7 +613,7 @@ public Observable> deleteWithServi } final String apiVersion = "2018-04-01"; Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -625,10 +624,9 @@ public Observable> deleteWithServi * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String snapshotName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String snapshotName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().single().body(); } /** @@ -640,7 +638,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); } @@ -650,12 +648,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String snapshotName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String snapshotName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -667,9 +665,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -681,11 +679,11 @@ public Observable> beginDeleteWith } final String apiVersion = "2018-04-01"; return service.beginDelete(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -694,9 +692,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1097,10 +1095,9 @@ private ServiceResponse beginGrantAccessDelegate(Response revokeAccessAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { + public ServiceFuture revokeAccessAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(revokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); } @@ -1124,10 +1121,10 @@ public ServiceFuture revokeAccessAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable revokeAccessAsync(String resourceGroupName, String snapshotName) { - return revokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, OperationStatusResponseInner>() { + public Observable revokeAccessAsync(String resourceGroupName, String snapshotName) { + return revokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1141,7 +1138,7 @@ public OperationStatusResponseInner call(ServiceResponse> revokeAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> revokeAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1153,7 +1150,7 @@ public Observable> revokeAccessWit } final String apiVersion = "2018-04-01"; Observable> observable = service.revokeAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1164,10 +1161,9 @@ public Observable> revokeAccessWit * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRevokeAccess(String resourceGroupName, String snapshotName) { - return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().single().body(); + public void beginRevokeAccess(String resourceGroupName, String snapshotName) { + beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().single().body(); } /** @@ -1179,7 +1175,7 @@ public OperationStatusResponseInner beginRevokeAccess(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRevokeAccessAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRevokeAccessAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); } @@ -1189,12 +1185,12 @@ public ServiceFuture beginRevokeAccessAsync(String * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRevokeAccessAsync(String resourceGroupName, String snapshotName) { - return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRevokeAccessAsync(String resourceGroupName, String snapshotName) { + return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1206,9 +1202,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRevokeAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> beginRevokeAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1220,11 +1216,11 @@ public Observable> beginRevokeAcce } final String apiVersion = "2018-04-01"; return service.beginRevokeAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRevokeAccessDelegate(response); + ServiceResponse clientResponse = beginRevokeAccessDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1233,9 +1229,9 @@ public Observable> call(Response beginRevokeAccessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRevokeAccessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java index c3d91764761..aaeba3646e9 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java @@ -157,7 +157,7 @@ public Observable>> listSinglePageAsync(final S if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineCaptureResultInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineCaptureResultInner.java index fc79bfbd422..14721c0ab94 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineCaptureResultInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineCaptureResultInner.java @@ -8,39 +8,72 @@ package com.microsoft.azure.management.compute.implementation; +import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.SubResource; /** - * Resource Id. + * Output of virtual machine capture operation. */ -@JsonFlatten public class VirtualMachineCaptureResultInner extends SubResource { /** - * Operation output data (raw JSON). + * the schema of the captured virtual machine. */ - @JsonProperty(value = "properties.output") - private Object output; + @JsonProperty(value = "$schema", access = JsonProperty.Access.WRITE_ONLY) + private String schema; /** - * Get the output value. + * the version of the content. + */ + @JsonProperty(value = "contentVersion", access = JsonProperty.Access.WRITE_ONLY) + private String contentVersion; + + /** + * parameters of the captured virtual machine. + */ + @JsonProperty(value = "parameters", access = JsonProperty.Access.WRITE_ONLY) + private Object parameters; + + /** + * a list of resource items of the captured virtual machine. + */ + @JsonProperty(value = "resources", access = JsonProperty.Access.WRITE_ONLY) + private List resources; + + /** + * Get the schema value. + * + * @return the schema value + */ + public String schema() { + return this.schema; + } + + /** + * Get the contentVersion value. + * + * @return the contentVersion value + */ + public String contentVersion() { + return this.contentVersion; + } + + /** + * Get the parameters value. * - * @return the output value + * @return the parameters value */ - public Object output() { - return this.output; + public Object parameters() { + return this.parameters; } /** - * Set the output value. + * Get the resources value. * - * @param output the output value to set - * @return the VirtualMachineCaptureResultInner object itself. + * @return the resources value */ - public VirtualMachineCaptureResultInner withOutput(Object output) { - this.output = output; - return this; + public List resources() { + return this.resources; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java index 821c88e1a11..1d1bb26c2a5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java @@ -142,7 +142,7 @@ public Observable> getWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(location, publisherName, type, version, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -226,7 +226,7 @@ public Observable>> list if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listTypes(location, publisherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -317,7 +317,7 @@ public Observable>> list if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String filter = null; final Integer top = null; final String orderby = null; @@ -416,7 +416,7 @@ public Observable>> list if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listVersions(location, publisherName, type, this.client.subscriptionId(), filter, top, orderby, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override 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 44db0ff482d..9ab5d94e57f 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 @@ -164,7 +164,7 @@ public Observable> createOrUpdateW throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -246,7 +246,7 @@ public Observable> beginCreateOrUp throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -346,7 +346,7 @@ public Observable> updateWithServi throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -428,7 +428,7 @@ public Observable> beginUpdateWith throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -459,10 +459,9 @@ private ServiceResponse beginUpdateDelegate(Respon * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner delete(String resourceGroupName, String vmName, String vmExtensionName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).toBlocking().last().body(); + public void delete(String resourceGroupName, String vmName, String vmExtensionName) { + deleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).toBlocking().last().body(); } /** @@ -475,7 +474,7 @@ public OperationStatusResponseInner delete(String resourceGroupName, String vmNa * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String vmName, String vmExtensionName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String vmName, String vmExtensionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName), serviceCallback); } @@ -488,10 +487,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String vmName, String vmExtensionName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String vmName, String vmExtensionName) { + return deleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -506,7 +505,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -519,9 +518,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -533,10 +532,9 @@ public Observable> deleteWithServi * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String vmName, String vmExtensionName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String vmName, String vmExtensionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).toBlocking().single().body(); } /** @@ -549,7 +547,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmName, String vmExtensionName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmName, String vmExtensionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName), serviceCallback); } @@ -560,12 +558,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param vmName The name of the virtual machine where the extension should be deleted. * @param vmExtensionName The name of the virtual machine extension. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String vmName, String vmExtensionName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String vmName, String vmExtensionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -578,9 +576,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -593,13 +591,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -608,9 +606,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -686,7 +684,7 @@ public Observable> getWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.get(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -775,7 +773,7 @@ public Observable> getWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java index ddda82d3f99..ac0a3f4df8f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java @@ -157,7 +157,7 @@ public Observable> getWithServiceRespo if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(location, publisherName, offer, skus, version, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -255,7 +255,7 @@ public Observable>> listW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String filter = null; final Integer top = null; final String orderby = null; @@ -361,7 +361,7 @@ public Observable>> listW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(location, publisherName, offer, skus, this.client.subscriptionId(), filter, top, orderby, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -445,7 +445,7 @@ public Observable>> listO if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listOffers(location, publisherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -522,7 +522,7 @@ public Observable>> listP if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listPublishers(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -613,7 +613,7 @@ public Observable>> listS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listSkus(location, publisherName, offer, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java index 25f7cf32854..c0ac832e016 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java @@ -14,7 +14,6 @@ import com.microsoft.azure.management.compute.DiskInstanceView; import com.microsoft.azure.management.compute.VirtualMachineExtensionInstanceView; import com.microsoft.azure.management.compute.BootDiagnosticsInstanceView; -import com.microsoft.azure.management.compute.InstanceViewStatus; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -96,7 +95,7 @@ public class VirtualMachineInstanceViewInner { * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** * Get the platformUpdateDomain value. @@ -323,7 +322,7 @@ public VirtualMachineInstanceViewInner withBootDiagnostics(BootDiagnosticsInstan * * @return the statuses value */ - public List statuses() { + public List statuses() { return this.statuses; } @@ -333,7 +332,7 @@ public List statuses() { * @param statuses the statuses value to set * @return the VirtualMachineInstanceViewInner object itself. */ - public VirtualMachineInstanceViewInner withStatuses(List statuses) { + public VirtualMachineInstanceViewInner withStatuses(List statuses) { this.statuses = statuses; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineRunCommandsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineRunCommandsInner.java index c894387fd06..c4f988300f5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineRunCommandsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineRunCommandsInner.java @@ -162,7 +162,7 @@ public Observable>> listSingle if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -246,7 +246,7 @@ public Observable> getWithServiceRespon if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(location, commandId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionsInner.java index c6227de9e0d..40700ffa935 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionsInner.java @@ -168,7 +168,7 @@ public Observable> createO throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -250,7 +250,7 @@ public Observable> beginCr throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -282,10 +282,9 @@ private ServiceResponse beginCreateOrUpdat * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner delete(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).toBlocking().last().body(); + public void delete(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).toBlocking().last().body(); } /** @@ -298,7 +297,7 @@ public OperationStatusResponseInner delete(String resourceGroupName, String vmSc * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName), serviceCallback); } @@ -311,10 +310,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -329,7 +328,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -342,9 +341,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -356,10 +355,9 @@ public Observable> deleteWithServi * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).toBlocking().single().body(); } /** @@ -372,7 +370,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName), serviceCallback); } @@ -383,12 +381,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param vmScaleSetName The name of the VM scale set where the extension should be deleted. * @param vmssExtensionName The name of the VM scale set extension. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -401,9 +399,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -416,13 +414,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -431,9 +429,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -509,7 +507,7 @@ public Observable> getWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.get(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -598,7 +596,7 @@ public Observable> getWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -719,7 +717,7 @@ public Observable>> l if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInstanceViewInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInstanceViewInner.java index b7c0f55da1d..2fda853b700 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInstanceViewInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInstanceViewInner.java @@ -11,7 +11,6 @@ import com.microsoft.azure.management.compute.VirtualMachineScaleSetInstanceViewStatusesSummary; import java.util.List; import com.microsoft.azure.management.compute.VirtualMachineScaleSetVMExtensionsSummary; -import com.microsoft.azure.management.compute.InstanceViewStatus; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -34,7 +33,7 @@ public class VirtualMachineScaleSetInstanceViewInner { * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** * Get the virtualMachine value. @@ -59,7 +58,7 @@ public List extensions() { * * @return the statuses value */ - public List statuses() { + public List statuses() { return this.statuses; } @@ -69,7 +68,7 @@ public List statuses() { * @param statuses the statuses value to set * @return the VirtualMachineScaleSetInstanceViewInner object itself. */ - public VirtualMachineScaleSetInstanceViewInner withStatuses(List statuses) { + public VirtualMachineScaleSetInstanceViewInner withStatuses(List statuses) { this.statuses = statuses; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetRollingUpgradesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetRollingUpgradesInner.java index 29bc0ff7187..67bfade10d4 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetRollingUpgradesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetRollingUpgradesInner.java @@ -82,10 +82,9 @@ interface VirtualMachineScaleSetRollingUpgradesService { * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner cancel(String resourceGroupName, String vmScaleSetName) { - return cancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void cancel(String resourceGroupName, String vmScaleSetName) { + cancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -97,7 +96,7 @@ public OperationStatusResponseInner cancel(String resourceGroupName, String vmSc * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture cancelAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture cancelAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -109,10 +108,10 @@ public ServiceFuture cancelAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable cancelAsync(String resourceGroupName, String vmScaleSetName) { - return cancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable cancelAsync(String resourceGroupName, String vmScaleSetName) { + return cancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -126,7 +125,7 @@ public OperationStatusResponseInner call(ServiceResponse> cancelWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> cancelWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -136,9 +135,9 @@ public Observable> cancelWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.cancel(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -149,10 +148,9 @@ public Observable> cancelWithServi * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginCancel(String resourceGroupName, String vmScaleSetName) { - return beginCancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginCancel(String resourceGroupName, String vmScaleSetName) { + beginCancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -164,7 +162,7 @@ public OperationStatusResponseInner beginCancel(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginCancelAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginCancelAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginCancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -174,12 +172,12 @@ public ServiceFuture beginCancelAsync(String resou * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginCancelAsync(String resourceGroupName, String vmScaleSetName) { - return beginCancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginCancelAsync(String resourceGroupName, String vmScaleSetName) { + return beginCancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -191,9 +189,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginCancelWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginCancelWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -203,13 +201,13 @@ public Observable> beginCancelWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCancel(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginCancelDelegate(response); + ServiceResponse clientResponse = beginCancelDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -218,9 +216,9 @@ public Observable> call(Response beginCancelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginCancelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -234,10 +232,9 @@ private ServiceResponse beginCancelDelegate(Respon * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner startOSUpgrade(String resourceGroupName, String vmScaleSetName) { - return startOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void startOSUpgrade(String resourceGroupName, String vmScaleSetName) { + startOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -249,7 +246,7 @@ public OperationStatusResponseInner startOSUpgrade(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture startOSUpgradeAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture startOSUpgradeAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(startOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -261,10 +258,10 @@ public ServiceFuture startOSUpgradeAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable startOSUpgradeAsync(String resourceGroupName, String vmScaleSetName) { - return startOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable startOSUpgradeAsync(String resourceGroupName, String vmScaleSetName) { + return startOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -278,7 +275,7 @@ public OperationStatusResponseInner call(ServiceResponse> startOSUpgradeWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> startOSUpgradeWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -288,9 +285,9 @@ public Observable> startOSUpgradeW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.startOSUpgrade(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -301,10 +298,9 @@ public Observable> startOSUpgradeW * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginStartOSUpgrade(String resourceGroupName, String vmScaleSetName) { - return beginStartOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginStartOSUpgrade(String resourceGroupName, String vmScaleSetName) { + beginStartOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -316,7 +312,7 @@ public OperationStatusResponseInner beginStartOSUpgrade(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginStartOSUpgradeAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginStartOSUpgradeAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginStartOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -326,12 +322,12 @@ public ServiceFuture beginStartOSUpgradeAsync(Stri * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginStartOSUpgradeAsync(String resourceGroupName, String vmScaleSetName) { - return beginStartOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginStartOSUpgradeAsync(String resourceGroupName, String vmScaleSetName) { + return beginStartOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -343,9 +339,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginStartOSUpgradeWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginStartOSUpgradeWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -355,13 +351,13 @@ public Observable> beginStartOSUpg if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginStartOSUpgrade(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginStartOSUpgradeDelegate(response); + ServiceResponse clientResponse = beginStartOSUpgradeDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -370,9 +366,9 @@ public Observable> call(Response beginStartOSUpgradeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginStartOSUpgradeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -440,7 +436,7 @@ public Observable> getLatestWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getLatest(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java index d7e523a6abb..d0dfa38a43f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java @@ -15,7 +15,6 @@ import com.microsoft.azure.management.compute.VirtualMachineExtensionInstanceView; import com.microsoft.azure.management.compute.VirtualMachineHealthStatus; import com.microsoft.azure.management.compute.BootDiagnosticsInstanceView; -import com.microsoft.azure.management.compute.InstanceViewStatus; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -85,7 +84,7 @@ public class VirtualMachineScaleSetVMInstanceViewInner { * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** * The placement group in which the VM is running. If the VM is deallocated @@ -268,7 +267,7 @@ public VirtualMachineScaleSetVMInstanceViewInner withBootDiagnostics(BootDiagnos * * @return the statuses value */ - public List statuses() { + public List statuses() { return this.statuses; } @@ -278,7 +277,7 @@ public List statuses() { * @param statuses the statuses value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. */ - public VirtualMachineScaleSetVMInstanceViewInner withStatuses(List statuses) { + public VirtualMachineScaleSetVMInstanceViewInner withStatuses(List statuses) { this.statuses = statuses; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java index b7c3251ed48..f41c093ce1b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java @@ -169,10 +169,9 @@ interface VirtualMachineScaleSetVMsService { * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimage(String resourceGroupName, String vmScaleSetName, String instanceId) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void reimage(String resourceGroupName, String vmScaleSetName, String instanceId) { + reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -185,7 +184,7 @@ public OperationStatusResponseInner reimage(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -198,10 +197,10 @@ public ServiceFuture reimageAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable reimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -216,7 +215,7 @@ public OperationStatusResponseInner call(ServiceResponse> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -229,9 +228,9 @@ public Observable> reimageWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.reimage(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -243,10 +242,9 @@ public Observable> reimageWithServ * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginReimage(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginReimage(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -259,7 +257,7 @@ public OperationStatusResponseInner beginReimage(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -270,12 +268,12 @@ public ServiceFuture beginReimageAsync(String reso * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -288,9 +286,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -303,13 +301,13 @@ public Observable> beginReimageWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginReimage(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageDelegate(response); + ServiceResponse clientResponse = beginReimageDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -318,9 +316,9 @@ public Observable> call(Response beginReimageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginReimageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -335,10 +333,9 @@ private ServiceResponse beginReimageDelegate(Respo * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimageAll(String resourceGroupName, String vmScaleSetName, String instanceId) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void reimageAll(String resourceGroupName, String vmScaleSetName, String instanceId) { + reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -351,7 +348,7 @@ public OperationStatusResponseInner reimageAll(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -364,10 +361,10 @@ public ServiceFuture reimageAllAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -382,7 +379,7 @@ public OperationStatusResponseInner call(ServiceResponse> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -395,9 +392,9 @@ public Observable> reimageAllWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.reimageAll(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -409,10 +406,9 @@ public Observable> reimageAllWithS * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginReimageAll(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginReimageAll(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -425,7 +421,7 @@ public OperationStatusResponseInner beginReimageAll(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -436,12 +432,12 @@ public ServiceFuture beginReimageAllAsync(String r * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -454,9 +450,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -469,13 +465,13 @@ public Observable> beginReimageAll if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginReimageAll(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageAllDelegate(response); + ServiceResponse clientResponse = beginReimageAllDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -484,9 +480,9 @@ public Observable> call(Response beginReimageAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginReimageAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -501,10 +497,9 @@ private ServiceResponse beginReimageAllDelegate(Re * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner deallocate(String resourceGroupName, String vmScaleSetName, String instanceId) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void deallocate(String resourceGroupName, String vmScaleSetName, String instanceId) { + deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -517,7 +512,7 @@ public OperationStatusResponseInner deallocate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -530,10 +525,10 @@ public ServiceFuture deallocateAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -548,7 +543,7 @@ public OperationStatusResponseInner call(ServiceResponse> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -561,9 +556,9 @@ public Observable> deallocateWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.deallocate(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -575,10 +570,9 @@ public Observable> deallocateWithS * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDeallocate(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginDeallocate(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -591,7 +585,7 @@ public OperationStatusResponseInner beginDeallocate(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -602,12 +596,12 @@ public ServiceFuture beginDeallocateAsync(String r * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -620,9 +614,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -635,13 +629,13 @@ public Observable> beginDeallocate if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDeallocate(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeallocateDelegate(response); + ServiceResponse clientResponse = beginDeallocateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -650,9 +644,9 @@ public Observable> call(Response beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -735,7 +729,7 @@ public Observable> updateWithServ throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -817,7 +811,7 @@ public Observable> beginUpdateWit throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -849,10 +843,9 @@ private ServiceResponse beginUpdateDelegate(Respo * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner delete(String resourceGroupName, String vmScaleSetName, String instanceId) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void delete(String resourceGroupName, String vmScaleSetName, String instanceId) { + deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -865,7 +858,7 @@ public OperationStatusResponseInner delete(String resourceGroupName, String vmSc * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -878,10 +871,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -896,7 +889,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -909,9 +902,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -923,10 +916,9 @@ public Observable> deleteWithServi * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -939,7 +931,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -950,12 +942,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -968,9 +960,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -983,13 +975,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -998,9 +990,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1076,7 +1068,7 @@ public Observable> getWithService if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1167,7 +1159,7 @@ public Observable> ge if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getInstanceView(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1288,7 +1280,7 @@ public Observable>> listSing if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String filter = null; final String select = null; final String expand = null; @@ -1420,7 +1412,7 @@ public Observable>> listSing if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, virtualMachineScaleSetName, this.client.subscriptionId(), filter, select, expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1451,10 +1443,9 @@ private ServiceResponse> listDelegate(R * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner powerOff(String resourceGroupName, String vmScaleSetName, String instanceId) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void powerOff(String resourceGroupName, String vmScaleSetName, String instanceId) { + powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -1467,7 +1458,7 @@ public OperationStatusResponseInner powerOff(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1480,10 +1471,10 @@ public ServiceFuture powerOffAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1498,7 +1489,7 @@ public OperationStatusResponseInner call(ServiceResponse> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1511,9 +1502,9 @@ public Observable> powerOffWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.powerOff(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1525,10 +1516,9 @@ public Observable> powerOffWithSer * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginPowerOff(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginPowerOff(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -1541,7 +1531,7 @@ public OperationStatusResponseInner beginPowerOff(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1552,12 +1542,12 @@ public ServiceFuture beginPowerOffAsync(String res * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1570,9 +1560,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1585,13 +1575,13 @@ public Observable> beginPowerOffWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginPowerOff(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPowerOffDelegate(response); + ServiceResponse clientResponse = beginPowerOffDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1600,9 +1590,9 @@ public Observable> call(Response beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1617,10 +1607,9 @@ private ServiceResponse beginPowerOffDelegate(Resp * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner restart(String resourceGroupName, String vmScaleSetName, String instanceId) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void restart(String resourceGroupName, String vmScaleSetName, String instanceId) { + restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -1633,7 +1622,7 @@ public OperationStatusResponseInner restart(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1646,10 +1635,10 @@ public ServiceFuture restartAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable restartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable restartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1664,7 +1653,7 @@ public OperationStatusResponseInner call(ServiceResponse> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1677,9 +1666,9 @@ public Observable> restartWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.restart(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1691,10 +1680,9 @@ public Observable> restartWithServ * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRestart(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginRestart(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -1707,7 +1695,7 @@ public OperationStatusResponseInner beginRestart(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1718,12 +1706,12 @@ public ServiceFuture beginRestartAsync(String reso * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1736,9 +1724,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1751,13 +1739,13 @@ public Observable> beginRestartWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginRestart(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRestartDelegate(response); + ServiceResponse clientResponse = beginRestartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1766,9 +1754,9 @@ public Observable> call(Response beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1783,10 +1771,9 @@ private ServiceResponse beginRestartDelegate(Respo * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner start(String resourceGroupName, String vmScaleSetName, String instanceId) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void start(String resourceGroupName, String vmScaleSetName, String instanceId) { + startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -1799,7 +1786,7 @@ public OperationStatusResponseInner start(String resourceGroupName, String vmSca * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1812,10 +1799,10 @@ public ServiceFuture startAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable startAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable startAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1830,7 +1817,7 @@ public OperationStatusResponseInner call(ServiceResponse> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1843,9 +1830,9 @@ public Observable> startWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.start(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1857,10 +1844,9 @@ public Observable> startWithServic * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginStart(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginStart(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -1873,7 +1859,7 @@ public OperationStatusResponseInner beginStart(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1884,12 +1870,12 @@ public ServiceFuture beginStartAsync(String resour * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1902,9 +1888,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1917,13 +1903,13 @@ public Observable> beginStartWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginStart(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginStartDelegate(response); + ServiceResponse clientResponse = beginStartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1932,9 +1918,9 @@ public Observable> call(Response beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1949,10 +1935,9 @@ private ServiceResponse beginStartDelegate(Respons * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner redeploy(String resourceGroupName, String vmScaleSetName, String instanceId) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void redeploy(String resourceGroupName, String vmScaleSetName, String instanceId) { + redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -1965,7 +1950,7 @@ public OperationStatusResponseInner redeploy(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1978,10 +1963,10 @@ public ServiceFuture redeployAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1996,7 +1981,7 @@ public OperationStatusResponseInner call(ServiceResponse> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2009,9 +1994,9 @@ public Observable> redeployWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2023,10 +2008,9 @@ public Observable> redeployWithSer * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRedeploy(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginRedeploy(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -2039,7 +2023,7 @@ public OperationStatusResponseInner beginRedeploy(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -2050,12 +2034,12 @@ public ServiceFuture beginRedeployAsync(String res * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2068,9 +2052,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2083,13 +2067,13 @@ public Observable> beginRedeployWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginRedeploy(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRedeployDelegate(response); + ServiceResponse clientResponse = beginRedeployDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2098,9 +2082,9 @@ public Observable> call(Response beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2115,10 +2099,9 @@ private ServiceResponse beginRedeployDelegate(Resp * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void performMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId) { + performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -2131,7 +2114,7 @@ public OperationStatusResponseInner performMaintenance(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -2144,10 +2127,10 @@ public ServiceFuture performMaintenanceAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2162,7 +2145,7 @@ public OperationStatusResponseInner call(ServiceResponse> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2175,9 +2158,9 @@ public Observable> performMaintena if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2189,10 +2172,9 @@ public Observable> performMaintena * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -2205,7 +2187,7 @@ public OperationStatusResponseInner beginPerformMaintenance(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -2216,12 +2198,12 @@ public ServiceFuture beginPerformMaintenanceAsync( * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2234,9 +2216,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2249,13 +2231,13 @@ public Observable> beginPerformMai if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2264,9 +2246,9 @@ public Observable> call(Response beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java index 9a9f8d9d3d4..653343e722c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java @@ -47,7 +47,7 @@ * An instance of this class provides access to all the operations defined * in VirtualMachineScaleSets. */ -public class VirtualMachineScaleSetsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class VirtualMachineScaleSetsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private VirtualMachineScaleSetsService service; /** The service client containing this operation class. */ @@ -289,7 +289,7 @@ public Observable> createOrUpdateWi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -364,7 +364,7 @@ public Observable> beginCreateOrUpd throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -457,7 +457,7 @@ public Observable> updateWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -532,7 +532,7 @@ public Observable> beginUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -562,10 +562,9 @@ private ServiceResponse beginUpdateDelegate(Respons * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner delete(String resourceGroupName, String vmScaleSetName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void delete(String resourceGroupName, String vmScaleSetName) { + deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -577,7 +576,7 @@ public OperationStatusResponseInner delete(String resourceGroupName, String vmSc * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -589,10 +588,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String vmScaleSetName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String vmScaleSetName) { + return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -606,7 +605,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -616,9 +615,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -629,10 +628,9 @@ public Observable> deleteWithServi * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String vmScaleSetName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String vmScaleSetName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -644,7 +642,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -654,12 +652,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -671,9 +669,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -683,13 +681,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -698,9 +696,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -769,7 +767,7 @@ public Observable> getByResourceGro if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -799,10 +797,9 @@ private ServiceResponse getByResourceGroupDelegate( * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner deallocate(String resourceGroupName, String vmScaleSetName) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void deallocate(String resourceGroupName, String vmScaleSetName) { + deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -814,7 +811,7 @@ public OperationStatusResponseInner deallocate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -826,10 +823,10 @@ public ServiceFuture deallocateAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName) { + return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -843,7 +840,7 @@ public OperationStatusResponseInner call(ServiceResponse> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -853,12 +850,12 @@ public Observable> deallocateWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.deallocate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates. @@ -869,10 +866,9 @@ public Observable> deallocateWithS * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner deallocate(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void deallocate(String resourceGroupName, String vmScaleSetName, List instanceIds) { + deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -885,7 +881,7 @@ public OperationStatusResponseInner deallocate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -898,10 +894,10 @@ public ServiceFuture deallocateAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -916,7 +912,7 @@ public OperationStatusResponseInner call(ServiceResponse> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -927,14 +923,14 @@ public Observable> deallocateWithS throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.deallocate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -945,10 +941,9 @@ public Observable> deallocateWithS * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDeallocate(String resourceGroupName, String vmScaleSetName) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginDeallocate(String resourceGroupName, String vmScaleSetName) { + beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -960,7 +955,7 @@ public OperationStatusResponseInner beginDeallocate(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -970,12 +965,12 @@ public ServiceFuture beginDeallocateAsync(String r * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName) { + return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -987,9 +982,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -999,16 +994,16 @@ public Observable> beginDeallocate if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginDeallocate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeallocateDelegate(response); + ServiceResponse clientResponse = beginDeallocateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1026,10 +1021,9 @@ public Observable> call(Response instanceIds) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginDeallocate(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -1042,7 +1036,7 @@ public OperationStatusResponseInner beginDeallocate(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -1053,12 +1047,12 @@ public ServiceFuture beginDeallocateAsync(String r * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1071,9 +1065,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1084,18 +1078,18 @@ public Observable> beginDeallocate throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginDeallocate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeallocateDelegate(response); + ServiceResponse clientResponse = beginDeallocateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1104,9 +1098,9 @@ public Observable> call(Response beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1121,10 +1115,9 @@ private ServiceResponse beginDeallocateDelegate(Re * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner deleteInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void deleteInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { + deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -1137,7 +1130,7 @@ public OperationStatusResponseInner deleteInstances(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -1150,10 +1143,10 @@ public ServiceFuture deleteInstancesAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1168,7 +1161,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> deleteInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1182,11 +1175,11 @@ public Observable> deleteInstances throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); Observable> observable = service.deleteInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1198,10 +1191,9 @@ public Observable> deleteInstances * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDeleteInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginDeleteInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -1214,7 +1206,7 @@ public OperationStatusResponseInner beginDeleteInstances(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -1225,12 +1217,12 @@ public ServiceFuture beginDeleteInstancesAsync(Str * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1243,9 +1235,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginDeleteInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1259,15 +1251,15 @@ public Observable> beginDeleteInst throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); return service.beginDeleteInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteInstancesDelegate(response); + ServiceResponse clientResponse = beginDeleteInstancesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1276,9 +1268,9 @@ public Observable> call(Response beginDeleteInstancesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteInstancesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1346,7 +1338,7 @@ public Observable> getI if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getInstanceView(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1459,7 +1451,7 @@ public Observable>> listByReso if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1564,7 +1556,7 @@ public Observable>> listSingle if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1685,7 +1677,7 @@ public Observable>> listSku if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listSkus(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1806,7 +1798,7 @@ public Observable, Observable>>>() { @Override @@ -1836,10 +1828,9 @@ private ServiceResponse> ge * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner powerOff(String resourceGroupName, String vmScaleSetName) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void powerOff(String resourceGroupName, String vmScaleSetName) { + powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -1851,7 +1842,7 @@ public OperationStatusResponseInner powerOff(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -1863,10 +1854,10 @@ public ServiceFuture powerOffAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName) { + return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1880,7 +1871,7 @@ public OperationStatusResponseInner call(ServiceResponse> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1890,12 +1881,12 @@ public Observable> powerOffWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.powerOff(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. @@ -1906,10 +1897,9 @@ public Observable> powerOffWithSer * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner powerOff(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void powerOff(String resourceGroupName, String vmScaleSetName, List instanceIds) { + powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -1922,7 +1912,7 @@ public OperationStatusResponseInner powerOff(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -1935,10 +1925,10 @@ public ServiceFuture powerOffAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1953,7 +1943,7 @@ public OperationStatusResponseInner call(ServiceResponse> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1964,14 +1954,14 @@ public Observable> powerOffWithSer throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.powerOff(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1982,10 +1972,9 @@ public Observable> powerOffWithSer * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginPowerOff(String resourceGroupName, String vmScaleSetName) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginPowerOff(String resourceGroupName, String vmScaleSetName) { + beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -1997,7 +1986,7 @@ public OperationStatusResponseInner beginPowerOff(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2007,12 +1996,12 @@ public ServiceFuture beginPowerOffAsync(String res * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName) { + return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2024,9 +2013,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2036,16 +2025,16 @@ public Observable> beginPowerOffWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginPowerOff(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPowerOffDelegate(response); + ServiceResponse clientResponse = beginPowerOffDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2063,10 +2052,9 @@ public Observable> call(Response instanceIds) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginPowerOff(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -2079,7 +2067,7 @@ public OperationStatusResponseInner beginPowerOff(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -2090,12 +2078,12 @@ public ServiceFuture beginPowerOffAsync(String res * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2108,9 +2096,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2121,18 +2109,18 @@ public Observable> beginPowerOffWi throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginPowerOff(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPowerOffDelegate(response); + ServiceResponse clientResponse = beginPowerOffDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2141,9 +2129,9 @@ public Observable> call(Response beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2157,10 +2145,9 @@ private ServiceResponse beginPowerOffDelegate(Resp * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner restart(String resourceGroupName, String vmScaleSetName) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void restart(String resourceGroupName, String vmScaleSetName) { + restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -2172,7 +2159,7 @@ public OperationStatusResponseInner restart(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2184,10 +2171,10 @@ public ServiceFuture restartAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable restartAsync(String resourceGroupName, String vmScaleSetName) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable restartAsync(String resourceGroupName, String vmScaleSetName) { + return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2201,7 +2188,7 @@ public OperationStatusResponseInner call(ServiceResponse> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2211,12 +2198,12 @@ public Observable> restartWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.restart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Restarts one or more virtual machines in a VM scale set. @@ -2227,10 +2214,9 @@ public Observable> restartWithServ * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner restart(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void restart(String resourceGroupName, String vmScaleSetName, List instanceIds) { + restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -2243,7 +2229,7 @@ public OperationStatusResponseInner restart(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -2256,10 +2242,10 @@ public ServiceFuture restartAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable restartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable restartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2274,7 +2260,7 @@ public OperationStatusResponseInner call(ServiceResponse> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2285,14 +2271,14 @@ public Observable> restartWithServ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.restart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2303,10 +2289,9 @@ public Observable> restartWithServ * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRestart(String resourceGroupName, String vmScaleSetName) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginRestart(String resourceGroupName, String vmScaleSetName) { + beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -2318,7 +2303,7 @@ public OperationStatusResponseInner beginRestart(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2328,12 +2313,12 @@ public ServiceFuture beginRestartAsync(String reso * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName) { + return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2345,9 +2330,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2357,16 +2342,16 @@ public Observable> beginRestartWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginRestart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRestartDelegate(response); + ServiceResponse clientResponse = beginRestartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2384,10 +2369,9 @@ public Observable> call(Response instanceIds) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginRestart(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -2400,7 +2384,7 @@ public OperationStatusResponseInner beginRestart(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -2411,12 +2395,12 @@ public ServiceFuture beginRestartAsync(String reso * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2429,9 +2413,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2442,18 +2426,18 @@ public Observable> beginRestartWit throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginRestart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRestartDelegate(response); + ServiceResponse clientResponse = beginRestartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2462,9 +2446,9 @@ public Observable> call(Response beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2478,10 +2462,9 @@ private ServiceResponse beginRestartDelegate(Respo * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner start(String resourceGroupName, String vmScaleSetName) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void start(String resourceGroupName, String vmScaleSetName) { + startWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -2493,7 +2476,7 @@ public OperationStatusResponseInner start(String resourceGroupName, String vmSca * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2505,10 +2488,10 @@ public ServiceFuture startAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable startAsync(String resourceGroupName, String vmScaleSetName) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable startAsync(String resourceGroupName, String vmScaleSetName) { + return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2522,7 +2505,7 @@ public OperationStatusResponseInner call(ServiceResponse> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2532,12 +2515,12 @@ public Observable> startWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.start(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Starts one or more virtual machines in a VM scale set. @@ -2548,10 +2531,9 @@ public Observable> startWithServic * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner start(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void start(String resourceGroupName, String vmScaleSetName, List instanceIds) { + startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -2564,7 +2546,7 @@ public OperationStatusResponseInner start(String resourceGroupName, String vmSca * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -2577,10 +2559,10 @@ public ServiceFuture startAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable startAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable startAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2595,7 +2577,7 @@ public OperationStatusResponseInner call(ServiceResponse> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2606,14 +2588,14 @@ public Observable> startWithServic throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.start(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2624,10 +2606,9 @@ public Observable> startWithServic * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginStart(String resourceGroupName, String vmScaleSetName) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginStart(String resourceGroupName, String vmScaleSetName) { + beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -2639,7 +2620,7 @@ public OperationStatusResponseInner beginStart(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2649,12 +2630,12 @@ public ServiceFuture beginStartAsync(String resour * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName) { + return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2666,9 +2647,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2678,16 +2659,16 @@ public Observable> beginStartWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginStart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginStartDelegate(response); + ServiceResponse clientResponse = beginStartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2705,10 +2686,9 @@ public Observable> call(Response instanceIds) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginStart(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -2721,7 +2701,7 @@ public OperationStatusResponseInner beginStart(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -2732,12 +2712,12 @@ public ServiceFuture beginStartAsync(String resour * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2750,9 +2730,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2763,18 +2743,18 @@ public Observable> beginStartWithS throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginStart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginStartDelegate(response); + ServiceResponse clientResponse = beginStartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2783,9 +2763,9 @@ public Observable> call(Response beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2799,10 +2779,9 @@ private ServiceResponse beginStartDelegate(Respons * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner redeploy(String resourceGroupName, String vmScaleSetName) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void redeploy(String resourceGroupName, String vmScaleSetName) { + redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -2814,7 +2793,7 @@ public OperationStatusResponseInner redeploy(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2826,10 +2805,10 @@ public ServiceFuture redeployAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable redeployAsync(String resourceGroupName, String vmScaleSetName) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable redeployAsync(String resourceGroupName, String vmScaleSetName) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2843,7 +2822,7 @@ public OperationStatusResponseInner call(ServiceResponse> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2853,12 +2832,12 @@ public Observable> redeployWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Redeploy one or more virtual machines in a VM scale set. @@ -2869,10 +2848,9 @@ public Observable> redeployWithSer * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner redeploy(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void redeploy(String resourceGroupName, String vmScaleSetName, List instanceIds) { + redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -2885,7 +2863,7 @@ public OperationStatusResponseInner redeploy(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -2898,10 +2876,10 @@ public ServiceFuture redeployAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2916,7 +2894,7 @@ public OperationStatusResponseInner call(ServiceResponse> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2927,14 +2905,14 @@ public Observable> redeployWithSer throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2945,10 +2923,9 @@ public Observable> redeployWithSer * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRedeploy(String resourceGroupName, String vmScaleSetName) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginRedeploy(String resourceGroupName, String vmScaleSetName) { + beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -2960,7 +2937,7 @@ public OperationStatusResponseInner beginRedeploy(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2970,12 +2947,12 @@ public ServiceFuture beginRedeployAsync(String res * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2987,9 +2964,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2999,16 +2976,16 @@ public Observable> beginRedeployWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginRedeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRedeployDelegate(response); + ServiceResponse clientResponse = beginRedeployDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3026,10 +3003,9 @@ public Observable> call(Response instanceIds) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginRedeploy(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -3042,7 +3018,7 @@ public OperationStatusResponseInner beginRedeploy(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -3053,12 +3029,12 @@ public ServiceFuture beginRedeployAsync(String res * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3071,9 +3047,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3084,18 +3060,18 @@ public Observable> beginRedeployWi throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginRedeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRedeployDelegate(response); + ServiceResponse clientResponse = beginRedeployDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3104,9 +3080,9 @@ public Observable> call(Response beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3120,10 +3096,9 @@ private ServiceResponse beginRedeployDelegate(Resp * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmScaleSetName) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void performMaintenance(String resourceGroupName, String vmScaleSetName) { + performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -3135,7 +3110,7 @@ public OperationStatusResponseInner performMaintenance(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -3147,10 +3122,10 @@ public ServiceFuture performMaintenanceAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3164,7 +3139,7 @@ public OperationStatusResponseInner call(ServiceResponse> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3174,12 +3149,12 @@ public Observable> performMaintena if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Perform maintenance on one or more virtual machines in a VM scale set. @@ -3190,10 +3165,9 @@ public Observable> performMaintena * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void performMaintenance(String resourceGroupName, String vmScaleSetName, List instanceIds) { + performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -3206,7 +3180,7 @@ public OperationStatusResponseInner performMaintenance(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -3219,10 +3193,10 @@ public ServiceFuture performMaintenanceAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3237,7 +3211,7 @@ public OperationStatusResponseInner call(ServiceResponse> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3248,14 +3222,14 @@ public Observable> performMaintena throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -3266,10 +3240,9 @@ public Observable> performMaintena * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmScaleSetName) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginPerformMaintenance(String resourceGroupName, String vmScaleSetName) { + beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -3281,7 +3254,7 @@ public OperationStatusResponseInner beginPerformMaintenance(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -3291,12 +3264,12 @@ public ServiceFuture beginPerformMaintenanceAsync( * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3308,9 +3281,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3320,16 +3293,16 @@ public Observable> beginPerformMai if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3347,10 +3320,9 @@ public Observable> call(Response instanceIds) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -3363,7 +3335,7 @@ public OperationStatusResponseInner beginPerformMaintenance(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -3374,12 +3346,12 @@ public ServiceFuture beginPerformMaintenanceAsync( * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3392,9 +3364,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3405,18 +3377,18 @@ public Observable> beginPerformMai throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3425,9 +3397,9 @@ public Observable> call(Response beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3442,10 +3414,9 @@ private ServiceResponse beginPerformMaintenanceDel * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner updateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void updateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { + updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -3458,7 +3429,7 @@ public OperationStatusResponseInner updateInstances(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -3471,10 +3442,10 @@ public ServiceFuture updateInstancesAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3489,7 +3460,7 @@ public OperationStatusResponseInner call(ServiceResponse> updateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> updateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3503,11 +3474,11 @@ public Observable> updateInstances throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); Observable> observable = service.updateInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -3519,10 +3490,9 @@ public Observable> updateInstances * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginUpdateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginUpdateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -3535,7 +3505,7 @@ public OperationStatusResponseInner beginUpdateInstances(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -3546,12 +3516,12 @@ public ServiceFuture beginUpdateInstancesAsync(Str * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3564,9 +3534,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginUpdateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginUpdateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3580,15 +3550,15 @@ public Observable> beginUpdateInst throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); return service.beginUpdateInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginUpdateInstancesDelegate(response); + ServiceResponse clientResponse = beginUpdateInstancesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3597,9 +3567,9 @@ public Observable> call(Response beginUpdateInstancesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginUpdateInstancesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3613,10 +3583,9 @@ private ServiceResponse beginUpdateInstancesDelega * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimage(String resourceGroupName, String vmScaleSetName) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void reimage(String resourceGroupName, String vmScaleSetName) { + reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -3628,7 +3597,7 @@ public OperationStatusResponseInner reimage(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -3640,10 +3609,10 @@ public ServiceFuture reimageAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAsync(String resourceGroupName, String vmScaleSetName) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable reimageAsync(String resourceGroupName, String vmScaleSetName) { + return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3657,7 +3626,7 @@ public OperationStatusResponseInner call(ServiceResponse> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3667,12 +3636,12 @@ public Observable> reimageWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.reimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. @@ -3683,10 +3652,9 @@ public Observable> reimageWithServ * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimage(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void reimage(String resourceGroupName, String vmScaleSetName, List instanceIds) { + reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -3699,7 +3667,7 @@ public OperationStatusResponseInner reimage(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -3712,10 +3680,10 @@ public ServiceFuture reimageAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable reimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3730,7 +3698,7 @@ public OperationStatusResponseInner call(ServiceResponse> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3741,14 +3709,14 @@ public Observable> reimageWithServ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.reimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -3759,10 +3727,9 @@ public Observable> reimageWithServ * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginReimage(String resourceGroupName, String vmScaleSetName) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginReimage(String resourceGroupName, String vmScaleSetName) { + beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -3774,7 +3741,7 @@ public OperationStatusResponseInner beginReimage(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -3784,12 +3751,12 @@ public ServiceFuture beginReimageAsync(String reso * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName) { + return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3801,9 +3768,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3813,16 +3780,16 @@ public Observable> beginReimageWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginReimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageDelegate(response); + ServiceResponse clientResponse = beginReimageDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3840,10 +3807,9 @@ public Observable> call(Response instanceIds) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginReimage(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -3856,7 +3822,7 @@ public OperationStatusResponseInner beginReimage(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -3867,12 +3833,12 @@ public ServiceFuture beginReimageAsync(String reso * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3885,9 +3851,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3898,18 +3864,18 @@ public Observable> beginReimageWit throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginReimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageDelegate(response); + ServiceResponse clientResponse = beginReimageDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3918,9 +3884,9 @@ public Observable> call(Response beginReimageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginReimageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3934,10 +3900,9 @@ private ServiceResponse beginReimageDelegate(Respo * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimageAll(String resourceGroupName, String vmScaleSetName) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void reimageAll(String resourceGroupName, String vmScaleSetName) { + reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -3949,7 +3914,7 @@ public OperationStatusResponseInner reimageAll(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -3961,10 +3926,10 @@ public ServiceFuture reimageAllAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName) { + return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3978,7 +3943,7 @@ public OperationStatusResponseInner call(ServiceResponse> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3988,12 +3953,12 @@ public Observable> reimageAllWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.reimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. @@ -4004,10 +3969,9 @@ public Observable> reimageAllWithS * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimageAll(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void reimageAll(String resourceGroupName, String vmScaleSetName, List instanceIds) { + reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -4020,7 +3984,7 @@ public OperationStatusResponseInner reimageAll(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -4033,10 +3997,10 @@ public ServiceFuture reimageAllAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -4051,7 +4015,7 @@ public OperationStatusResponseInner call(ServiceResponse> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -4062,14 +4026,14 @@ public Observable> reimageAllWithS throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.reimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -4080,10 +4044,9 @@ public Observable> reimageAllWithS * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginReimageAll(String resourceGroupName, String vmScaleSetName) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginReimageAll(String resourceGroupName, String vmScaleSetName) { + beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -4095,7 +4058,7 @@ public OperationStatusResponseInner beginReimageAll(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -4105,12 +4068,12 @@ public ServiceFuture beginReimageAllAsync(String r * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName) { + return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -4122,9 +4085,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -4134,16 +4097,16 @@ public Observable> beginReimageAll if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginReimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageAllDelegate(response); + ServiceResponse clientResponse = beginReimageAllDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4161,10 +4124,9 @@ public Observable> call(Response instanceIds) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginReimageAll(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -4177,7 +4139,7 @@ public OperationStatusResponseInner beginReimageAll(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -4188,12 +4150,12 @@ public ServiceFuture beginReimageAllAsync(String r * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -4206,9 +4168,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -4219,18 +4181,18 @@ public Observable> beginReimageAll throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginReimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageAllDelegate(response); + ServiceResponse clientResponse = beginReimageAllDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4239,9 +4201,9 @@ public Observable> call(Response beginReimageAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginReimageAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4313,7 +4275,7 @@ public Observable> forceRecoveryServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, platformUpdateDomain, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java index 36b0d482561..679c4a43d73 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java @@ -113,7 +113,7 @@ public Observable>> listWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override 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 e8042270a7c..b69dadbbf91 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 @@ -48,7 +48,7 @@ * An instance of this class provides access to all the operations defined * in VirtualMachines. */ -public class VirtualMachinesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class VirtualMachinesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private VirtualMachinesService service; /** The service client containing this operation class. */ @@ -266,7 +266,7 @@ public Observable> getE if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + 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>>() { @@ -348,7 +348,7 @@ public Observable> getE if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + 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 @@ -440,7 +440,7 @@ public Observable> captureWith throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.capture(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -515,7 +515,7 @@ public Observable> beginCaptur throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCapture(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -608,7 +608,7 @@ public Observable> createOrUpdateWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -683,7 +683,7 @@ public Observable> beginCreateOrUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -776,7 +776,7 @@ public Observable> updateWithServiceRespons throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -851,7 +851,7 @@ public Observable> beginUpdateWithServiceRe throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -882,10 +882,9 @@ private ServiceResponse beginUpdateDelegate(Response deleteAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -909,10 +908,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String vmName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String vmName) { + return deleteWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -926,7 +925,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -936,9 +935,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -949,10 +948,9 @@ public Observable> deleteWithServi * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String vmName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String vmName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -964,7 +962,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -974,12 +972,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String vmName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String vmName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -991,9 +989,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1003,13 +1001,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1018,9 +1016,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1089,7 +1087,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final InstanceViewTypes expand = null; return service.getByResourceGroup(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -1171,7 +1169,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1255,7 +1253,7 @@ public Observable> instanceView if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.instanceView(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1285,10 +1283,9 @@ private ServiceResponse instanceViewDelegate(Re * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner convertToManagedDisks(String resourceGroupName, String vmName) { - return convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void convertToManagedDisks(String resourceGroupName, String vmName) { + convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -1300,7 +1297,7 @@ public OperationStatusResponseInner convertToManagedDisks(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture convertToManagedDisksAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture convertToManagedDisksAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1312,10 +1309,10 @@ public ServiceFuture convertToManagedDisksAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable convertToManagedDisksAsync(String resourceGroupName, String vmName) { - return convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable convertToManagedDisksAsync(String resourceGroupName, String vmName) { + return convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1329,7 +1326,7 @@ public OperationStatusResponseInner call(ServiceResponse> convertToManagedDisksWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> convertToManagedDisksWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1339,9 +1336,9 @@ public Observable> convertToManage if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.convertToManagedDisks(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1352,10 +1349,9 @@ public Observable> convertToManage * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginConvertToManagedDisks(String resourceGroupName, String vmName) { - return beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginConvertToManagedDisks(String resourceGroupName, String vmName) { + beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -1367,7 +1363,7 @@ public OperationStatusResponseInner beginConvertToManagedDisks(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginConvertToManagedDisksAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginConvertToManagedDisksAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1377,12 +1373,12 @@ public ServiceFuture beginConvertToManagedDisksAsy * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginConvertToManagedDisksAsync(String resourceGroupName, String vmName) { - return beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginConvertToManagedDisksAsync(String resourceGroupName, String vmName) { + return beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1394,9 +1390,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginConvertToManagedDisksWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginConvertToManagedDisksWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1406,13 +1402,13 @@ public Observable> beginConvertToM if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginConvertToManagedDisks(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginConvertToManagedDisksDelegate(response); + ServiceResponse clientResponse = beginConvertToManagedDisksDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1421,9 +1417,9 @@ public Observable> call(Response beginConvertToManagedDisksDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginConvertToManagedDisksDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1437,10 +1433,9 @@ private ServiceResponse beginConvertToManagedDisks * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner deallocate(String resourceGroupName, String vmName) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void deallocate(String resourceGroupName, String vmName) { + deallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -1452,7 +1447,7 @@ public OperationStatusResponseInner deallocate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deallocateAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture deallocateAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deallocateWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1464,10 +1459,10 @@ public ServiceFuture deallocateAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deallocateAsync(String resourceGroupName, String vmName) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable deallocateAsync(String resourceGroupName, String vmName) { + return deallocateWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1481,7 +1476,7 @@ public OperationStatusResponseInner call(ServiceResponse> deallocateWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> deallocateWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1491,9 +1486,9 @@ public Observable> deallocateWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.deallocate(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1504,10 +1499,9 @@ public Observable> deallocateWithS * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDeallocate(String resourceGroupName, String vmName) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginDeallocate(String resourceGroupName, String vmName) { + beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -1519,7 +1513,7 @@ public OperationStatusResponseInner beginDeallocate(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1529,12 +1523,12 @@ public ServiceFuture beginDeallocateAsync(String r * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeallocateAsync(String resourceGroupName, String vmName) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeallocateAsync(String resourceGroupName, String vmName) { + return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1546,9 +1540,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1558,13 +1552,13 @@ public Observable> beginDeallocate if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDeallocate(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeallocateDelegate(response); + ServiceResponse clientResponse = beginDeallocateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1573,9 +1567,9 @@ public Observable> call(Response beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1589,10 +1583,9 @@ private ServiceResponse beginDeallocateDelegate(Re * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner generalize(String resourceGroupName, String vmName) { - return generalizeWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void generalize(String resourceGroupName, String vmName) { + generalizeWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -1604,7 +1597,7 @@ public OperationStatusResponseInner generalize(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture generalizeAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture generalizeAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(generalizeWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1614,12 +1607,12 @@ public ServiceFuture generalizeAsync(String resour * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable generalizeAsync(String resourceGroupName, String vmName) { - return generalizeWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable generalizeAsync(String resourceGroupName, String vmName) { + return generalizeWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1631,9 +1624,9 @@ public OperationStatusResponseInner call(ServiceResponse> generalizeWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> generalizeWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1643,13 +1636,13 @@ public Observable> generalizeWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.generalize(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = generalizeDelegate(response); + ServiceResponse clientResponse = generalizeDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1658,9 +1651,9 @@ public Observable> call(Response generalizeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse generalizeDelegate(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); } @@ -1756,7 +1749,7 @@ public Observable>> listByResourceGrou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1861,7 +1854,7 @@ public Observable>> listSinglePageAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1945,7 +1938,7 @@ public Observable>> listAvailableS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listAvailableSizes(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1980,10 +1973,9 @@ private ServiceResponse> listAvailableSizesDel * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner powerOff(String resourceGroupName, String vmName) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void powerOff(String resourceGroupName, String vmName) { + powerOffWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -1995,7 +1987,7 @@ public OperationStatusResponseInner powerOff(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture powerOffAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture powerOffAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(powerOffWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2007,10 +1999,10 @@ public ServiceFuture powerOffAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable powerOffAsync(String resourceGroupName, String vmName) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable powerOffAsync(String resourceGroupName, String vmName) { + return powerOffWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2024,7 +2016,7 @@ public OperationStatusResponseInner call(ServiceResponse> powerOffWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> powerOffWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2034,9 +2026,9 @@ public Observable> powerOffWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.powerOff(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2047,10 +2039,9 @@ public Observable> powerOffWithSer * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginPowerOff(String resourceGroupName, String vmName) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginPowerOff(String resourceGroupName, String vmName) { + beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -2062,7 +2053,7 @@ public OperationStatusResponseInner beginPowerOff(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2072,12 +2063,12 @@ public ServiceFuture beginPowerOffAsync(String res * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPowerOffAsync(String resourceGroupName, String vmName) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPowerOffAsync(String resourceGroupName, String vmName) { + return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2089,9 +2080,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2101,13 +2092,13 @@ public Observable> beginPowerOffWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginPowerOff(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPowerOffDelegate(response); + ServiceResponse clientResponse = beginPowerOffDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2116,9 +2107,9 @@ public Observable> call(Response beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2132,10 +2123,9 @@ private ServiceResponse beginPowerOffDelegate(Resp * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner restart(String resourceGroupName, String vmName) { - return restartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void restart(String resourceGroupName, String vmName) { + restartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -2147,7 +2137,7 @@ public OperationStatusResponseInner restart(String resourceGroupName, String vmN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture restartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture restartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2159,10 +2149,10 @@ public ServiceFuture restartAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable restartAsync(String resourceGroupName, String vmName) { - return restartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable restartAsync(String resourceGroupName, String vmName) { + return restartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2176,7 +2166,7 @@ public OperationStatusResponseInner call(ServiceResponse> restartWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2186,9 +2176,9 @@ public Observable> restartWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.restart(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2199,10 +2189,9 @@ public Observable> restartWithServ * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRestart(String resourceGroupName, String vmName) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginRestart(String resourceGroupName, String vmName) { + beginRestartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -2214,7 +2203,7 @@ public OperationStatusResponseInner beginRestart(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRestartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRestartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2224,12 +2213,12 @@ public ServiceFuture beginRestartAsync(String reso * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRestartAsync(String resourceGroupName, String vmName) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRestartAsync(String resourceGroupName, String vmName) { + return beginRestartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2241,9 +2230,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2253,13 +2242,13 @@ public Observable> beginRestartWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginRestart(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRestartDelegate(response); + ServiceResponse clientResponse = beginRestartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2268,9 +2257,9 @@ public Observable> call(Response beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2284,10 +2273,9 @@ private ServiceResponse beginRestartDelegate(Respo * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner start(String resourceGroupName, String vmName) { - return startWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void start(String resourceGroupName, String vmName) { + startWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -2299,7 +2287,7 @@ public OperationStatusResponseInner start(String resourceGroupName, String vmNam * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture startAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture startAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2311,10 +2299,10 @@ public ServiceFuture startAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable startAsync(String resourceGroupName, String vmName) { - return startWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable startAsync(String resourceGroupName, String vmName) { + return startWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2328,7 +2316,7 @@ public OperationStatusResponseInner call(ServiceResponse> startWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> startWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2338,9 +2326,9 @@ public Observable> startWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.start(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2351,10 +2339,9 @@ public Observable> startWithServic * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginStart(String resourceGroupName, String vmName) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginStart(String resourceGroupName, String vmName) { + beginStartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -2366,7 +2353,7 @@ public OperationStatusResponseInner beginStart(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginStartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginStartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2376,12 +2363,12 @@ public ServiceFuture beginStartAsync(String resour * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginStartAsync(String resourceGroupName, String vmName) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginStartAsync(String resourceGroupName, String vmName) { + return beginStartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2393,9 +2380,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginStartWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2405,13 +2392,13 @@ public Observable> beginStartWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginStart(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginStartDelegate(response); + ServiceResponse clientResponse = beginStartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2420,9 +2407,9 @@ public Observable> call(Response beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2436,10 +2423,9 @@ private ServiceResponse beginStartDelegate(Respons * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner redeploy(String resourceGroupName, String vmName) { - return redeployWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void redeploy(String resourceGroupName, String vmName) { + redeployWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -2451,7 +2437,7 @@ public OperationStatusResponseInner redeploy(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture redeployAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture redeployAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2463,10 +2449,10 @@ public ServiceFuture redeployAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable redeployAsync(String resourceGroupName, String vmName) { - return redeployWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable redeployAsync(String resourceGroupName, String vmName) { + return redeployWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2480,7 +2466,7 @@ public OperationStatusResponseInner call(ServiceResponse> redeployWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2490,9 +2476,9 @@ public Observable> redeployWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.redeploy(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2503,10 +2489,9 @@ public Observable> redeployWithSer * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRedeploy(String resourceGroupName, String vmName) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginRedeploy(String resourceGroupName, String vmName) { + beginRedeployWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -2518,7 +2503,7 @@ public OperationStatusResponseInner beginRedeploy(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2528,12 +2513,12 @@ public ServiceFuture beginRedeployAsync(String res * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRedeployAsync(String resourceGroupName, String vmName) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRedeployAsync(String resourceGroupName, String vmName) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2545,9 +2530,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2557,13 +2542,13 @@ public Observable> beginRedeployWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginRedeploy(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRedeployDelegate(response); + ServiceResponse clientResponse = beginRedeployDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2572,9 +2557,9 @@ public Observable> call(Response beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2588,10 +2573,9 @@ private ServiceResponse beginRedeployDelegate(Resp * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmName) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void performMaintenance(String resourceGroupName, String vmName) { + performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -2603,7 +2587,7 @@ public OperationStatusResponseInner performMaintenance(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2615,10 +2599,10 @@ public ServiceFuture performMaintenanceAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable performMaintenanceAsync(String resourceGroupName, String vmName) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable performMaintenanceAsync(String resourceGroupName, String vmName) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2632,7 +2616,7 @@ public OperationStatusResponseInner call(ServiceResponse> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2642,9 +2626,9 @@ public Observable> performMaintena if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.performMaintenance(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2655,10 +2639,9 @@ public Observable> performMaintena * @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 OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmName) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginPerformMaintenance(String resourceGroupName, String vmName) { + beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -2670,7 +2653,7 @@ public OperationStatusResponseInner beginPerformMaintenance(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2680,12 +2663,12 @@ public ServiceFuture beginPerformMaintenanceAsync( * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmName) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmName) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2697,9 +2680,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2709,13 +2692,13 @@ public Observable> beginPerformMai if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginPerformMaintenance(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2724,9 +2707,9 @@ public Observable> call(Response beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2741,9 +2724,9 @@ private ServiceResponse beginPerformMaintenanceDel * @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 RunCommandResultInner object if successful. + * @return the List<InstanceViewStatusInner> object if successful. */ - public RunCommandResultInner runCommand(String resourceGroupName, String vmName, RunCommandInput parameters) { + public List runCommand(String resourceGroupName, String vmName, RunCommandInput parameters) { return runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().last().body(); } @@ -2757,7 +2740,7 @@ public RunCommandResultInner runCommand(String resourceGroupName, String vmName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture runCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters, final ServiceCallback serviceCallback) { + public ServiceFuture> runCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters, final ServiceCallback> serviceCallback) { return ServiceFuture.fromResponse(runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); } @@ -2770,10 +2753,10 @@ public ServiceFuture runCommandAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable runCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { - return runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1, RunCommandResultInner>() { + public Observable> runCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { + return runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1>, List>() { @Override - public RunCommandResultInner call(ServiceResponse response) { + public List call(ServiceResponse> response) { return response.body(); } }); @@ -2788,7 +2771,7 @@ public RunCommandResultInner call(ServiceResponse respons * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> runCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { + public Observable>> runCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2802,9 +2785,9 @@ public Observable> runCommandWithServiceR throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.runCommand(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken>() { }.getType()); } /** @@ -2816,9 +2799,9 @@ public Observable> runCommandWithServiceR * @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 RunCommandResultInner object if successful. + * @return the List<InstanceViewStatusInner> object if successful. */ - public RunCommandResultInner beginRunCommand(String resourceGroupName, String vmName, RunCommandInput parameters) { + public List beginRunCommand(String resourceGroupName, String vmName, RunCommandInput parameters) { return beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().single().body(); } @@ -2832,7 +2815,7 @@ public RunCommandResultInner beginRunCommand(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters, final ServiceCallback serviceCallback) { + public ServiceFuture> beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters, final ServiceCallback> serviceCallback) { return ServiceFuture.fromResponse(beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); } @@ -2843,12 +2826,12 @@ public ServiceFuture beginRunCommandAsync(String resource * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Run command operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RunCommandResultInner object + * @return the observable to the List<InstanceViewStatusInner> object */ - public Observable beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { - return beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1, RunCommandResultInner>() { + public Observable> beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { + return beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1>, List>() { @Override - public RunCommandResultInner call(ServiceResponse response) { + public List call(ServiceResponse> response) { return response.body(); } }); @@ -2861,9 +2844,9 @@ public RunCommandResultInner call(ServiceResponse respons * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Run command operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RunCommandResultInner object + * @return the observable to the List<InstanceViewStatusInner> object */ - public Observable> beginRunCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { + public Observable>> beginRunCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2877,13 +2860,13 @@ public Observable> beginRunCommandWithSer throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginRunCommand(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = beginRunCommandDelegate(response); + ServiceResponse> clientResponse = beginRunCommandDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2892,9 +2875,9 @@ public Observable> call(Response beginRunCommandDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> beginRunCommandDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response);