From ee9ee11926202888843223d738a8ac1b4b6bdf19 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 16 May 2018 23:02:06 -0700 Subject: [PATCH] Generated from 87e0684ac67bc015bf82c1f1227093265c2e1233 (#155) added older examples --- .../compute/AutoOSUpgradePolicy.java | 44 +++ .../compute/AvailabilitySetUpdate.java | 141 +++++++ .../azure/management/compute/DiskUpdate.java | 101 +++++ .../management/compute/GrantAccessData.java | 69 ++++ .../azure/management/compute/ImageUpdate.java | 87 +++++ .../compute/RequestRateByIntervalInput.java | 45 +++ .../management/compute/RunCommandInput.java | 97 +++++ .../management/compute/SnapshotUpdate.java | 101 +++++ .../compute/ThrottledRequestsInput.java | 16 + .../management/compute/UpgradePolicy.java | 26 ++ .../VirtualMachineCaptureParameters.java | 96 +++++ .../VirtualMachineExtensionUpdate.java | 207 ++++++++++ .../compute/VirtualMachineScaleSetUpdate.java | 204 ++++++++++ .../compute/VirtualMachineUpdate.java | 356 ++++++++++++++++++ .../implementation/AvailabilitySetsInner.java | 23 +- .../compute/implementation/DisksInner.java | 42 ++- .../compute/implementation/ImagesInner.java | 21 +- .../implementation/LogAnalyticsInner.java | 42 ++- .../implementation/OperationsInner.java | 6 +- .../implementation/SnapshotsInner.java | 42 ++- .../VirtualMachineExtensionsInner.java | 21 +- .../VirtualMachineScaleSetsInner.java | 21 +- .../VirtualMachineSizesInner.java | 6 +- .../implementation/VirtualMachinesInner.java | 69 ++-- 24 files changed, 1753 insertions(+), 130 deletions(-) create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AutoOSUpgradePolicy.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskUpdate.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GrantAccessData.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageUpdate.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RequestRateByIntervalInput.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandInput.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotUpdate.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ThrottledRequestsInput.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineCaptureParameters.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionUpdate.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdate.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineUpdate.java diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AutoOSUpgradePolicy.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AutoOSUpgradePolicy.java new file mode 100644 index 00000000000..743fc374447 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AutoOSUpgradePolicy.java @@ -0,0 +1,44 @@ +/** + * 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; + +/** + * The configuration parameters used for performing automatic OS upgrade. + */ +public class AutoOSUpgradePolicy { + /** + * Whether OS image rollback feature should be disabled. Default value is + * false. + */ + @JsonProperty(value = "disableAutoRollback") + private Boolean disableAutoRollback; + + /** + * Get the disableAutoRollback value. + * + * @return the disableAutoRollback value + */ + public Boolean disableAutoRollback() { + return this.disableAutoRollback; + } + + /** + * Set the disableAutoRollback value. + * + * @param disableAutoRollback the disableAutoRollback value to set + * @return the AutoOSUpgradePolicy object itself. + */ + public AutoOSUpgradePolicy withDisableAutoRollback(Boolean disableAutoRollback) { + this.disableAutoRollback = disableAutoRollback; + return this; + } + +} 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 new file mode 100644 index 00000000000..a8d809578f7 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java @@ -0,0 +1,141 @@ +/** + * 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 java.util.List; +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Specifies information about the availability set that the virtual machine + * should be assigned to. Only tags may be updated. + */ +@JsonFlatten +public class AvailabilitySetUpdate extends UpdateResource { + /** + * Update Domain count. + */ + @JsonProperty(value = "properties.platformUpdateDomainCount") + private Integer platformUpdateDomainCount; + + /** + * Fault Domain count. + */ + @JsonProperty(value = "properties.platformFaultDomainCount") + private Integer platformFaultDomainCount; + + /** + * A list of references to all virtual machines in the availability set. + */ + @JsonProperty(value = "properties.virtualMachines") + private List virtualMachines; + + /** + * The resource status information. + */ + @JsonProperty(value = "properties.statuses", access = JsonProperty.Access.WRITE_ONLY) + private List statuses; + + /** + * Sku of the availability set. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * Get the platformUpdateDomainCount value. + * + * @return the platformUpdateDomainCount value + */ + public Integer platformUpdateDomainCount() { + return this.platformUpdateDomainCount; + } + + /** + * Set the platformUpdateDomainCount value. + * + * @param platformUpdateDomainCount the platformUpdateDomainCount value to set + * @return the AvailabilitySetUpdate object itself. + */ + public AvailabilitySetUpdate withPlatformUpdateDomainCount(Integer platformUpdateDomainCount) { + this.platformUpdateDomainCount = platformUpdateDomainCount; + return this; + } + + /** + * Get the platformFaultDomainCount value. + * + * @return the platformFaultDomainCount value + */ + public Integer platformFaultDomainCount() { + return this.platformFaultDomainCount; + } + + /** + * Set the platformFaultDomainCount value. + * + * @param platformFaultDomainCount the platformFaultDomainCount value to set + * @return the AvailabilitySetUpdate object itself. + */ + public AvailabilitySetUpdate withPlatformFaultDomainCount(Integer platformFaultDomainCount) { + this.platformFaultDomainCount = platformFaultDomainCount; + return this; + } + + /** + * Get the virtualMachines value. + * + * @return the virtualMachines value + */ + public List virtualMachines() { + return this.virtualMachines; + } + + /** + * Set the virtualMachines value. + * + * @param virtualMachines the virtualMachines value to set + * @return the AvailabilitySetUpdate object itself. + */ + public AvailabilitySetUpdate withVirtualMachines(List virtualMachines) { + this.virtualMachines = virtualMachines; + return this; + } + + /** + * Get the statuses value. + * + * @return the statuses value + */ + public List statuses() { + return this.statuses; + } + + /** + * Get the sku value. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the AvailabilitySetUpdate object itself. + */ + public AvailabilitySetUpdate withSku(Sku sku) { + this.sku = sku; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskUpdate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskUpdate.java new file mode 100644 index 00000000000..30e45b30e8e --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskUpdate.java @@ -0,0 +1,101 @@ +/** + * 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; + +/** + * Disk update resource. + */ +@JsonFlatten +public class DiskUpdate extends ResourceUpdate { + /** + * the Operating System type. Possible values include: 'Windows', 'Linux'. + */ + @JsonProperty(value = "properties.osType") + private OperatingSystemTypes osType; + + /** + * If creationData.createOption is Empty, this field is mandatory and it + * indicates the size of the VHD to create. If this field is present for + * updates or creation with other options, it indicates a resize. Resizes + * are only allowed if the disk is not attached to a running VM, and can + * only increase the disk's size. + */ + @JsonProperty(value = "properties.diskSizeGB") + private Integer diskSizeGB; + + /** + * Encryption settings for disk or snapshot. + */ + @JsonProperty(value = "properties.encryptionSettings") + private EncryptionSettings encryptionSettings; + + /** + * Get the osType value. + * + * @return the osType value + */ + public OperatingSystemTypes osType() { + return this.osType; + } + + /** + * Set the osType value. + * + * @param osType the osType value to set + * @return the DiskUpdate object itself. + */ + public DiskUpdate withOsType(OperatingSystemTypes osType) { + this.osType = osType; + return this; + } + + /** + * Get the diskSizeGB value. + * + * @return the diskSizeGB value + */ + public Integer diskSizeGB() { + return this.diskSizeGB; + } + + /** + * Set the diskSizeGB value. + * + * @param diskSizeGB the diskSizeGB value to set + * @return the DiskUpdate object itself. + */ + public DiskUpdate withDiskSizeGB(Integer diskSizeGB) { + this.diskSizeGB = diskSizeGB; + return this; + } + + /** + * Get the encryptionSettings value. + * + * @return the encryptionSettings value + */ + public EncryptionSettings encryptionSettings() { + return this.encryptionSettings; + } + + /** + * Set the encryptionSettings value. + * + * @param encryptionSettings the encryptionSettings value to set + * @return the DiskUpdate object itself. + */ + public DiskUpdate withEncryptionSettings(EncryptionSettings encryptionSettings) { + this.encryptionSettings = encryptionSettings; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GrantAccessData.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GrantAccessData.java new file mode 100644 index 00000000000..f5dcfd5bcdf --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GrantAccessData.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data used for requesting a SAS. + */ +public class GrantAccessData { + /** + * Possible values include: 'None', 'Read'. + */ + @JsonProperty(value = "access", required = true) + private AccessLevel access; + + /** + * Time duration in seconds until the SAS access expires. + */ + @JsonProperty(value = "durationInSeconds", required = true) + private int durationInSeconds; + + /** + * Get the access value. + * + * @return the access value + */ + public AccessLevel access() { + return this.access; + } + + /** + * Set the access value. + * + * @param access the access value to set + * @return the GrantAccessData object itself. + */ + public GrantAccessData withAccess(AccessLevel access) { + this.access = access; + return this; + } + + /** + * Get the durationInSeconds value. + * + * @return the durationInSeconds value + */ + public int durationInSeconds() { + return this.durationInSeconds; + } + + /** + * Set the durationInSeconds value. + * + * @param durationInSeconds the durationInSeconds value to set + * @return the GrantAccessData object itself. + */ + public GrantAccessData withDurationInSeconds(int durationInSeconds) { + this.durationInSeconds = durationInSeconds; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageUpdate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageUpdate.java new file mode 100644 index 00000000000..193fd75045d --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageUpdate.java @@ -0,0 +1,87 @@ +/** + * 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.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The source user image virtual hard disk. Only tags may be updated. + */ +@JsonFlatten +public class ImageUpdate extends UpdateResource { + /** + * The source virtual machine from which Image is created. + */ + @JsonProperty(value = "properties.sourceVirtualMachine") + private SubResource sourceVirtualMachine; + + /** + * Specifies the storage settings for the virtual machine disks. + */ + @JsonProperty(value = "properties.storageProfile") + private ImageStorageProfile storageProfile; + + /** + * The provisioning state. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Get the sourceVirtualMachine value. + * + * @return the sourceVirtualMachine value + */ + public SubResource sourceVirtualMachine() { + return this.sourceVirtualMachine; + } + + /** + * Set the sourceVirtualMachine value. + * + * @param sourceVirtualMachine the sourceVirtualMachine value to set + * @return the ImageUpdate object itself. + */ + public ImageUpdate withSourceVirtualMachine(SubResource sourceVirtualMachine) { + this.sourceVirtualMachine = sourceVirtualMachine; + return this; + } + + /** + * Get the storageProfile value. + * + * @return the storageProfile value + */ + public ImageStorageProfile storageProfile() { + return this.storageProfile; + } + + /** + * Set the storageProfile value. + * + * @param storageProfile the storageProfile value to set + * @return the ImageUpdate object itself. + */ + public ImageUpdate withStorageProfile(ImageStorageProfile storageProfile) { + this.storageProfile = storageProfile; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RequestRateByIntervalInput.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RequestRateByIntervalInput.java new file mode 100644 index 00000000000..10c52ed3898 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RequestRateByIntervalInput.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; + +/** + * Api request input for LogAnalytics getRequestRateByInterval Api. + */ +public class RequestRateByIntervalInput extends LogAnalyticsInputBase { + /** + * Interval value in minutes used to create LogAnalytics call rate logs. + * Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', + * 'SixtyMins'. + */ + @JsonProperty(value = "intervalLength", required = true) + private IntervalInMins intervalLength; + + /** + * Get the intervalLength value. + * + * @return the intervalLength value + */ + public IntervalInMins intervalLength() { + return this.intervalLength; + } + + /** + * Set the intervalLength value. + * + * @param intervalLength the intervalLength value to set + * @return the RequestRateByIntervalInput object itself. + */ + public RequestRateByIntervalInput withIntervalLength(IntervalInMins intervalLength) { + this.intervalLength = intervalLength; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandInput.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandInput.java new file mode 100644 index 00000000000..d3de580f7c8 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandInput.java @@ -0,0 +1,97 @@ +/** + * 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 java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Capture Virtual Machine parameters. + */ +public class RunCommandInput { + /** + * The run command id. + */ + @JsonProperty(value = "commandId", required = true) + private String commandId; + + /** + * Optional. The script to be executed. When this value is given, the + * given script will override the default script of the command. + */ + @JsonProperty(value = "script") + private List script; + + /** + * The run command parameters. + */ + @JsonProperty(value = "parameters") + private List parameters; + + /** + * Get the commandId value. + * + * @return the commandId value + */ + public String commandId() { + return this.commandId; + } + + /** + * Set the commandId value. + * + * @param commandId the commandId value to set + * @return the RunCommandInput object itself. + */ + public RunCommandInput withCommandId(String commandId) { + this.commandId = commandId; + return this; + } + + /** + * Get the script value. + * + * @return the script value + */ + public List script() { + return this.script; + } + + /** + * Set the script value. + * + * @param script the script value to set + * @return the RunCommandInput object itself. + */ + public RunCommandInput withScript(List script) { + this.script = script; + return this; + } + + /** + * Get the parameters value. + * + * @return the parameters value + */ + public List parameters() { + return this.parameters; + } + + /** + * Set the parameters value. + * + * @param parameters the parameters value to set + * @return the RunCommandInput object itself. + */ + public RunCommandInput withParameters(List parameters) { + this.parameters = parameters; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotUpdate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotUpdate.java new file mode 100644 index 00000000000..62109ab3a7d --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotUpdate.java @@ -0,0 +1,101 @@ +/** + * 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; + +/** + * Snapshot update resource. + */ +@JsonFlatten +public class SnapshotUpdate extends ResourceUpdate { + /** + * the Operating System type. Possible values include: 'Windows', 'Linux'. + */ + @JsonProperty(value = "properties.osType") + private OperatingSystemTypes osType; + + /** + * If creationData.createOption is Empty, this field is mandatory and it + * indicates the size of the VHD to create. If this field is present for + * updates or creation with other options, it indicates a resize. Resizes + * are only allowed if the disk is not attached to a running VM, and can + * only increase the disk's size. + */ + @JsonProperty(value = "properties.diskSizeGB") + private Integer diskSizeGB; + + /** + * Encryption settings for disk or snapshot. + */ + @JsonProperty(value = "properties.encryptionSettings") + private EncryptionSettings encryptionSettings; + + /** + * Get the osType value. + * + * @return the osType value + */ + public OperatingSystemTypes osType() { + return this.osType; + } + + /** + * Set the osType value. + * + * @param osType the osType value to set + * @return the SnapshotUpdate object itself. + */ + public SnapshotUpdate withOsType(OperatingSystemTypes osType) { + this.osType = osType; + return this; + } + + /** + * Get the diskSizeGB value. + * + * @return the diskSizeGB value + */ + public Integer diskSizeGB() { + return this.diskSizeGB; + } + + /** + * Set the diskSizeGB value. + * + * @param diskSizeGB the diskSizeGB value to set + * @return the SnapshotUpdate object itself. + */ + public SnapshotUpdate withDiskSizeGB(Integer diskSizeGB) { + this.diskSizeGB = diskSizeGB; + return this; + } + + /** + * Get the encryptionSettings value. + * + * @return the encryptionSettings value + */ + public EncryptionSettings encryptionSettings() { + return this.encryptionSettings; + } + + /** + * Set the encryptionSettings value. + * + * @param encryptionSettings the encryptionSettings value to set + * @return the SnapshotUpdate object itself. + */ + public SnapshotUpdate withEncryptionSettings(EncryptionSettings encryptionSettings) { + this.encryptionSettings = encryptionSettings; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ThrottledRequestsInput.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ThrottledRequestsInput.java new file mode 100644 index 00000000000..4fa3cdc0439 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ThrottledRequestsInput.java @@ -0,0 +1,16 @@ +/** + * 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; + + +/** + * Api request input for LogAnalytics getThrottledRequests Api. + */ +public class ThrottledRequestsInput extends LogAnalyticsInputBase { +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradePolicy.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradePolicy.java index a514197931e..38179448da0 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradePolicy.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradePolicy.java @@ -40,6 +40,12 @@ public class UpgradePolicy { @JsonProperty(value = "automaticOSUpgrade") private Boolean automaticOSUpgrade; + /** + * Configuration parameters used for performing automatic OS Upgrade. + */ + @JsonProperty(value = "autoOSUpgradePolicy") + private AutoOSUpgradePolicy autoOSUpgradePolicy; + /** * Get the mode value. * @@ -100,4 +106,24 @@ public UpgradePolicy withAutomaticOSUpgrade(Boolean automaticOSUpgrade) { return this; } + /** + * Get the autoOSUpgradePolicy value. + * + * @return the autoOSUpgradePolicy value + */ + public AutoOSUpgradePolicy autoOSUpgradePolicy() { + return this.autoOSUpgradePolicy; + } + + /** + * Set the autoOSUpgradePolicy value. + * + * @param autoOSUpgradePolicy the autoOSUpgradePolicy value to set + * @return the UpgradePolicy object itself. + */ + public UpgradePolicy withAutoOSUpgradePolicy(AutoOSUpgradePolicy autoOSUpgradePolicy) { + this.autoOSUpgradePolicy = autoOSUpgradePolicy; + return this; + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineCaptureParameters.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineCaptureParameters.java new file mode 100644 index 00000000000..d42936a017d --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineCaptureParameters.java @@ -0,0 +1,96 @@ +/** + * 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; + +/** + * Capture Virtual Machine parameters. + */ +public class VirtualMachineCaptureParameters { + /** + * The captured virtual hard disk's name prefix. + */ + @JsonProperty(value = "vhdPrefix", required = true) + private String vhdPrefix; + + /** + * The destination container name. + */ + @JsonProperty(value = "destinationContainerName", required = true) + private String destinationContainerName; + + /** + * Specifies whether to overwrite the destination virtual hard disk, in + * case of conflict. + */ + @JsonProperty(value = "overwriteVhds", required = true) + private boolean overwriteVhds; + + /** + * Get the vhdPrefix value. + * + * @return the vhdPrefix value + */ + public String vhdPrefix() { + return this.vhdPrefix; + } + + /** + * Set the vhdPrefix value. + * + * @param vhdPrefix the vhdPrefix value to set + * @return the VirtualMachineCaptureParameters object itself. + */ + public VirtualMachineCaptureParameters withVhdPrefix(String vhdPrefix) { + this.vhdPrefix = vhdPrefix; + return this; + } + + /** + * Get the destinationContainerName value. + * + * @return the destinationContainerName value + */ + public String destinationContainerName() { + return this.destinationContainerName; + } + + /** + * Set the destinationContainerName value. + * + * @param destinationContainerName the destinationContainerName value to set + * @return the VirtualMachineCaptureParameters object itself. + */ + public VirtualMachineCaptureParameters withDestinationContainerName(String destinationContainerName) { + this.destinationContainerName = destinationContainerName; + return this; + } + + /** + * Get the overwriteVhds value. + * + * @return the overwriteVhds value + */ + public boolean overwriteVhds() { + return this.overwriteVhds; + } + + /** + * Set the overwriteVhds value. + * + * @param overwriteVhds the overwriteVhds value to set + * @return the VirtualMachineCaptureParameters object itself. + */ + public VirtualMachineCaptureParameters withOverwriteVhds(boolean overwriteVhds) { + this.overwriteVhds = overwriteVhds; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionUpdate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionUpdate.java new file mode 100644 index 00000000000..adadbdb77ba --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionUpdate.java @@ -0,0 +1,207 @@ +/** + * 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; + +/** + * Describes a Virtual Machine Extension. + */ +@JsonFlatten +public class VirtualMachineExtensionUpdate extends UpdateResource { + /** + * How the extension handler should be forced to update even if the + * extension configuration has not changed. + */ + @JsonProperty(value = "properties.forceUpdateTag") + private String forceUpdateTag; + + /** + * The name of the extension handler publisher. + */ + @JsonProperty(value = "properties.publisher") + private String publisher; + + /** + * Specifies the type of the extension; an example is + * "CustomScriptExtension". + */ + @JsonProperty(value = "properties.type") + private String type; + + /** + * Specifies the version of the script handler. + */ + @JsonProperty(value = "properties.typeHandlerVersion") + private String typeHandlerVersion; + + /** + * Indicates whether the extension should use a newer minor version if one + * is available at deployment time. Once deployed, however, the extension + * will not upgrade minor versions unless redeployed, even with this + * property set to true. + */ + @JsonProperty(value = "properties.autoUpgradeMinorVersion") + private Boolean autoUpgradeMinorVersion; + + /** + * Json formatted public settings for the extension. + */ + @JsonProperty(value = "properties.settings") + private Object settings; + + /** + * The extension can contain either protectedSettings or + * protectedSettingsFromKeyVault or no protected settings at all. + */ + @JsonProperty(value = "properties.protectedSettings") + private Object protectedSettings; + + /** + * Get the forceUpdateTag value. + * + * @return the forceUpdateTag value + */ + public String forceUpdateTag() { + return this.forceUpdateTag; + } + + /** + * Set the forceUpdateTag value. + * + * @param forceUpdateTag the forceUpdateTag value to set + * @return the VirtualMachineExtensionUpdate object itself. + */ + public VirtualMachineExtensionUpdate withForceUpdateTag(String forceUpdateTag) { + this.forceUpdateTag = forceUpdateTag; + return this; + } + + /** + * Get the publisher value. + * + * @return the publisher value + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher value. + * + * @param publisher the publisher value to set + * @return the VirtualMachineExtensionUpdate object itself. + */ + public VirtualMachineExtensionUpdate withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get the type value. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the VirtualMachineExtensionUpdate object itself. + */ + public VirtualMachineExtensionUpdate withType(String type) { + this.type = type; + return this; + } + + /** + * Get the typeHandlerVersion value. + * + * @return the typeHandlerVersion value + */ + public String typeHandlerVersion() { + return this.typeHandlerVersion; + } + + /** + * Set the typeHandlerVersion value. + * + * @param typeHandlerVersion the typeHandlerVersion value to set + * @return the VirtualMachineExtensionUpdate object itself. + */ + public VirtualMachineExtensionUpdate withTypeHandlerVersion(String typeHandlerVersion) { + this.typeHandlerVersion = typeHandlerVersion; + return this; + } + + /** + * Get the autoUpgradeMinorVersion value. + * + * @return the autoUpgradeMinorVersion value + */ + public Boolean autoUpgradeMinorVersion() { + return this.autoUpgradeMinorVersion; + } + + /** + * Set the autoUpgradeMinorVersion value. + * + * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set + * @return the VirtualMachineExtensionUpdate object itself. + */ + public VirtualMachineExtensionUpdate withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { + this.autoUpgradeMinorVersion = autoUpgradeMinorVersion; + return this; + } + + /** + * Get the settings value. + * + * @return the settings value + */ + public Object settings() { + return this.settings; + } + + /** + * Set the settings value. + * + * @param settings the settings value to set + * @return the VirtualMachineExtensionUpdate object itself. + */ + public VirtualMachineExtensionUpdate withSettings(Object settings) { + this.settings = settings; + return this; + } + + /** + * Get the protectedSettings value. + * + * @return the protectedSettings value + */ + public Object protectedSettings() { + return this.protectedSettings; + } + + /** + * Set the protectedSettings value. + * + * @param protectedSettings the protectedSettings value to set + * @return the VirtualMachineExtensionUpdate object itself. + */ + public VirtualMachineExtensionUpdate withProtectedSettings(Object protectedSettings) { + this.protectedSettings = protectedSettings; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdate.java new file mode 100644 index 00000000000..dfdc680bb65 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdate.java @@ -0,0 +1,204 @@ +/** + * 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; + +/** + * Describes a Virtual Machine Scale Set. + */ +@JsonFlatten +public class VirtualMachineScaleSetUpdate extends UpdateResource { + /** + * The virtual machine scale set sku. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * The purchase plan when deploying a virtual machine scale set from VM + * Marketplace images. + */ + @JsonProperty(value = "plan") + private Plan plan; + + /** + * The upgrade policy. + */ + @JsonProperty(value = "properties.upgradePolicy") + private UpgradePolicy upgradePolicy; + + /** + * The virtual machine profile. + */ + @JsonProperty(value = "properties.virtualMachineProfile") + private VirtualMachineScaleSetUpdateVMProfile virtualMachineProfile; + + /** + * Specifies whether the Virtual Machine Scale Set should be + * overprovisioned. + */ + @JsonProperty(value = "properties.overprovision") + private Boolean overprovision; + + /** + * When true this limits the scale set to a single placement group, of max + * size 100 virtual machines. + */ + @JsonProperty(value = "properties.singlePlacementGroup") + private Boolean singlePlacementGroup; + + /** + * The identity of the virtual machine scale set, if configured. + */ + @JsonProperty(value = "identity") + private VirtualMachineScaleSetIdentity identity; + + /** + * Get the sku value. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the VirtualMachineScaleSetUpdate object itself. + */ + public VirtualMachineScaleSetUpdate withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the plan value. + * + * @return the plan value + */ + public Plan plan() { + return this.plan; + } + + /** + * Set the plan value. + * + * @param plan the plan value to set + * @return the VirtualMachineScaleSetUpdate object itself. + */ + public VirtualMachineScaleSetUpdate withPlan(Plan plan) { + this.plan = plan; + return this; + } + + /** + * Get the upgradePolicy value. + * + * @return the upgradePolicy value + */ + public UpgradePolicy upgradePolicy() { + return this.upgradePolicy; + } + + /** + * Set the upgradePolicy value. + * + * @param upgradePolicy the upgradePolicy value to set + * @return the VirtualMachineScaleSetUpdate object itself. + */ + public VirtualMachineScaleSetUpdate withUpgradePolicy(UpgradePolicy upgradePolicy) { + this.upgradePolicy = upgradePolicy; + return this; + } + + /** + * Get the virtualMachineProfile value. + * + * @return the virtualMachineProfile value + */ + public VirtualMachineScaleSetUpdateVMProfile virtualMachineProfile() { + return this.virtualMachineProfile; + } + + /** + * Set the virtualMachineProfile value. + * + * @param virtualMachineProfile the virtualMachineProfile value to set + * @return the VirtualMachineScaleSetUpdate object itself. + */ + public VirtualMachineScaleSetUpdate withVirtualMachineProfile(VirtualMachineScaleSetUpdateVMProfile virtualMachineProfile) { + this.virtualMachineProfile = virtualMachineProfile; + return this; + } + + /** + * Get the overprovision value. + * + * @return the overprovision value + */ + public Boolean overprovision() { + return this.overprovision; + } + + /** + * Set the overprovision value. + * + * @param overprovision the overprovision value to set + * @return the VirtualMachineScaleSetUpdate object itself. + */ + public VirtualMachineScaleSetUpdate withOverprovision(Boolean overprovision) { + this.overprovision = overprovision; + return this; + } + + /** + * Get the singlePlacementGroup value. + * + * @return the singlePlacementGroup value + */ + public Boolean singlePlacementGroup() { + return this.singlePlacementGroup; + } + + /** + * Set the singlePlacementGroup value. + * + * @param singlePlacementGroup the singlePlacementGroup value to set + * @return the VirtualMachineScaleSetUpdate object itself. + */ + public VirtualMachineScaleSetUpdate withSinglePlacementGroup(Boolean singlePlacementGroup) { + this.singlePlacementGroup = singlePlacementGroup; + return this; + } + + /** + * Get the identity value. + * + * @return the identity value + */ + public VirtualMachineScaleSetIdentity identity() { + return this.identity; + } + + /** + * Set the identity value. + * + * @param identity the identity value to set + * @return the VirtualMachineScaleSetUpdate object itself. + */ + public VirtualMachineScaleSetUpdate withIdentity(VirtualMachineScaleSetIdentity identity) { + this.identity = identity; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineUpdate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineUpdate.java new file mode 100644 index 00000000000..5ad5d8f5377 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineUpdate.java @@ -0,0 +1,356 @@ +/** + * 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.microsoft.azure.SubResource; +import com.microsoft.azure.management.compute.implementation.VirtualMachineInstanceViewInner; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Describes a Virtual Machine Update. + */ +@JsonFlatten +public class VirtualMachineUpdate extends UpdateResource { + /** + * Specifies information about the marketplace image used to create the + * virtual machine. This element is only used for marketplace images. + * Before you can use a marketplace image from an API, you must enable the + * image for programmatic use. In the Azure portal, find the marketplace + * image that you want to use and then click **Want to deploy + * programmatically, Get Started ->**. Enter any required information + * and then click **Save**. + */ + @JsonProperty(value = "plan") + private Plan plan; + + /** + * Specifies the hardware settings for the virtual machine. + */ + @JsonProperty(value = "properties.hardwareProfile") + private HardwareProfile hardwareProfile; + + /** + * Specifies the storage settings for the virtual machine disks. + */ + @JsonProperty(value = "properties.storageProfile") + private StorageProfile storageProfile; + + /** + * Specifies the operating system settings for the virtual machine. + */ + @JsonProperty(value = "properties.osProfile") + private OSProfile osProfile; + + /** + * Specifies the network interfaces of the virtual machine. + */ + @JsonProperty(value = "properties.networkProfile") + private NetworkProfile networkProfile; + + /** + * Specifies the boot diagnostic settings state. + * <br><br>Minimum api-version: 2015-06-15. + */ + @JsonProperty(value = "properties.diagnosticsProfile") + private DiagnosticsProfile diagnosticsProfile; + + /** + * Specifies information about the availability set that the virtual + * machine should be assigned to. Virtual machines specified in the same + * availability set are allocated to different nodes to maximize + * availability. For more information about availability sets, see [Manage + * the availability of virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * <br><br> For more information on Azure planned maintainance, + * see [Planned maintenance for virtual machines in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + * <br><br> Currently, a VM can only be added to availability + * set at creation time. An existing VM cannot be added to an availability + * set. + */ + @JsonProperty(value = "properties.availabilitySet") + private SubResource availabilitySet; + + /** + * The provisioning state, which only appears in the response. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * The virtual machine instance view. + */ + @JsonProperty(value = "properties.instanceView", access = JsonProperty.Access.WRITE_ONLY) + private VirtualMachineInstanceViewInner instanceView; + + /** + * Specifies that the image or disk that is being used was licensed + * on-premises. This element is only used for images that contain the + * Windows Server operating system. <br><br> Possible values + * are: <br><br> Windows_Client <br><br> + * Windows_Server <br><br> If this element is included in a + * request for an update, the value must match the initial value. This + * value cannot be updated. <br><br> For more information, see + * [Azure Hybrid Use Benefit for Windows + * Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + * <br><br> Minimum api-version: 2015-06-15. + */ + @JsonProperty(value = "properties.licenseType") + private String licenseType; + + /** + * Specifies the VM unique ID which is a 128-bits identifier that is + * encoded and stored in all Azure IaaS VMs SMBIOS and can be read using + * platform BIOS commands. + */ + @JsonProperty(value = "properties.vmId", access = JsonProperty.Access.WRITE_ONLY) + private String vmId; + + /** + * The identity of the virtual machine, if configured. + */ + @JsonProperty(value = "identity") + private VirtualMachineIdentity identity; + + /** + * The virtual machine zones. + */ + @JsonProperty(value = "zones") + private List zones; + + /** + * Get the plan value. + * + * @return the plan value + */ + public Plan plan() { + return this.plan; + } + + /** + * Set the plan value. + * + * @param plan the plan value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withPlan(Plan plan) { + this.plan = plan; + return this; + } + + /** + * Get the hardwareProfile value. + * + * @return the hardwareProfile value + */ + public HardwareProfile hardwareProfile() { + return this.hardwareProfile; + } + + /** + * Set the hardwareProfile value. + * + * @param hardwareProfile the hardwareProfile value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withHardwareProfile(HardwareProfile hardwareProfile) { + this.hardwareProfile = hardwareProfile; + return this; + } + + /** + * Get the storageProfile value. + * + * @return the storageProfile value + */ + public StorageProfile storageProfile() { + return this.storageProfile; + } + + /** + * Set the storageProfile value. + * + * @param storageProfile the storageProfile value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withStorageProfile(StorageProfile storageProfile) { + this.storageProfile = storageProfile; + return this; + } + + /** + * Get the osProfile value. + * + * @return the osProfile value + */ + public OSProfile osProfile() { + return this.osProfile; + } + + /** + * Set the osProfile value. + * + * @param osProfile the osProfile value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withOsProfile(OSProfile osProfile) { + this.osProfile = osProfile; + return this; + } + + /** + * Get the networkProfile value. + * + * @return the networkProfile value + */ + public NetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Set the networkProfile value. + * + * @param networkProfile the networkProfile value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withNetworkProfile(NetworkProfile networkProfile) { + this.networkProfile = networkProfile; + return this; + } + + /** + * Get the diagnosticsProfile value. + * + * @return the diagnosticsProfile value + */ + public DiagnosticsProfile diagnosticsProfile() { + return this.diagnosticsProfile; + } + + /** + * Set the diagnosticsProfile value. + * + * @param diagnosticsProfile the diagnosticsProfile value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withDiagnosticsProfile(DiagnosticsProfile diagnosticsProfile) { + this.diagnosticsProfile = diagnosticsProfile; + return this; + } + + /** + * Get the availabilitySet value. + * + * @return the availabilitySet value + */ + public SubResource availabilitySet() { + return this.availabilitySet; + } + + /** + * Set the availabilitySet value. + * + * @param availabilitySet the availabilitySet value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withAvailabilitySet(SubResource availabilitySet) { + this.availabilitySet = availabilitySet; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the instanceView value. + * + * @return the instanceView value + */ + public VirtualMachineInstanceViewInner instanceView() { + return this.instanceView; + } + + /** + * Get the licenseType value. + * + * @return the licenseType value + */ + public String licenseType() { + return this.licenseType; + } + + /** + * Set the licenseType value. + * + * @param licenseType the licenseType value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withLicenseType(String licenseType) { + this.licenseType = licenseType; + return this; + } + + /** + * Get the vmId value. + * + * @return the vmId value + */ + public String vmId() { + return this.vmId; + } + + /** + * Get the identity value. + * + * @return the identity value + */ + public VirtualMachineIdentity identity() { + return this.identity; + } + + /** + * Set the identity value. + * + * @param identity the identity value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withIdentity(VirtualMachineIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the zones value. + * + * @return the zones value + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones value. + * + * @param zones the zones value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withZones(List zones) { + this.zones = zones; + return this; + } + +} 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 9fc6e2ade1c..54e82371d0e 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 @@ -13,6 +13,7 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.compute.AvailabilitySetUpdate; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -67,7 +68,7 @@ interface AvailabilitySetsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.AvailabilitySets update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("availabilitySetName") String availabilitySetName, @Path("subscriptionId") String subscriptionId, @Body AvailabilitySetUpdateInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("availabilitySetName") String availabilitySetName, @Path("subscriptionId") String subscriptionId, @Body AvailabilitySetUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.AvailabilitySets delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", method = "DELETE", hasBody = true) @@ -190,7 +191,7 @@ private ServiceResponse createOrUpdateDelegate(Response updateAsync(String resourceGroupName, String availabilitySetName, AvailabilitySetUpdateInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String availabilitySetName, AvailabilitySetUpdate parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, availabilitySetName, parameters), serviceCallback); } @@ -217,7 +218,7 @@ public ServiceFuture updateAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AvailabilitySetInner object */ - public Observable updateAsync(String resourceGroupName, String availabilitySetName, AvailabilitySetUpdateInner parameters) { + public Observable updateAsync(String resourceGroupName, String availabilitySetName, AvailabilitySetUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, availabilitySetName, parameters).map(new Func1, AvailabilitySetInner>() { @Override public AvailabilitySetInner call(ServiceResponse response) { @@ -235,7 +236,7 @@ public AvailabilitySetInner call(ServiceResponse response) * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AvailabilitySetInner object */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String availabilitySetName, AvailabilitySetUpdateInner parameters) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String availabilitySetName, AvailabilitySetUpdate parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -506,7 +507,11 @@ public Observable>> listByResourceGro public Observable>> call(Response response) { try { ServiceResponse> result = listByResourceGroupDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -591,7 +596,11 @@ public Observable>> listAvailableS public Observable>> call(Response response) { try { ServiceResponse> result = listAvailableSizesDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); 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 8b8b7ecb7cf..60bbfac6a05 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 @@ -16,6 +16,8 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.compute.DiskUpdate; +import com.microsoft.azure.management.compute.GrantAccessData; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -76,11 +78,11 @@ interface DisksService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Disks update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body DiskUpdateInner disk, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body DiskUpdate disk, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Disks beginUpdate" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}") - Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body DiskUpdateInner disk, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body DiskUpdate disk, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Disks getByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}") @@ -104,11 +106,11 @@ interface DisksService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Disks grantAccess" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess") - Observable> grantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body GrantAccessDataInner grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> grantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body GrantAccessData grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Disks beginGrantAccess" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess") - Observable> beginGrantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body GrantAccessDataInner grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginGrantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body GrantAccessData grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Disks revokeAccess" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess") @@ -307,7 +309,7 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response updateAsync(String resourceGroupName, String diskName, DiskUpdateInner disk, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String diskName, DiskUpdate disk, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, diskName, disk), serviceCallback); } @@ -334,7 +336,7 @@ public ServiceFuture updateAsync(String resourceGroupName, String dis * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateAsync(String resourceGroupName, String diskName, DiskUpdateInner disk) { + public Observable updateAsync(String resourceGroupName, String diskName, DiskUpdate disk) { return updateWithServiceResponseAsync(resourceGroupName, diskName, disk).map(new Func1, DiskInner>() { @Override public DiskInner call(ServiceResponse response) { @@ -352,7 +354,7 @@ public DiskInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String diskName, DiskUpdateInner disk) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String diskName, DiskUpdate disk) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -382,7 +384,7 @@ public Observable> updateWithServiceResponseAsync(Str * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the DiskInner object if successful. */ - public DiskInner beginUpdate(String resourceGroupName, String diskName, DiskUpdateInner disk) { + public DiskInner beginUpdate(String resourceGroupName, String diskName, DiskUpdate disk) { return beginUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk).toBlocking().single().body(); } @@ -396,7 +398,7 @@ public DiskInner beginUpdate(String resourceGroupName, String diskName, DiskUpda * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateAsync(String resourceGroupName, String diskName, DiskUpdateInner disk, final ServiceCallback serviceCallback) { + public ServiceFuture beginUpdateAsync(String resourceGroupName, String diskName, DiskUpdate disk, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk), serviceCallback); } @@ -409,7 +411,7 @@ public ServiceFuture beginUpdateAsync(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DiskInner object */ - public Observable beginUpdateAsync(String resourceGroupName, String diskName, DiskUpdateInner disk) { + public Observable beginUpdateAsync(String resourceGroupName, String diskName, DiskUpdate disk) { return beginUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk).map(new Func1, DiskInner>() { @Override public DiskInner call(ServiceResponse response) { @@ -427,7 +429,7 @@ public DiskInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DiskInner object */ - public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String diskName, DiskUpdateInner disk) { + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String diskName, DiskUpdate disk) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -930,7 +932,7 @@ private ServiceResponse> listDelegate(Response grantAccessAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData, final ServiceCallback serviceCallback) { + public ServiceFuture grantAccessAsync(String resourceGroupName, String diskName, GrantAccessData grantAccessData, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(grantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData), serviceCallback); } @@ -957,7 +959,7 @@ public ServiceFuture grantAccessAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable grantAccessAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData) { + public Observable grantAccessAsync(String resourceGroupName, String diskName, GrantAccessData grantAccessData) { return grantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData).map(new Func1, AccessUriInner>() { @Override public AccessUriInner call(ServiceResponse response) { @@ -975,7 +977,7 @@ public AccessUriInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> grantAccessWithServiceResponseAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData) { + public Observable> grantAccessWithServiceResponseAsync(String resourceGroupName, String diskName, GrantAccessData grantAccessData) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1005,7 +1007,7 @@ public Observable> grantAccessWithServiceRespons * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the AccessUriInner object if successful. */ - public AccessUriInner beginGrantAccess(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData) { + public AccessUriInner beginGrantAccess(String resourceGroupName, String diskName, GrantAccessData grantAccessData) { return beginGrantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData).toBlocking().single().body(); } @@ -1019,7 +1021,7 @@ public AccessUriInner beginGrantAccess(String resourceGroupName, String diskName * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginGrantAccessAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData, final ServiceCallback serviceCallback) { + public ServiceFuture beginGrantAccessAsync(String resourceGroupName, String diskName, GrantAccessData grantAccessData, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginGrantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData), serviceCallback); } @@ -1032,7 +1034,7 @@ public ServiceFuture beginGrantAccessAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AccessUriInner object */ - public Observable beginGrantAccessAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData) { + public Observable beginGrantAccessAsync(String resourceGroupName, String diskName, GrantAccessData grantAccessData) { return beginGrantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData).map(new Func1, AccessUriInner>() { @Override public AccessUriInner call(ServiceResponse response) { @@ -1050,7 +1052,7 @@ public AccessUriInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AccessUriInner object */ - public Observable> beginGrantAccessWithServiceResponseAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData) { + public Observable> beginGrantAccessWithServiceResponseAsync(String resourceGroupName, String diskName, GrantAccessData grantAccessData) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } 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 8ce7c3e316c..a62e0428b2f 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 @@ -16,6 +16,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.compute.ImageUpdate; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -75,11 +76,11 @@ interface ImagesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Images update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("imageName") String imageName, @Path("subscriptionId") String subscriptionId, @Body ImageUpdateInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("imageName") String imageName, @Path("subscriptionId") String subscriptionId, @Body ImageUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Images beginUpdate" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}") - Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("imageName") String imageName, @Path("subscriptionId") String subscriptionId, @Body ImageUpdateInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("imageName") String imageName, @Path("subscriptionId") String subscriptionId, @Body ImageUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Images delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", method = "DELETE", hasBody = true) @@ -290,7 +291,7 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response updateAsync(String resourceGroupName, String imageName, ImageUpdateInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String imageName, ImageUpdate parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, imageName, parameters), serviceCallback); } @@ -317,7 +318,7 @@ public ServiceFuture updateAsync(String resourceGroupName, String im * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateAsync(String resourceGroupName, String imageName, ImageUpdateInner parameters) { + public Observable updateAsync(String resourceGroupName, String imageName, ImageUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, imageName, parameters).map(new Func1, ImageInner>() { @Override public ImageInner call(ServiceResponse response) { @@ -335,7 +336,7 @@ public ImageInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String imageName, ImageUpdateInner parameters) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String imageName, ImageUpdate parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -365,7 +366,7 @@ public Observable> updateWithServiceResponseAsync(St * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ImageInner object if successful. */ - public ImageInner beginUpdate(String resourceGroupName, String imageName, ImageUpdateInner parameters) { + public ImageInner beginUpdate(String resourceGroupName, String imageName, ImageUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, imageName, parameters).toBlocking().single().body(); } @@ -379,7 +380,7 @@ public ImageInner beginUpdate(String resourceGroupName, String imageName, ImageU * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateAsync(String resourceGroupName, String imageName, ImageUpdateInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginUpdateAsync(String resourceGroupName, String imageName, ImageUpdate parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, imageName, parameters), serviceCallback); } @@ -392,7 +393,7 @@ public ServiceFuture beginUpdateAsync(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ImageInner object */ - public Observable beginUpdateAsync(String resourceGroupName, String imageName, ImageUpdateInner parameters) { + public Observable beginUpdateAsync(String resourceGroupName, String imageName, ImageUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, imageName, parameters).map(new Func1, ImageInner>() { @Override public ImageInner call(ServiceResponse response) { @@ -410,7 +411,7 @@ public ImageInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ImageInner object */ - public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String imageName, ImageUpdateInner parameters) { + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String imageName, ImageUpdate parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } 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 652a8ced8a2..834eb1ac67c 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 @@ -11,6 +11,8 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.compute.RequestRateByIntervalInput; +import com.microsoft.azure.management.compute.ThrottledRequestsInput; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; @@ -55,19 +57,19 @@ public LogAnalyticsInner(Retrofit retrofit, ComputeManagementClientImpl client) interface LogAnalyticsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.LogAnalytics exportRequestRateByInterval" }) @POST("subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval") - Observable> exportRequestRateByInterval(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Body RequestRateByIntervalInputInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> exportRequestRateByInterval(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Body RequestRateByIntervalInput parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.LogAnalytics beginExportRequestRateByInterval" }) @POST("subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval") - Observable> beginExportRequestRateByInterval(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Body RequestRateByIntervalInputInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginExportRequestRateByInterval(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Body RequestRateByIntervalInput parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.LogAnalytics exportThrottledRequests" }) @POST("subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests") - Observable> exportThrottledRequests(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Body ThrottledRequestsInputInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> exportThrottledRequests(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Body ThrottledRequestsInput parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.LogAnalytics beginExportThrottledRequests" }) @POST("subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests") - Observable> beginExportThrottledRequests(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Body ThrottledRequestsInputInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginExportThrottledRequests(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Body ThrottledRequestsInput parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } @@ -81,7 +83,7 @@ interface LogAnalyticsService { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the LogAnalyticsOperationResultInner object if successful. */ - public LogAnalyticsOperationResultInner exportRequestRateByInterval(String location, RequestRateByIntervalInputInner parameters) { + public LogAnalyticsOperationResultInner exportRequestRateByInterval(String location, RequestRateByIntervalInput parameters) { return exportRequestRateByIntervalWithServiceResponseAsync(location, parameters).toBlocking().last().body(); } @@ -94,7 +96,7 @@ public LogAnalyticsOperationResultInner exportRequestRateByInterval(String locat * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture exportRequestRateByIntervalAsync(String location, RequestRateByIntervalInputInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture exportRequestRateByIntervalAsync(String location, RequestRateByIntervalInput parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(exportRequestRateByIntervalWithServiceResponseAsync(location, parameters), serviceCallback); } @@ -106,7 +108,7 @@ public ServiceFuture exportRequestRateByInterv * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable exportRequestRateByIntervalAsync(String location, RequestRateByIntervalInputInner parameters) { + public Observable exportRequestRateByIntervalAsync(String location, RequestRateByIntervalInput parameters) { return exportRequestRateByIntervalWithServiceResponseAsync(location, parameters).map(new Func1, LogAnalyticsOperationResultInner>() { @Override public LogAnalyticsOperationResultInner call(ServiceResponse response) { @@ -123,7 +125,7 @@ public LogAnalyticsOperationResultInner call(ServiceResponse> exportRequestRateByIntervalWithServiceResponseAsync(String location, RequestRateByIntervalInputInner parameters) { + public Observable> exportRequestRateByIntervalWithServiceResponseAsync(String location, RequestRateByIntervalInput parameters) { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } @@ -149,7 +151,7 @@ public Observable> exportReque * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the LogAnalyticsOperationResultInner object if successful. */ - public LogAnalyticsOperationResultInner beginExportRequestRateByInterval(String location, RequestRateByIntervalInputInner parameters) { + public LogAnalyticsOperationResultInner beginExportRequestRateByInterval(String location, RequestRateByIntervalInput parameters) { return beginExportRequestRateByIntervalWithServiceResponseAsync(location, parameters).toBlocking().single().body(); } @@ -162,7 +164,7 @@ public LogAnalyticsOperationResultInner beginExportRequestRateByInterval(String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginExportRequestRateByIntervalAsync(String location, RequestRateByIntervalInputInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginExportRequestRateByIntervalAsync(String location, RequestRateByIntervalInput parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginExportRequestRateByIntervalWithServiceResponseAsync(location, parameters), serviceCallback); } @@ -174,7 +176,7 @@ public ServiceFuture beginExportRequestRateByI * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the LogAnalyticsOperationResultInner object */ - public Observable beginExportRequestRateByIntervalAsync(String location, RequestRateByIntervalInputInner parameters) { + public Observable beginExportRequestRateByIntervalAsync(String location, RequestRateByIntervalInput parameters) { return beginExportRequestRateByIntervalWithServiceResponseAsync(location, parameters).map(new Func1, LogAnalyticsOperationResultInner>() { @Override public LogAnalyticsOperationResultInner call(ServiceResponse response) { @@ -191,7 +193,7 @@ public LogAnalyticsOperationResultInner call(ServiceResponse> beginExportRequestRateByIntervalWithServiceResponseAsync(String location, RequestRateByIntervalInputInner parameters) { + public Observable> beginExportRequestRateByIntervalWithServiceResponseAsync(String location, RequestRateByIntervalInput parameters) { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } @@ -235,7 +237,7 @@ private ServiceResponse beginExportRequestRate * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the LogAnalyticsOperationResultInner object if successful. */ - public LogAnalyticsOperationResultInner exportThrottledRequests(String location, ThrottledRequestsInputInner parameters) { + public LogAnalyticsOperationResultInner exportThrottledRequests(String location, ThrottledRequestsInput parameters) { return exportThrottledRequestsWithServiceResponseAsync(location, parameters).toBlocking().last().body(); } @@ -248,7 +250,7 @@ public LogAnalyticsOperationResultInner exportThrottledRequests(String location, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture exportThrottledRequestsAsync(String location, ThrottledRequestsInputInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture exportThrottledRequestsAsync(String location, ThrottledRequestsInput parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(exportThrottledRequestsWithServiceResponseAsync(location, parameters), serviceCallback); } @@ -260,7 +262,7 @@ public ServiceFuture exportThrottledRequestsAs * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable exportThrottledRequestsAsync(String location, ThrottledRequestsInputInner parameters) { + public Observable exportThrottledRequestsAsync(String location, ThrottledRequestsInput parameters) { return exportThrottledRequestsWithServiceResponseAsync(location, parameters).map(new Func1, LogAnalyticsOperationResultInner>() { @Override public LogAnalyticsOperationResultInner call(ServiceResponse response) { @@ -277,7 +279,7 @@ public LogAnalyticsOperationResultInner call(ServiceResponse> exportThrottledRequestsWithServiceResponseAsync(String location, ThrottledRequestsInputInner parameters) { + public Observable> exportThrottledRequestsWithServiceResponseAsync(String location, ThrottledRequestsInput parameters) { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } @@ -303,7 +305,7 @@ public Observable> exportThrot * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the LogAnalyticsOperationResultInner object if successful. */ - public LogAnalyticsOperationResultInner beginExportThrottledRequests(String location, ThrottledRequestsInputInner parameters) { + public LogAnalyticsOperationResultInner beginExportThrottledRequests(String location, ThrottledRequestsInput parameters) { return beginExportThrottledRequestsWithServiceResponseAsync(location, parameters).toBlocking().single().body(); } @@ -316,7 +318,7 @@ public LogAnalyticsOperationResultInner beginExportThrottledRequests(String loca * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginExportThrottledRequestsAsync(String location, ThrottledRequestsInputInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginExportThrottledRequestsAsync(String location, ThrottledRequestsInput parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginExportThrottledRequestsWithServiceResponseAsync(location, parameters), serviceCallback); } @@ -328,7 +330,7 @@ public ServiceFuture beginExportThrottledReque * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the LogAnalyticsOperationResultInner object */ - public Observable beginExportThrottledRequestsAsync(String location, ThrottledRequestsInputInner parameters) { + public Observable beginExportThrottledRequestsAsync(String location, ThrottledRequestsInput parameters) { return beginExportThrottledRequestsWithServiceResponseAsync(location, parameters).map(new Func1, LogAnalyticsOperationResultInner>() { @Override public LogAnalyticsOperationResultInner call(ServiceResponse response) { @@ -345,7 +347,7 @@ public LogAnalyticsOperationResultInner call(ServiceResponse> beginExportThrottledRequestsWithServiceResponseAsync(String location, ThrottledRequestsInputInner parameters) { + public Observable> beginExportThrottledRequestsWithServiceResponseAsync(String location, ThrottledRequestsInput parameters) { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } 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 896e51a2e50..bdff105f020 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 @@ -109,7 +109,11 @@ public Observable>> listWithSer public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); 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 3e8637ef477..fa3f54f8c94 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 @@ -16,6 +16,8 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.compute.GrantAccessData; +import com.microsoft.azure.management.compute.SnapshotUpdate; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -76,11 +78,11 @@ interface SnapshotsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Snapshots update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("snapshotName") String snapshotName, @Query("api-version") String apiVersion, @Body SnapshotUpdateInner snapshot, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("snapshotName") String snapshotName, @Query("api-version") String apiVersion, @Body SnapshotUpdate snapshot, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Snapshots beginUpdate" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}") - Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("snapshotName") String snapshotName, @Query("api-version") String apiVersion, @Body SnapshotUpdateInner snapshot, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("snapshotName") String snapshotName, @Query("api-version") String apiVersion, @Body SnapshotUpdate snapshot, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Snapshots getByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}") @@ -104,11 +106,11 @@ interface SnapshotsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Snapshots grantAccess" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess") - Observable> grantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("snapshotName") String snapshotName, @Query("api-version") String apiVersion, @Body GrantAccessDataInner grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> grantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("snapshotName") String snapshotName, @Query("api-version") String apiVersion, @Body GrantAccessData grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Snapshots beginGrantAccess" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess") - Observable> beginGrantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("snapshotName") String snapshotName, @Query("api-version") String apiVersion, @Body GrantAccessDataInner grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginGrantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("snapshotName") String snapshotName, @Query("api-version") String apiVersion, @Body GrantAccessData grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Snapshots revokeAccess" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess") @@ -307,7 +309,7 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response updateAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String snapshotName, SnapshotUpdate snapshot, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot), serviceCallback); } @@ -334,7 +336,7 @@ public ServiceFuture updateAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot) { + public Observable updateAsync(String resourceGroupName, String snapshotName, SnapshotUpdate snapshot) { return updateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot).map(new Func1, SnapshotInner>() { @Override public SnapshotInner call(ServiceResponse response) { @@ -352,7 +354,7 @@ public SnapshotInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String snapshotName, SnapshotUpdate snapshot) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -382,7 +384,7 @@ public Observable> updateWithServiceResponseAsync * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SnapshotInner object if successful. */ - public SnapshotInner beginUpdate(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot) { + public SnapshotInner beginUpdate(String resourceGroupName, String snapshotName, SnapshotUpdate snapshot) { return beginUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot).toBlocking().single().body(); } @@ -396,7 +398,7 @@ public SnapshotInner beginUpdate(String resourceGroupName, String snapshotName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot, final ServiceCallback serviceCallback) { + public ServiceFuture beginUpdateAsync(String resourceGroupName, String snapshotName, SnapshotUpdate snapshot, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot), serviceCallback); } @@ -409,7 +411,7 @@ public ServiceFuture beginUpdateAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SnapshotInner object */ - public Observable beginUpdateAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot) { + public Observable beginUpdateAsync(String resourceGroupName, String snapshotName, SnapshotUpdate snapshot) { return beginUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot).map(new Func1, SnapshotInner>() { @Override public SnapshotInner call(ServiceResponse response) { @@ -427,7 +429,7 @@ public SnapshotInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SnapshotInner object */ - public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot) { + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String snapshotName, SnapshotUpdate snapshot) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -930,7 +932,7 @@ private ServiceResponse> listDelegate(Response grantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData, final ServiceCallback serviceCallback) { + public ServiceFuture grantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(grantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAccessData), serviceCallback); } @@ -957,7 +959,7 @@ public ServiceFuture grantAccessAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable grantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData) { + public Observable grantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData) { return grantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAccessData).map(new Func1, AccessUriInner>() { @Override public AccessUriInner call(ServiceResponse response) { @@ -975,7 +977,7 @@ public AccessUriInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> grantAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData) { + public Observable> grantAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1005,7 +1007,7 @@ public Observable> grantAccessWithServiceRespons * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the AccessUriInner object if successful. */ - public AccessUriInner beginGrantAccess(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData) { + public AccessUriInner beginGrantAccess(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData) { return beginGrantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAccessData).toBlocking().single().body(); } @@ -1019,7 +1021,7 @@ public AccessUriInner beginGrantAccess(String resourceGroupName, String snapshot * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginGrantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData, final ServiceCallback serviceCallback) { + public ServiceFuture beginGrantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginGrantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAccessData), serviceCallback); } @@ -1032,7 +1034,7 @@ public ServiceFuture beginGrantAccessAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AccessUriInner object */ - public Observable beginGrantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData) { + public Observable beginGrantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData) { return beginGrantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAccessData).map(new Func1, AccessUriInner>() { @Override public AccessUriInner call(ServiceResponse response) { @@ -1050,7 +1052,7 @@ public AccessUriInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AccessUriInner object */ - public Observable> beginGrantAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData) { + public Observable> beginGrantAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } 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 eaf7bcb2d6d..44db0ff482d 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 @@ -11,6 +11,7 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.compute.VirtualMachineExtensionUpdate; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; @@ -66,11 +67,11 @@ interface VirtualMachineExtensionsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineExtensions update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineExtensionUpdateInner extensionParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineExtensionUpdate extensionParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineExtensions beginUpdate" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}") - Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineExtensionUpdateInner extensionParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineExtensionUpdate extensionParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineExtensions delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", method = "DELETE", hasBody = true) @@ -280,7 +281,7 @@ private ServiceResponse beginCreateOrUpdateDelegat * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineExtensionInner object if successful. */ - public VirtualMachineExtensionInner update(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { + public VirtualMachineExtensionInner update(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters) { return updateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).toBlocking().last().body(); } @@ -295,7 +296,7 @@ public VirtualMachineExtensionInner update(String resourceGroupName, String vmNa * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters), serviceCallback); } @@ -309,7 +310,7 @@ public ServiceFuture updateAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { + public Observable updateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters) { return updateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).map(new Func1, VirtualMachineExtensionInner>() { @Override public VirtualMachineExtensionInner call(ServiceResponse response) { @@ -328,7 +329,7 @@ public VirtualMachineExtensionInner call(ServiceResponse> updateWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -362,7 +363,7 @@ public Observable> updateWithServi * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineExtensionInner object if successful. */ - public VirtualMachineExtensionInner beginUpdate(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { + public VirtualMachineExtensionInner beginUpdate(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).toBlocking().single().body(); } @@ -377,7 +378,7 @@ public VirtualMachineExtensionInner beginUpdate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginUpdateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters), serviceCallback); } @@ -391,7 +392,7 @@ public ServiceFuture beginUpdateAsync(String resou * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineExtensionInner object */ - public Observable beginUpdateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { + public Observable beginUpdateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).map(new Func1, VirtualMachineExtensionInner>() { @Override public VirtualMachineExtensionInner call(ServiceResponse response) { @@ -410,7 +411,7 @@ public VirtualMachineExtensionInner call(ServiceResponse> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } 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 cd60ad34a27..9a9f8d9d3d4 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 @@ -16,6 +16,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.compute.VirtualMachineScaleSetUpdate; import com.microsoft.azure.management.compute.VirtualMachineScaleSetVMInstanceIDs; import com.microsoft.azure.management.compute.VirtualMachineScaleSetVMInstanceRequiredIDs; import com.microsoft.azure.Page; @@ -78,11 +79,11 @@ interface VirtualMachineScaleSetsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetUpdateInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginUpdate" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}") - Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetUpdateInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", method = "DELETE", hasBody = true) @@ -397,7 +398,7 @@ private ServiceResponse beginCreateOrUpdateDelegate * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineScaleSetInner object if successful. */ - public VirtualMachineScaleSetInner update(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdateInner parameters) { + public VirtualMachineScaleSetInner update(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).toBlocking().last().body(); } @@ -411,7 +412,7 @@ public VirtualMachineScaleSetInner update(String resourceGroupName, String vmSca * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdateInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters), serviceCallback); } @@ -424,7 +425,7 @@ public ServiceFuture updateAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdateInner parameters) { + public Observable updateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).map(new Func1, VirtualMachineScaleSetInner>() { @Override public VirtualMachineScaleSetInner call(ServiceResponse response) { @@ -442,7 +443,7 @@ public VirtualMachineScaleSetInner call(ServiceResponse> updateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdateInner parameters) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -472,7 +473,7 @@ public Observable> updateWithServic * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineScaleSetInner object if successful. */ - public VirtualMachineScaleSetInner beginUpdate(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdateInner parameters) { + public VirtualMachineScaleSetInner beginUpdate(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).toBlocking().single().body(); } @@ -486,7 +487,7 @@ public VirtualMachineScaleSetInner beginUpdate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdateInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters), serviceCallback); } @@ -499,7 +500,7 @@ public ServiceFuture beginUpdateAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineScaleSetInner object */ - public Observable beginUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdateInner parameters) { + public Observable beginUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).map(new Func1, VirtualMachineScaleSetInner>() { @Override public VirtualMachineScaleSetInner call(ServiceResponse response) { @@ -517,7 +518,7 @@ public VirtualMachineScaleSetInner call(ServiceResponse> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdateInner parameters) { + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } 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 3fbac623fa6..36b0d482561 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 @@ -120,7 +120,11 @@ public Observable>> listWithServic public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); 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 83d7664d18c..e8042270a7c 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 @@ -17,6 +17,9 @@ import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.compute.InstanceViewTypes; +import com.microsoft.azure.management.compute.RunCommandInput; +import com.microsoft.azure.management.compute.VirtualMachineCaptureParameters; +import com.microsoft.azure.management.compute.VirtualMachineUpdate; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -73,11 +76,11 @@ interface VirtualMachinesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines capture" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture") - Observable> capture(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineCaptureParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> capture(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineCaptureParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines beginCapture" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture") - Observable> beginCapture(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineCaptureParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginCapture(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineCaptureParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines createOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") @@ -89,11 +92,11 @@ interface VirtualMachinesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineUpdateInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines beginUpdate" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") - Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineUpdateInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", method = "DELETE", hasBody = true) @@ -185,11 +188,11 @@ interface VirtualMachinesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines runCommand" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand") - Observable> runCommand(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body RunCommandInputInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> runCommand(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body RunCommandInput parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines beginRunCommand" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand") - Observable> beginRunCommand(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body RunCommandInputInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginRunCommand(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body RunCommandInput parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines listByResourceGroupNext" }) @GET @@ -378,7 +381,7 @@ private ServiceResponse getExtensionsDe * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineCaptureResultInner object if successful. */ - public VirtualMachineCaptureResultInner capture(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters) { + public VirtualMachineCaptureResultInner capture(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { return captureWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().last().body(); } @@ -392,7 +395,7 @@ public VirtualMachineCaptureResultInner capture(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture captureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture captureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(captureWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); } @@ -405,7 +408,7 @@ public ServiceFuture captureAsync(String resou * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable captureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters) { + public Observable captureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { return captureWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1, VirtualMachineCaptureResultInner>() { @Override public VirtualMachineCaptureResultInner call(ServiceResponse response) { @@ -423,7 +426,7 @@ public VirtualMachineCaptureResultInner call(ServiceResponse> captureWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters) { + public Observable> captureWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -453,7 +456,7 @@ public Observable> captureWith * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineCaptureResultInner object if successful. */ - public VirtualMachineCaptureResultInner beginCapture(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters) { + public VirtualMachineCaptureResultInner beginCapture(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { return beginCaptureWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().single().body(); } @@ -467,7 +470,7 @@ public VirtualMachineCaptureResultInner beginCapture(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginCaptureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginCaptureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginCaptureWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); } @@ -480,7 +483,7 @@ public ServiceFuture beginCaptureAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineCaptureResultInner object */ - public Observable beginCaptureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters) { + public Observable beginCaptureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { return beginCaptureWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1, VirtualMachineCaptureResultInner>() { @Override public VirtualMachineCaptureResultInner call(ServiceResponse response) { @@ -498,7 +501,7 @@ public VirtualMachineCaptureResultInner call(ServiceResponse> beginCaptureWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters) { + public Observable> beginCaptureWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -714,7 +717,7 @@ private ServiceResponse beginCreateOrUpdateDelegate(Respons * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineInner object if successful. */ - public VirtualMachineInner update(String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { + public VirtualMachineInner update(String resourceGroupName, String vmName, VirtualMachineUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().last().body(); } @@ -728,7 +731,7 @@ public VirtualMachineInner update(String resourceGroupName, String vmName, Virtu * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String vmName, VirtualMachineUpdate parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); } @@ -741,7 +744,7 @@ public ServiceFuture updateAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateAsync(String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { + public Observable updateAsync(String resourceGroupName, String vmName, VirtualMachineUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1, VirtualMachineInner>() { @Override public VirtualMachineInner call(ServiceResponse response) { @@ -759,7 +762,7 @@ public VirtualMachineInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineUpdate parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -789,7 +792,7 @@ public Observable> updateWithServiceRespons * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineInner object if successful. */ - public VirtualMachineInner beginUpdate(String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { + public VirtualMachineInner beginUpdate(String resourceGroupName, String vmName, VirtualMachineUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().single().body(); } @@ -803,7 +806,7 @@ public VirtualMachineInner beginUpdate(String resourceGroupName, String vmName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateAsync(String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginUpdateAsync(String resourceGroupName, String vmName, VirtualMachineUpdate parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); } @@ -816,7 +819,7 @@ public ServiceFuture beginUpdateAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineInner object */ - public Observable beginUpdateAsync(String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { + public Observable beginUpdateAsync(String resourceGroupName, String vmName, VirtualMachineUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1, VirtualMachineInner>() { @Override public VirtualMachineInner call(ServiceResponse response) { @@ -834,7 +837,7 @@ public VirtualMachineInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineInner object */ - public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineUpdate parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1949,7 +1952,11 @@ public Observable>> listAvailableS public Observable>> call(Response response) { try { ServiceResponse> result = listAvailableSizesDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2736,7 +2743,7 @@ private ServiceResponse beginPerformMaintenanceDel * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the RunCommandResultInner object if successful. */ - public RunCommandResultInner runCommand(String resourceGroupName, String vmName, RunCommandInputInner parameters) { + public RunCommandResultInner runCommand(String resourceGroupName, String vmName, RunCommandInput parameters) { return runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().last().body(); } @@ -2750,7 +2757,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, RunCommandInputInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture runCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); } @@ -2763,7 +2770,7 @@ 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, RunCommandInputInner parameters) { + public Observable runCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { return runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1, RunCommandResultInner>() { @Override public RunCommandResultInner call(ServiceResponse response) { @@ -2781,7 +2788,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, RunCommandInputInner parameters) { + public Observable> runCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2811,7 +2818,7 @@ public Observable> runCommandWithServiceR * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the RunCommandResultInner object if successful. */ - public RunCommandResultInner beginRunCommand(String resourceGroupName, String vmName, RunCommandInputInner parameters) { + public RunCommandResultInner beginRunCommand(String resourceGroupName, String vmName, RunCommandInput parameters) { return beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().single().body(); } @@ -2825,7 +2832,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, RunCommandInputInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); } @@ -2838,7 +2845,7 @@ public ServiceFuture beginRunCommandAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the RunCommandResultInner object */ - public Observable beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInputInner parameters) { + public Observable beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { return beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1, RunCommandResultInner>() { @Override public RunCommandResultInner call(ServiceResponse response) { @@ -2856,7 +2863,7 @@ public RunCommandResultInner call(ServiceResponse respons * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the RunCommandResultInner object */ - public Observable> beginRunCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInputInner parameters) { + public Observable> beginRunCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); }