From c388776cf525a76cbc6309a6c1f700450ef6cf2a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 13 Mar 2018 17:42:38 -0700 Subject: [PATCH 01/15] Generated from f2f595089c0038c9109c3221d2f04f8d0019a04e (#271) Plug disks 2018-04-01 for multi api versionning --- .../azure/management/compute/AccessLevel.java | 46 +- .../ContainerServiceAgentPoolProfile.java | 150 +++ .../ContainerServiceCustomProfile.java | 43 + .../ContainerServiceDiagnosticsProfile.java | 43 + .../compute/ContainerServiceLinuxProfile.java | 69 ++ .../ContainerServiceMasterProfile.java | 85 ++ .../ContainerServiceOrchestratorProfile.java | 45 + .../ContainerServiceOrchestratorTypes.java | 59 ++ ...ntainerServiceServicePrincipalProfile.java | 70 ++ .../ContainerServiceSshConfiguration.java | 44 + .../compute/ContainerServiceSshPublicKey.java | 44 + .../ContainerServiceVMDiagnostics.java | 58 + .../compute/ContainerServiceVMSizeTypes.java | 176 ++++ .../ContainerServiceWindowsProfile.java | 69 ++ .../management/compute/CreationData.java | 7 +- .../azure/management/compute/DataDisk.java | 27 + .../management/compute/DiskCreateOption.java | 59 +- .../compute/DiskCreateOptionTypes.java | 50 +- .../azure/management/compute/DiskSku.java | 2 +- .../management/compute/HardwareProfile.java | 60 +- .../compute/ImageStorageProfile.java | 28 + .../management/compute/IntervalInMins.java | 59 ++ .../compute/LogAnalyticsInputBase.java | 175 ++++ .../compute/LogAnalyticsOutput.java | 32 + .../azure/management/compute/OSDisk.java | 27 + .../compute/ResourceIdentityType.java | 2 +- .../compute/ResourceSkuRestrictionInfo.java | 48 + .../compute/ResourceSkuRestrictions.java | 17 +- .../compute/ResourceSkuRestrictionsType.java | 1 + .../azure/management/compute/SnapshotSku.java | 59 ++ .../compute/SnapshotStorageAccountTypes.java | 44 + .../compute/StorageAccountTypes.java | 54 +- .../compute/VirtualMachineIdentity.java | 1 + .../compute/VirtualMachinePriorityTypes.java | 41 + .../VirtualMachineScaleSetDataDisk.java | 27 + .../VirtualMachineScaleSetIdentity.java | 1 + .../compute/VirtualMachineScaleSetOSDisk.java | 27 + .../VirtualMachineScaleSetUpdateOSDisk.java | 27 + .../VirtualMachineScaleSetVMProfile.java | 28 + .../compute/VirtualMachineSizeTypes.java | 207 ++++ .../ComputeManagementClientImpl.java | 42 +- .../implementation/ContainerServiceInner.java | 253 +++++ .../ContainerServicesInner.java | 988 ++++++++++++++++++ .../compute/implementation/DisksInner.java | 114 +- .../implementation/LogAnalyticsInner.java | 382 +++++++ .../LogAnalyticsOperationResultInner.java | 33 + .../RecoveryWalkResponseInner.java | 48 + .../RequestRateByIntervalInputInner.java | 47 + .../compute/implementation/SnapshotInner.java | 8 +- .../implementation/SnapshotsInner.java | 114 +- .../ThrottledRequestsInputInner.java | 17 + .../implementation/VirtualMachineInner.java | 5 +- .../VirtualMachineInstanceViewInner.java | 341 ++++++ .../VirtualMachineRunCommandsInner.java | 4 +- .../VirtualMachineScaleSetInner.java | 53 + ...hineScaleSetNetworkConfigurationInner.java | 26 + ...aleSetUpdateNetworkConfigurationInner.java | 26 + .../VirtualMachineScaleSetVMInner.java | 5 +- ...ualMachineScaleSetVMInstanceViewInner.java | 27 + .../VirtualMachineScaleSetVMsInner.java | 541 ++++++++++ .../VirtualMachineScaleSetsInner.java | 952 +++++++++++++++-- .../implementation/VirtualMachinesInner.java | 35 +- 62 files changed, 5765 insertions(+), 407 deletions(-) create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceAgentPoolProfile.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceCustomProfile.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceDiagnosticsProfile.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceLinuxProfile.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceMasterProfile.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceOrchestratorProfile.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceOrchestratorTypes.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceServicePrincipalProfile.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceSshConfiguration.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceSshPublicKey.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceVMDiagnostics.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceVMSizeTypes.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceWindowsProfile.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/IntervalInMins.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsInputBase.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsOutput.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictionInfo.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotSku.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotStorageAccountTypes.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinePriorityTypes.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ContainerServiceInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ContainerServicesInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsOperationResultInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RecoveryWalkResponseInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RequestRateByIntervalInputInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ThrottledRequestsInputInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AccessLevel.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AccessLevel.java index c2dbf143ca9..47876604914 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AccessLevel.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AccessLevel.java @@ -8,46 +8,34 @@ package com.microsoft.azure.management.compute; +import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for AccessLevel. */ -public enum AccessLevel { - /** Enum value None. */ - NONE("None"), +public final class AccessLevel extends ExpandableStringEnum { + /** Static value None for AccessLevel. */ + public static final AccessLevel NONE = fromString("None"); - /** Enum value Read. */ - READ("Read"); - - /** The actual serialized value for a AccessLevel instance. */ - private String value; - - AccessLevel(String value) { - this.value = value; - } + /** Static value Read for AccessLevel. */ + public static final AccessLevel READ = fromString("Read"); /** - * Parses a serialized value to a AccessLevel instance. - * - * @param value the serialized value to parse. - * @return the parsed AccessLevel object, or null if unable to parse. + * Creates or finds a AccessLevel from its string representation. + * @param name a name to look for + * @return the corresponding AccessLevel */ @JsonCreator - public static AccessLevel fromString(String value) { - AccessLevel[] items = AccessLevel.values(); - for (AccessLevel item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static AccessLevel fromString(String name) { + return fromString(name, AccessLevel.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** + * @return known AccessLevel values + */ + public static Collection values() { + return values(AccessLevel.class); } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceAgentPoolProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceAgentPoolProfile.java new file mode 100644 index 00000000000..3ed5dcb12d2 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceAgentPoolProfile.java @@ -0,0 +1,150 @@ +/** + * 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; + +/** + * Profile for the container service agent pool. + */ +public class ContainerServiceAgentPoolProfile { + /** + * Unique name of the agent pool profile in the context of the subscription + * and resource group. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Number of agents (VMs) to host docker containers. Allowed values must be + * in the range of 1 to 100 (inclusive). The default value is 1. + */ + @JsonProperty(value = "count", required = true) + private int count; + + /** + * Size of agent VMs. Possible values include: 'Standard_A0', + * 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', + * 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + * 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', + * 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', + * 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', + * 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', + * 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + * 'Standard_D14_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', + * 'Standard_G4', 'Standard_G5', 'Standard_DS1', 'Standard_DS2', + * 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + * 'Standard_DS13', 'Standard_DS14', 'Standard_GS1', 'Standard_GS2', + * 'Standard_GS3', 'Standard_GS4', 'Standard_GS5'. + */ + @JsonProperty(value = "vmSize", required = true) + private ContainerServiceVMSizeTypes vmSize; + + /** + * DNS prefix to be used to create the FQDN for the agent pool. + */ + @JsonProperty(value = "dnsPrefix", required = true) + private String dnsPrefix; + + /** + * FDQN for the agent pool. + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get the count value. + * + * @return the count value + */ + public int count() { + return this.count; + } + + /** + * Set the count value. + * + * @param count the count value to set + * @return the ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withCount(int count) { + this.count = count; + return this; + } + + /** + * Get the vmSize value. + * + * @return the vmSize value + */ + public ContainerServiceVMSizeTypes vmSize() { + return this.vmSize; + } + + /** + * Set the vmSize value. + * + * @param vmSize the vmSize value to set + * @return the ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withVmSize(ContainerServiceVMSizeTypes vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get the dnsPrefix value. + * + * @return the dnsPrefix value + */ + public String dnsPrefix() { + return this.dnsPrefix; + } + + /** + * Set the dnsPrefix value. + * + * @param dnsPrefix the dnsPrefix value to set + * @return the ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withDnsPrefix(String dnsPrefix) { + this.dnsPrefix = dnsPrefix; + return this; + } + + /** + * Get the fqdn value. + * + * @return the fqdn value + */ + public String fqdn() { + return this.fqdn; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceCustomProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceCustomProfile.java new file mode 100644 index 00000000000..6293f6d1853 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceCustomProfile.java @@ -0,0 +1,43 @@ +/** + * 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; + +/** + * Properties to configure a custom container service cluster. + */ +public class ContainerServiceCustomProfile { + /** + * The name of the custom orchestrator to use. + */ + @JsonProperty(value = "orchestrator", required = true) + private String orchestrator; + + /** + * Get the orchestrator value. + * + * @return the orchestrator value + */ + public String orchestrator() { + return this.orchestrator; + } + + /** + * Set the orchestrator value. + * + * @param orchestrator the orchestrator value to set + * @return the ContainerServiceCustomProfile object itself. + */ + public ContainerServiceCustomProfile withOrchestrator(String orchestrator) { + this.orchestrator = orchestrator; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceDiagnosticsProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceDiagnosticsProfile.java new file mode 100644 index 00000000000..5b978c124ab --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceDiagnosticsProfile.java @@ -0,0 +1,43 @@ +/** + * 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 ContainerServiceDiagnosticsProfile model. + */ +public class ContainerServiceDiagnosticsProfile { + /** + * Profile for the container service VM diagnostic agent. + */ + @JsonProperty(value = "vmDiagnostics", required = true) + private ContainerServiceVMDiagnostics vmDiagnostics; + + /** + * Get the vmDiagnostics value. + * + * @return the vmDiagnostics value + */ + public ContainerServiceVMDiagnostics vmDiagnostics() { + return this.vmDiagnostics; + } + + /** + * Set the vmDiagnostics value. + * + * @param vmDiagnostics the vmDiagnostics value to set + * @return the ContainerServiceDiagnosticsProfile object itself. + */ + public ContainerServiceDiagnosticsProfile withVmDiagnostics(ContainerServiceVMDiagnostics vmDiagnostics) { + this.vmDiagnostics = vmDiagnostics; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceLinuxProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceLinuxProfile.java new file mode 100644 index 00000000000..5d3e07099aa --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceLinuxProfile.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; + +/** + * Profile for Linux VMs in the container service cluster. + */ +public class ContainerServiceLinuxProfile { + /** + * The administrator username to use for Linux VMs. + */ + @JsonProperty(value = "adminUsername", required = true) + private String adminUsername; + + /** + * The ssh key configuration for Linux VMs. + */ + @JsonProperty(value = "ssh", required = true) + private ContainerServiceSshConfiguration ssh; + + /** + * Get the adminUsername value. + * + * @return the adminUsername value + */ + public String adminUsername() { + return this.adminUsername; + } + + /** + * Set the adminUsername value. + * + * @param adminUsername the adminUsername value to set + * @return the ContainerServiceLinuxProfile object itself. + */ + public ContainerServiceLinuxProfile withAdminUsername(String adminUsername) { + this.adminUsername = adminUsername; + return this; + } + + /** + * Get the ssh value. + * + * @return the ssh value + */ + public ContainerServiceSshConfiguration ssh() { + return this.ssh; + } + + /** + * Set the ssh value. + * + * @param ssh the ssh value to set + * @return the ContainerServiceLinuxProfile object itself. + */ + public ContainerServiceLinuxProfile withSsh(ContainerServiceSshConfiguration ssh) { + this.ssh = ssh; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceMasterProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceMasterProfile.java new file mode 100644 index 00000000000..23f1b81dd61 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceMasterProfile.java @@ -0,0 +1,85 @@ +/** + * 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; + +/** + * Profile for the container service master. + */ +public class ContainerServiceMasterProfile { + /** + * Number of masters (VMs) in the container service cluster. Allowed values + * are 1, 3, and 5. The default value is 1. + */ + @JsonProperty(value = "count") + private Integer count; + + /** + * DNS prefix to be used to create the FQDN for master. + */ + @JsonProperty(value = "dnsPrefix", required = true) + private String dnsPrefix; + + /** + * FDQN for the master. + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /** + * Get the count value. + * + * @return the count value + */ + public Integer count() { + return this.count; + } + + /** + * Set the count value. + * + * @param count the count value to set + * @return the ContainerServiceMasterProfile object itself. + */ + public ContainerServiceMasterProfile withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the dnsPrefix value. + * + * @return the dnsPrefix value + */ + public String dnsPrefix() { + return this.dnsPrefix; + } + + /** + * Set the dnsPrefix value. + * + * @param dnsPrefix the dnsPrefix value to set + * @return the ContainerServiceMasterProfile object itself. + */ + public ContainerServiceMasterProfile withDnsPrefix(String dnsPrefix) { + this.dnsPrefix = dnsPrefix; + return this; + } + + /** + * Get the fqdn value. + * + * @return the fqdn value + */ + public String fqdn() { + return this.fqdn; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceOrchestratorProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceOrchestratorProfile.java new file mode 100644 index 00000000000..60b0548b243 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceOrchestratorProfile.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; + +/** + * Profile for the container service orchestrator. + */ +public class ContainerServiceOrchestratorProfile { + /** + * The orchestrator to use to manage container service cluster resources. + * Valid values are Swarm, DCOS, and Custom. Possible values include: + * 'Swarm', 'DCOS', 'Custom', 'Kubernetes'. + */ + @JsonProperty(value = "orchestratorType", required = true) + private ContainerServiceOrchestratorTypes orchestratorType; + + /** + * Get the orchestratorType value. + * + * @return the orchestratorType value + */ + public ContainerServiceOrchestratorTypes orchestratorType() { + return this.orchestratorType; + } + + /** + * Set the orchestratorType value. + * + * @param orchestratorType the orchestratorType value to set + * @return the ContainerServiceOrchestratorProfile object itself. + */ + public ContainerServiceOrchestratorProfile withOrchestratorType(ContainerServiceOrchestratorTypes orchestratorType) { + this.orchestratorType = orchestratorType; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceOrchestratorTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceOrchestratorTypes.java new file mode 100644 index 00000000000..e198da419d0 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceOrchestratorTypes.java @@ -0,0 +1,59 @@ +/** + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ContainerServiceOrchestratorTypes. + */ +public enum ContainerServiceOrchestratorTypes { + /** Enum value Swarm. */ + SWARM("Swarm"), + + /** Enum value DCOS. */ + DCOS("DCOS"), + + /** Enum value Custom. */ + CUSTOM("Custom"), + + /** Enum value Kubernetes. */ + KUBERNETES("Kubernetes"); + + /** The actual serialized value for a ContainerServiceOrchestratorTypes instance. */ + private String value; + + ContainerServiceOrchestratorTypes(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ContainerServiceOrchestratorTypes instance. + * + * @param value the serialized value to parse. + * @return the parsed ContainerServiceOrchestratorTypes object, or null if unable to parse. + */ + @JsonCreator + public static ContainerServiceOrchestratorTypes fromString(String value) { + ContainerServiceOrchestratorTypes[] items = ContainerServiceOrchestratorTypes.values(); + for (ContainerServiceOrchestratorTypes item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceServicePrincipalProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceServicePrincipalProfile.java new file mode 100644 index 00000000000..42b61092668 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceServicePrincipalProfile.java @@ -0,0 +1,70 @@ +/** + * 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; + +/** + * Information about a service principal identity for the cluster to use for + * manipulating Azure APIs. + */ +public class ContainerServiceServicePrincipalProfile { + /** + * The ID for the service principal. + */ + @JsonProperty(value = "clientId", required = true) + private String clientId; + + /** + * The secret password associated with the service principal. + */ + @JsonProperty(value = "secret", required = true) + private String secret; + + /** + * Get the clientId value. + * + * @return the clientId value + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId value. + * + * @param clientId the clientId value to set + * @return the ContainerServiceServicePrincipalProfile object itself. + */ + public ContainerServiceServicePrincipalProfile withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the secret value. + * + * @return the secret value + */ + public String secret() { + return this.secret; + } + + /** + * Set the secret value. + * + * @param secret the secret value to set + * @return the ContainerServiceServicePrincipalProfile object itself. + */ + public ContainerServiceServicePrincipalProfile withSecret(String secret) { + this.secret = secret; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceSshConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceSshConfiguration.java new file mode 100644 index 00000000000..d566d7b4c3c --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceSshConfiguration.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 java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SSH configuration for Linux-based VMs running on Azure. + */ +public class ContainerServiceSshConfiguration { + /** + * the list of SSH public keys used to authenticate with Linux-based VMs. + */ + @JsonProperty(value = "publicKeys", required = true) + private List publicKeys; + + /** + * Get the publicKeys value. + * + * @return the publicKeys value + */ + public List publicKeys() { + return this.publicKeys; + } + + /** + * Set the publicKeys value. + * + * @param publicKeys the publicKeys value to set + * @return the ContainerServiceSshConfiguration object itself. + */ + public ContainerServiceSshConfiguration withPublicKeys(List publicKeys) { + this.publicKeys = publicKeys; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceSshPublicKey.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceSshPublicKey.java new file mode 100644 index 00000000000..a7b769a92ee --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceSshPublicKey.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; + +/** + * Contains information about SSH certificate public key data. + */ +public class ContainerServiceSshPublicKey { + /** + * Certificate public key used to authenticate with VMs through SSH. The + * certificate must be in PEM format with or without headers. + */ + @JsonProperty(value = "keyData", required = true) + private String keyData; + + /** + * Get the keyData value. + * + * @return the keyData value + */ + public String keyData() { + return this.keyData; + } + + /** + * Set the keyData value. + * + * @param keyData the keyData value to set + * @return the ContainerServiceSshPublicKey object itself. + */ + public ContainerServiceSshPublicKey withKeyData(String keyData) { + this.keyData = keyData; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceVMDiagnostics.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceVMDiagnostics.java new file mode 100644 index 00000000000..c035c63fe9f --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceVMDiagnostics.java @@ -0,0 +1,58 @@ +/** + * 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; + +/** + * Profile for diagnostics on the container service VMs. + */ +public class ContainerServiceVMDiagnostics { + /** + * Whether the VM diagnostic agent is provisioned on the VM. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /** + * The URI of the storage account where diagnostics are stored. + */ + @JsonProperty(value = "storageUri", access = JsonProperty.Access.WRITE_ONLY) + private String storageUri; + + /** + * Get the enabled value. + * + * @return the enabled value + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled value. + * + * @param enabled the enabled value to set + * @return the ContainerServiceVMDiagnostics object itself. + */ + public ContainerServiceVMDiagnostics withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the storageUri value. + * + * @return the storageUri value + */ + public String storageUri() { + return this.storageUri; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceVMSizeTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceVMSizeTypes.java new file mode 100644 index 00000000000..c64b4ad93e1 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceVMSizeTypes.java @@ -0,0 +1,176 @@ +/** + * 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.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ContainerServiceVMSizeTypes. + */ +public final class ContainerServiceVMSizeTypes extends ExpandableStringEnum { + /** Static value Standard_A0 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A0 = fromString("Standard_A0"); + + /** Static value Standard_A1 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A1 = fromString("Standard_A1"); + + /** Static value Standard_A2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A2 = fromString("Standard_A2"); + + /** Static value Standard_A3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A3 = fromString("Standard_A3"); + + /** Static value Standard_A4 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A4 = fromString("Standard_A4"); + + /** Static value Standard_A5 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A5 = fromString("Standard_A5"); + + /** Static value Standard_A6 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A6 = fromString("Standard_A6"); + + /** Static value Standard_A7 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A7 = fromString("Standard_A7"); + + /** Static value Standard_A8 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A8 = fromString("Standard_A8"); + + /** Static value Standard_A9 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A9 = fromString("Standard_A9"); + + /** Static value Standard_A10 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A10 = fromString("Standard_A10"); + + /** Static value Standard_A11 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_A11 = fromString("Standard_A11"); + + /** Static value Standard_D1 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D1 = fromString("Standard_D1"); + + /** Static value Standard_D2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D2 = fromString("Standard_D2"); + + /** Static value Standard_D3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D3 = fromString("Standard_D3"); + + /** Static value Standard_D4 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D4 = fromString("Standard_D4"); + + /** Static value Standard_D11 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D11 = fromString("Standard_D11"); + + /** Static value Standard_D12 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D12 = fromString("Standard_D12"); + + /** Static value Standard_D13 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D13 = fromString("Standard_D13"); + + /** Static value Standard_D14 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D14 = fromString("Standard_D14"); + + /** Static value Standard_D1_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D1_V2 = fromString("Standard_D1_v2"); + + /** Static value Standard_D2_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D2_V2 = fromString("Standard_D2_v2"); + + /** Static value Standard_D3_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D3_V2 = fromString("Standard_D3_v2"); + + /** Static value Standard_D4_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D4_V2 = fromString("Standard_D4_v2"); + + /** Static value Standard_D5_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D5_V2 = fromString("Standard_D5_v2"); + + /** Static value Standard_D11_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D11_V2 = fromString("Standard_D11_v2"); + + /** Static value Standard_D12_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D12_V2 = fromString("Standard_D12_v2"); + + /** Static value Standard_D13_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D13_V2 = fromString("Standard_D13_v2"); + + /** Static value Standard_D14_v2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_D14_V2 = fromString("Standard_D14_v2"); + + /** Static value Standard_G1 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_G1 = fromString("Standard_G1"); + + /** Static value Standard_G2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_G2 = fromString("Standard_G2"); + + /** Static value Standard_G3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_G3 = fromString("Standard_G3"); + + /** Static value Standard_G4 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_G4 = fromString("Standard_G4"); + + /** Static value Standard_G5 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_G5 = fromString("Standard_G5"); + + /** Static value Standard_DS1 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS1 = fromString("Standard_DS1"); + + /** Static value Standard_DS2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS2 = fromString("Standard_DS2"); + + /** Static value Standard_DS3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS3 = fromString("Standard_DS3"); + + /** Static value Standard_DS4 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS4 = fromString("Standard_DS4"); + + /** Static value Standard_DS11 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS11 = fromString("Standard_DS11"); + + /** Static value Standard_DS12 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS12 = fromString("Standard_DS12"); + + /** Static value Standard_DS13 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS13 = fromString("Standard_DS13"); + + /** Static value Standard_DS14 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_DS14 = fromString("Standard_DS14"); + + /** Static value Standard_GS1 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_GS1 = fromString("Standard_GS1"); + + /** Static value Standard_GS2 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_GS2 = fromString("Standard_GS2"); + + /** Static value Standard_GS3 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_GS3 = fromString("Standard_GS3"); + + /** Static value Standard_GS4 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_GS4 = fromString("Standard_GS4"); + + /** Static value Standard_GS5 for ContainerServiceVMSizeTypes. */ + public static final ContainerServiceVMSizeTypes STANDARD_GS5 = fromString("Standard_GS5"); + + /** + * Creates or finds a ContainerServiceVMSizeTypes from its string representation. + * @param name a name to look for + * @return the corresponding ContainerServiceVMSizeTypes + */ + @JsonCreator + public static ContainerServiceVMSizeTypes fromString(String name) { + return fromString(name, ContainerServiceVMSizeTypes.class); + } + + /** + * @return known ContainerServiceVMSizeTypes values + */ + public static Collection values() { + return values(ContainerServiceVMSizeTypes.class); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceWindowsProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceWindowsProfile.java new file mode 100644 index 00000000000..70adffeb299 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceWindowsProfile.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; + +/** + * Profile for Windows VMs in the container service cluster. + */ +public class ContainerServiceWindowsProfile { + /** + * The administrator username to use for Windows VMs. + */ + @JsonProperty(value = "adminUsername", required = true) + private String adminUsername; + + /** + * The administrator password to use for Windows VMs. + */ + @JsonProperty(value = "adminPassword", required = true) + private String adminPassword; + + /** + * Get the adminUsername value. + * + * @return the adminUsername value + */ + public String adminUsername() { + return this.adminUsername; + } + + /** + * Set the adminUsername value. + * + * @param adminUsername the adminUsername value to set + * @return the ContainerServiceWindowsProfile object itself. + */ + public ContainerServiceWindowsProfile withAdminUsername(String adminUsername) { + this.adminUsername = adminUsername; + return this; + } + + /** + * Get the adminPassword value. + * + * @return the adminPassword value + */ + public String adminPassword() { + return this.adminPassword; + } + + /** + * Set the adminPassword value. + * + * @param adminPassword the adminPassword value to set + * @return the ContainerServiceWindowsProfile object itself. + */ + public ContainerServiceWindowsProfile withAdminPassword(String adminPassword) { + this.adminPassword = adminPassword; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java index 146a70f1873..3a4a97be686 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java @@ -16,7 +16,8 @@ public class CreationData { /** * This enumerates the possible sources of a disk's creation. Possible - * values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy'. + * values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', + * 'Restore'. */ @JsonProperty(value = "createOption", required = true) private DiskCreateOption createOption; @@ -36,8 +37,8 @@ public class CreationData { private ImageDiskReference imageReference; /** - * If creationOption is Import, this is the URI of a blob to be imported - * into a managed disk. + * If createOption is Import, this is the URI of a blob to be imported into + * a managed disk. */ @JsonProperty(value = "sourceUri") private String sourceUri; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java index 66cb552f26d..f937855d07f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java @@ -53,6 +53,13 @@ public class DataDisk { @JsonProperty(value = "caching") private CachingTypes caching; + /** + * Specifies whether writeAccelerator should be enabled or disabled on the + * disk. + */ + @JsonProperty(value = "writeAcceleratorEnabled") + private Boolean writeAcceleratorEnabled; + /** * Specifies how the virtual machine should be created.<br><br> * Possible values are:<br><br> **Attach** \u2013 This value is @@ -181,6 +188,26 @@ public DataDisk withCaching(CachingTypes caching) { return this; } + /** + * Get the writeAcceleratorEnabled value. + * + * @return the writeAcceleratorEnabled value + */ + public Boolean writeAcceleratorEnabled() { + return this.writeAcceleratorEnabled; + } + + /** + * Set the writeAcceleratorEnabled value. + * + * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set + * @return the DataDisk object itself. + */ + public DataDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) { + this.writeAcceleratorEnabled = writeAcceleratorEnabled; + return this; + } + /** * Get the createOption value. * diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOption.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOption.java index 903fd7cbca9..98c18c3d144 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOption.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOption.java @@ -8,55 +8,46 @@ package com.microsoft.azure.management.compute; +import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for DiskCreateOption. */ -public enum DiskCreateOption { - /** Enum value Empty. */ - EMPTY("Empty"), +public final class DiskCreateOption extends ExpandableStringEnum { + /** Static value Empty for DiskCreateOption. */ + public static final DiskCreateOption EMPTY = fromString("Empty"); - /** Enum value Attach. */ - ATTACH("Attach"), + /** Static value Attach for DiskCreateOption. */ + public static final DiskCreateOption ATTACH = fromString("Attach"); - /** Enum value FromImage. */ - FROM_IMAGE("FromImage"), + /** Static value FromImage for DiskCreateOption. */ + public static final DiskCreateOption FROM_IMAGE = fromString("FromImage"); - /** Enum value Import. */ - IMPORT("Import"), + /** Static value Import for DiskCreateOption. */ + public static final DiskCreateOption IMPORT = fromString("Import"); - /** Enum value Copy. */ - COPY("Copy"); + /** Static value Copy for DiskCreateOption. */ + public static final DiskCreateOption COPY = fromString("Copy"); - /** The actual serialized value for a DiskCreateOption instance. */ - private String value; - - DiskCreateOption(String value) { - this.value = value; - } + /** Static value Restore for DiskCreateOption. */ + public static final DiskCreateOption RESTORE = fromString("Restore"); /** - * Parses a serialized value to a DiskCreateOption instance. - * - * @param value the serialized value to parse. - * @return the parsed DiskCreateOption object, or null if unable to parse. + * Creates or finds a DiskCreateOption from its string representation. + * @param name a name to look for + * @return the corresponding DiskCreateOption */ @JsonCreator - public static DiskCreateOption fromString(String value) { - DiskCreateOption[] items = DiskCreateOption.values(); - for (DiskCreateOption item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static DiskCreateOption fromString(String name) { + return fromString(name, DiskCreateOption.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** + * @return known DiskCreateOption values + */ + public static Collection values() { + return values(DiskCreateOption.class); } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOptionTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOptionTypes.java index b8c17affbbe..66781dc00fe 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOptionTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOptionTypes.java @@ -8,49 +8,37 @@ package com.microsoft.azure.management.compute; +import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for DiskCreateOptionTypes. */ -public enum DiskCreateOptionTypes { - /** Enum value FromImage. */ - FROM_IMAGE("FromImage"), +public final class DiskCreateOptionTypes extends ExpandableStringEnum { + /** Static value FromImage for DiskCreateOptionTypes. */ + public static final DiskCreateOptionTypes FROM_IMAGE = fromString("FromImage"); - /** Enum value Empty. */ - EMPTY("Empty"), + /** Static value Empty for DiskCreateOptionTypes. */ + public static final DiskCreateOptionTypes EMPTY = fromString("Empty"); - /** Enum value Attach. */ - ATTACH("Attach"); - - /** The actual serialized value for a DiskCreateOptionTypes instance. */ - private String value; - - DiskCreateOptionTypes(String value) { - this.value = value; - } + /** Static value Attach for DiskCreateOptionTypes. */ + public static final DiskCreateOptionTypes ATTACH = fromString("Attach"); /** - * Parses a serialized value to a DiskCreateOptionTypes instance. - * - * @param value the serialized value to parse. - * @return the parsed DiskCreateOptionTypes object, or null if unable to parse. + * Creates or finds a DiskCreateOptionTypes from its string representation. + * @param name a name to look for + * @return the corresponding DiskCreateOptionTypes */ @JsonCreator - public static DiskCreateOptionTypes fromString(String value) { - DiskCreateOptionTypes[] items = DiskCreateOptionTypes.values(); - for (DiskCreateOptionTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static DiskCreateOptionTypes fromString(String name) { + return fromString(name, DiskCreateOptionTypes.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** + * @return known DiskCreateOptionTypes values + */ + public static Collection values() { + return values(DiskCreateOptionTypes.class); } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java index 39b94bcaf85..b42552ed482 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * The disks and snapshots sku name. Can be Standard_LRS or Premium_LRS. + * The disks sku name. Can be Standard_LRS or Premium_LRS. */ public class DiskSku { /** diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java index 88c92002d66..70ea72443eb 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java @@ -31,26 +31,48 @@ public class HardwareProfile { * 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', * 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', * 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', - * 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_D1', - * 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', - * 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', - * 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', - * 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - * 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - * 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - * 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - * 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', - * 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', - * 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_F1', 'Standard_F2', - * 'Standard_F4', 'Standard_F8', 'Standard_F16', 'Standard_F1s', - * 'Standard_F2s', 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', - * 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', - * 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', - * 'Standard_GS4', 'Standard_GS5', 'Standard_H8', 'Standard_H16', - * 'Standard_H8m', 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', - * 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', + * 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', + * 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', + * 'Standard_B8ms', 'Standard_D1', 'Standard_D2', 'Standard_D3', + * 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', + * 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', + * 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', + * 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', + * 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', + * 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', + * 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', + * 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', + * 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', + * 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', + * 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', + * 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', + * 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', + * 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', + * 'Standard_DS14-4_v2', 'Standard_E2_v3', 'Standard_E4_v3', + * 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', + * 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', + * 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E32s_v3', + * 'Standard_E64s_v3', 'Standard_E32-16_v3', 'Standard_E32-8s_v3', + * 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', 'Standard_F1', + * 'Standard_F2', 'Standard_F4', 'Standard_F8', 'Standard_F16', + * 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', 'Standard_F8s', + * 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', + * 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', + * 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', + * 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + * 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + * 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + * 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + * 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + * 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + * 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + * 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', * 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - * 'Standard_NV6', 'Standard_NV12', 'Standard_NV24'. + * 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + * 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + * 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + * 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + * 'Standard_NV12', 'Standard_NV24'. */ @JsonProperty(value = "vmSize") private VirtualMachineSizeTypes vmSize; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java index 616a6d8e130..ba07ddb38d0 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java @@ -33,6 +33,14 @@ public class ImageStorageProfile { @JsonProperty(value = "dataDisks") private List dataDisks; + /** + * Specifies whether an image is zone resilient or not. Default is false. + * Zone resilient images can be created only in regions that provide Zone + * Redundant Storage (ZRS). + */ + @JsonProperty(value = "zoneResilient") + private Boolean zoneResilient; + /** * Get the osDisk value. * @@ -73,4 +81,24 @@ public ImageStorageProfile withDataDisks(List dataDisks) { return this; } + /** + * Get the zoneResilient value. + * + * @return the zoneResilient value + */ + public Boolean zoneResilient() { + return this.zoneResilient; + } + + /** + * Set the zoneResilient value. + * + * @param zoneResilient the zoneResilient value to set + * @return the ImageStorageProfile object itself. + */ + public ImageStorageProfile withZoneResilient(Boolean zoneResilient) { + this.zoneResilient = zoneResilient; + return this; + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/IntervalInMins.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/IntervalInMins.java new file mode 100644 index 00000000000..80bfad9437d --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/IntervalInMins.java @@ -0,0 +1,59 @@ +/** + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for IntervalInMins. + */ +public enum IntervalInMins { + /** Enum value ThreeMins. */ + THREE_MINS("ThreeMins"), + + /** Enum value FiveMins. */ + FIVE_MINS("FiveMins"), + + /** Enum value ThirtyMins. */ + THIRTY_MINS("ThirtyMins"), + + /** Enum value SixtyMins. */ + SIXTY_MINS("SixtyMins"); + + /** The actual serialized value for a IntervalInMins instance. */ + private String value; + + IntervalInMins(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a IntervalInMins instance. + * + * @param value the serialized value to parse. + * @return the parsed IntervalInMins object, or null if unable to parse. + */ + @JsonCreator + public static IntervalInMins fromString(String value) { + IntervalInMins[] items = IntervalInMins.values(); + for (IntervalInMins item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsInputBase.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsInputBase.java new file mode 100644 index 00000000000..ea7bb1f06a3 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsInputBase.java @@ -0,0 +1,175 @@ +/** + * 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 org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Api input base class for LogAnalytics Api. + */ +public class LogAnalyticsInputBase { + /** + * SAS Uri of the logging blob container to which LogAnalytics Api writes + * output logs to. + */ + @JsonProperty(value = "blobContainerSasUri", required = true) + private String blobContainerSasUri; + + /** + * From time of the query. + */ + @JsonProperty(value = "fromTime", required = true) + private DateTime fromTime; + + /** + * To time of the query. + */ + @JsonProperty(value = "toTime", required = true) + private DateTime toTime; + + /** + * Group query result by Throttle Policy applied. + */ + @JsonProperty(value = "groupByThrottlePolicy") + private Boolean groupByThrottlePolicy; + + /** + * Group query result by by Operation Name. + */ + @JsonProperty(value = "groupByOperationName") + private Boolean groupByOperationName; + + /** + * Group query result by Resource Name. + */ + @JsonProperty(value = "groupByResourceName") + private Boolean groupByResourceName; + + /** + * Get the blobContainerSasUri value. + * + * @return the blobContainerSasUri value + */ + public String blobContainerSasUri() { + return this.blobContainerSasUri; + } + + /** + * Set the blobContainerSasUri value. + * + * @param blobContainerSasUri the blobContainerSasUri value to set + * @return the LogAnalyticsInputBase object itself. + */ + public LogAnalyticsInputBase withBlobContainerSasUri(String blobContainerSasUri) { + this.blobContainerSasUri = blobContainerSasUri; + return this; + } + + /** + * Get the fromTime value. + * + * @return the fromTime value + */ + public DateTime fromTime() { + return this.fromTime; + } + + /** + * Set the fromTime value. + * + * @param fromTime the fromTime value to set + * @return the LogAnalyticsInputBase object itself. + */ + public LogAnalyticsInputBase withFromTime(DateTime fromTime) { + this.fromTime = fromTime; + return this; + } + + /** + * Get the toTime value. + * + * @return the toTime value + */ + public DateTime toTime() { + return this.toTime; + } + + /** + * Set the toTime value. + * + * @param toTime the toTime value to set + * @return the LogAnalyticsInputBase object itself. + */ + public LogAnalyticsInputBase withToTime(DateTime toTime) { + this.toTime = toTime; + return this; + } + + /** + * Get the groupByThrottlePolicy value. + * + * @return the groupByThrottlePolicy value + */ + public Boolean groupByThrottlePolicy() { + return this.groupByThrottlePolicy; + } + + /** + * Set the groupByThrottlePolicy value. + * + * @param groupByThrottlePolicy the groupByThrottlePolicy value to set + * @return the LogAnalyticsInputBase object itself. + */ + public LogAnalyticsInputBase withGroupByThrottlePolicy(Boolean groupByThrottlePolicy) { + this.groupByThrottlePolicy = groupByThrottlePolicy; + return this; + } + + /** + * Get the groupByOperationName value. + * + * @return the groupByOperationName value + */ + public Boolean groupByOperationName() { + return this.groupByOperationName; + } + + /** + * Set the groupByOperationName value. + * + * @param groupByOperationName the groupByOperationName value to set + * @return the LogAnalyticsInputBase object itself. + */ + public LogAnalyticsInputBase withGroupByOperationName(Boolean groupByOperationName) { + this.groupByOperationName = groupByOperationName; + return this; + } + + /** + * Get the groupByResourceName value. + * + * @return the groupByResourceName value + */ + public Boolean groupByResourceName() { + return this.groupByResourceName; + } + + /** + * Set the groupByResourceName value. + * + * @param groupByResourceName the groupByResourceName value to set + * @return the LogAnalyticsInputBase object itself. + */ + public LogAnalyticsInputBase withGroupByResourceName(Boolean groupByResourceName) { + this.groupByResourceName = groupByResourceName; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsOutput.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsOutput.java new file mode 100644 index 00000000000..e7cc3767cd5 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsOutput.java @@ -0,0 +1,32 @@ +/** + * 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; + +/** + * LogAnalytics output properties. + */ +public class LogAnalyticsOutput { + /** + * Output file Uri path to blob container. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private String output; + + /** + * Get the output value. + * + * @return the output value + */ + public String output() { + return this.output; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java index 8e598af97a3..0f6da66a142 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java @@ -65,6 +65,13 @@ public class OSDisk { @JsonProperty(value = "caching") private CachingTypes caching; + /** + * Specifies whether writeAccelerator should be enabled or disabled on the + * disk. + */ + @JsonProperty(value = "writeAcceleratorEnabled") + private Boolean writeAcceleratorEnabled; + /** * Specifies how the virtual machine should be created.<br><br> * Possible values are:<br><br> **Attach** \u2013 This value is @@ -213,6 +220,26 @@ public OSDisk withCaching(CachingTypes caching) { return this; } + /** + * Get the writeAcceleratorEnabled value. + * + * @return the writeAcceleratorEnabled value + */ + public Boolean writeAcceleratorEnabled() { + return this.writeAcceleratorEnabled; + } + + /** + * Set the writeAcceleratorEnabled value. + * + * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set + * @return the OSDisk object itself. + */ + public OSDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) { + this.writeAcceleratorEnabled = writeAcceleratorEnabled; + return this; + } + /** * Get the createOption value. * diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceIdentityType.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceIdentityType.java index 523377f9c55..071988f8454 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceIdentityType.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceIdentityType.java @@ -56,4 +56,4 @@ public static ResourceIdentityType fromString(String value) { public String toString() { return this.value; } -} \ No newline at end of file +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictionInfo.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictionInfo.java new file mode 100644 index 00000000000..3e80e2e5d9d --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictionInfo.java @@ -0,0 +1,48 @@ +/** + * 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; + +/** + * The ResourceSkuRestrictionInfo model. + */ +public class ResourceSkuRestrictionInfo { + /** + * Locations where the SKU is restricted. + */ + @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY) + private List locations; + + /** + * List of availability zones where the SKU is restricted. + */ + @JsonProperty(value = "zones", access = JsonProperty.Access.WRITE_ONLY) + private List zones; + + /** + * Get the locations value. + * + * @return the locations value + */ + public List locations() { + return this.locations; + } + + /** + * Get the zones value. + * + * @return the zones value + */ + public List zones() { + return this.zones; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictions.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictions.java index ade5567cff4..428fcbdf411 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictions.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictions.java @@ -16,7 +16,7 @@ */ public class ResourceSkuRestrictions { /** - * The type of restrictions. Possible values include: 'Location'. + * The type of restrictions. Possible values include: 'Location', 'Zone'. */ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private ResourceSkuRestrictionsType type; @@ -28,6 +28,12 @@ public class ResourceSkuRestrictions { @JsonProperty(value = "values", access = JsonProperty.Access.WRITE_ONLY) private List values; + /** + * The information about the restriction where the SKU cannot be used. + */ + @JsonProperty(value = "restrictionInfo", access = JsonProperty.Access.WRITE_ONLY) + private ResourceSkuRestrictionInfo restrictionInfo; + /** * The reason for restriction. Possible values include: 'QuotaId', * 'NotAvailableForSubscription'. @@ -53,6 +59,15 @@ public List values() { return this.values; } + /** + * Get the restrictionInfo value. + * + * @return the restrictionInfo value + */ + public ResourceSkuRestrictionInfo restrictionInfo() { + return this.restrictionInfo; + } + /** * Get the reasonCode value. * diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictionsType.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictionsType.java index d6cc5870905..60a3f131f0f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictionsType.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictionsType.java @@ -17,6 +17,7 @@ public enum ResourceSkuRestrictionsType { /** Enum value Location. */ LOCATION("Location"), + /** Enum value Zone. */ ZONE("Zone"); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotSku.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotSku.java new file mode 100644 index 00000000000..93f0786a195 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotSku.java @@ -0,0 +1,59 @@ +/** + * 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 snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. + */ +public class SnapshotSku { + /** + * The sku name. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'Standard_ZRS'. + */ + @JsonProperty(value = "name") + private SnapshotStorageAccountTypes name; + + /** + * The sku tier. + */ + @JsonProperty(value = "tier", access = JsonProperty.Access.WRITE_ONLY) + private String tier; + + /** + * Get the name value. + * + * @return the name value + */ + public SnapshotStorageAccountTypes name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the SnapshotSku object itself. + */ + public SnapshotSku withName(SnapshotStorageAccountTypes name) { + this.name = name; + return this; + } + + /** + * Get the tier value. + * + * @return the tier value + */ + public String tier() { + return this.tier; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotStorageAccountTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotStorageAccountTypes.java new file mode 100644 index 00000000000..a71f94e2763 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotStorageAccountTypes.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 java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SnapshotStorageAccountTypes. + */ +public final class SnapshotStorageAccountTypes extends ExpandableStringEnum { + /** Static value Standard_LRS for SnapshotStorageAccountTypes. */ + public static final SnapshotStorageAccountTypes STANDARD_LRS = fromString("Standard_LRS"); + + /** Static value Premium_LRS for SnapshotStorageAccountTypes. */ + public static final SnapshotStorageAccountTypes PREMIUM_LRS = fromString("Premium_LRS"); + + /** Static value Standard_ZRS for SnapshotStorageAccountTypes. */ + public static final SnapshotStorageAccountTypes STANDARD_ZRS = fromString("Standard_ZRS"); + + /** + * Creates or finds a SnapshotStorageAccountTypes from its string representation. + * @param name a name to look for + * @return the corresponding SnapshotStorageAccountTypes + */ + @JsonCreator + public static SnapshotStorageAccountTypes fromString(String name) { + return fromString(name, SnapshotStorageAccountTypes.class); + } + + /** + * @return known SnapshotStorageAccountTypes values + */ + public static Collection values() { + return values(SnapshotStorageAccountTypes.class); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageAccountTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageAccountTypes.java index 5bb870970bd..0f30ca9c570 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageAccountTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageAccountTypes.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.compute; +import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for StorageAccountTypes. */ -public enum StorageAccountTypes { - /** Enum value Standard_LRS. */ - STANDARD_LRS("Standard_LRS"), +public final class StorageAccountTypes extends ExpandableStringEnum { + /** Static value Standard_LRS for StorageAccountTypes. */ + public static final StorageAccountTypes STANDARD_LRS = fromString("Standard_LRS"); - /** Enum value Premium_LRS. */ - PREMIUM_LRS("Premium_LRS"), - - /** Enum value StandardSSD_LRS. */ - STANDARD_SSD_LRS("StandardSSD_LRS"), - - /** Enum value Standard_ZRS. */ - STANDARD_ZRS("Standard_ZRS"); - - /** The actual serialized value for a StorageAccountTypes instance. */ - private String value; - - StorageAccountTypes(String value) { - this.value = value; - } + /** Static value Premium_LRS for StorageAccountTypes. */ + public static final StorageAccountTypes PREMIUM_LRS = fromString("Premium_LRS"); /** - * Parses a serialized value to a StorageAccountTypes instance. - * - * @param value the serialized value to parse. - * @return the parsed StorageAccountTypes object, or null if unable to parse. + * Creates or finds a StorageAccountTypes from its string representation. + * @param name a name to look for + * @return the corresponding StorageAccountTypes */ @JsonCreator - public static StorageAccountTypes fromString(String value) { - StorageAccountTypes[] items = StorageAccountTypes.values(); - for (StorageAccountTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static StorageAccountTypes fromString(String name) { + return fromString(name, StorageAccountTypes.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** + * @return known StorageAccountTypes values + */ + public static Collection values() { + return values(StorageAccountTypes.class); } -} \ No newline at end of file +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineIdentity.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineIdentity.java index 8d734f6633a..46608449473 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineIdentity.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineIdentity.java @@ -105,4 +105,5 @@ public VirtualMachineIdentity withIdentityIds(List identityIds) { this.identityIds = identityIds; return this; } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinePriorityTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinePriorityTypes.java new file mode 100644 index 00000000000..5650be30127 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinePriorityTypes.java @@ -0,0 +1,41 @@ +/** + * 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.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VirtualMachinePriorityTypes. + */ +public final class VirtualMachinePriorityTypes extends ExpandableStringEnum { + /** Static value Regular for VirtualMachinePriorityTypes. */ + public static final VirtualMachinePriorityTypes REGULAR = fromString("Regular"); + + /** Static value Low for VirtualMachinePriorityTypes. */ + public static final VirtualMachinePriorityTypes LOW = fromString("Low"); + + /** + * Creates or finds a VirtualMachinePriorityTypes from its string representation. + * @param name a name to look for + * @return the corresponding VirtualMachinePriorityTypes + */ + @JsonCreator + public static VirtualMachinePriorityTypes fromString(String name) { + return fromString(name, VirtualMachinePriorityTypes.class); + } + + /** + * @return known VirtualMachinePriorityTypes values + */ + public static Collection values() { + return values(VirtualMachinePriorityTypes.class); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetDataDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetDataDisk.java index 77302984fb8..a4d5b44bb52 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetDataDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetDataDisk.java @@ -38,6 +38,13 @@ public class VirtualMachineScaleSetDataDisk { @JsonProperty(value = "caching") private CachingTypes caching; + /** + * Specifies whether writeAccelerator should be enabled or disabled on the + * disk. + */ + @JsonProperty(value = "writeAcceleratorEnabled") + private Boolean writeAcceleratorEnabled; + /** * The create option. Possible values include: 'FromImage', 'Empty', * 'Attach'. @@ -119,6 +126,26 @@ public VirtualMachineScaleSetDataDisk withCaching(CachingTypes caching) { return this; } + /** + * Get the writeAcceleratorEnabled value. + * + * @return the writeAcceleratorEnabled value + */ + public Boolean writeAcceleratorEnabled() { + return this.writeAcceleratorEnabled; + } + + /** + * Set the writeAcceleratorEnabled value. + * + * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set + * @return the VirtualMachineScaleSetDataDisk object itself. + */ + public VirtualMachineScaleSetDataDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) { + this.writeAcceleratorEnabled = writeAcceleratorEnabled; + return this; + } + /** * Get the createOption value. * diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetIdentity.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetIdentity.java index 73b7799774c..1c058e7416b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetIdentity.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetIdentity.java @@ -105,4 +105,5 @@ public VirtualMachineScaleSetIdentity withIdentityIds(List identityIds) this.identityIds = identityIds; return this; } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java index 5f3497e05b4..34b6840c803 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java @@ -31,6 +31,13 @@ public class VirtualMachineScaleSetOSDisk { @JsonProperty(value = "caching") private CachingTypes caching; + /** + * Specifies whether writeAccelerator should be enabled or disabled on the + * disk. + */ + @JsonProperty(value = "writeAcceleratorEnabled") + private Boolean writeAcceleratorEnabled; + /** * Specifies how the virtual machines in the scale set should be * created.<br><br> The only allowed value is: **FromImage** @@ -113,6 +120,26 @@ public VirtualMachineScaleSetOSDisk withCaching(CachingTypes caching) { return this; } + /** + * Get the writeAcceleratorEnabled value. + * + * @return the writeAcceleratorEnabled value + */ + public Boolean writeAcceleratorEnabled() { + return this.writeAcceleratorEnabled; + } + + /** + * Set the writeAcceleratorEnabled value. + * + * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set + * @return the VirtualMachineScaleSetOSDisk object itself. + */ + public VirtualMachineScaleSetOSDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) { + this.writeAcceleratorEnabled = writeAcceleratorEnabled; + return this; + } + /** * Get the createOption value. * diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSDisk.java index b0cad4662c1..acbd5463e0b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSDisk.java @@ -23,6 +23,13 @@ public class VirtualMachineScaleSetUpdateOSDisk { @JsonProperty(value = "caching") private CachingTypes caching; + /** + * Specifies whether writeAccelerator should be enabled or disabled on the + * disk. + */ + @JsonProperty(value = "writeAcceleratorEnabled") + private Boolean writeAcceleratorEnabled; + /** * The Source User Image VirtualHardDisk. This VirtualHardDisk will be * copied before using it to attach to the Virtual Machine. If SourceImage @@ -63,6 +70,26 @@ public VirtualMachineScaleSetUpdateOSDisk withCaching(CachingTypes caching) { return this; } + /** + * Get the writeAcceleratorEnabled value. + * + * @return the writeAcceleratorEnabled value + */ + public Boolean writeAcceleratorEnabled() { + return this.writeAcceleratorEnabled; + } + + /** + * Set the writeAcceleratorEnabled value. + * + * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set + * @return the VirtualMachineScaleSetUpdateOSDisk object itself. + */ + public VirtualMachineScaleSetUpdateOSDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) { + this.writeAcceleratorEnabled = writeAcceleratorEnabled; + return this; + } + /** * Get the image value. * diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java index 51b0c4f5371..eb0b85307dd 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java @@ -63,6 +63,14 @@ public class VirtualMachineScaleSetVMProfile { @JsonProperty(value = "licenseType") private String licenseType; + /** + * Specifies the priority for the virtual machines in the scale set. + * <br><br>Minimum api-version: 2017-10-30-preview. Possible + * values include: 'Regular', 'Low'. + */ + @JsonProperty(value = "priority") + private VirtualMachinePriorityTypes priority; + /** * Get the osProfile value. * @@ -183,4 +191,24 @@ public VirtualMachineScaleSetVMProfile withLicenseType(String licenseType) { return this; } + /** + * Get the priority value. + * + * @return the priority value + */ + public VirtualMachinePriorityTypes priority() { + return this.priority; + } + + /** + * Set the priority value. + * + * @param priority the priority value to set + * @return the VirtualMachineScaleSetVMProfile object itself. + */ + public VirtualMachineScaleSetVMProfile withPriority(VirtualMachinePriorityTypes priority) { + this.priority = priority; + return this; + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSizeTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSizeTypes.java index 25274d9bc92..d1e1147a39f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSizeTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSizeTypes.java @@ -88,6 +88,24 @@ public final class VirtualMachineSizeTypes extends ExpandableStringEnum agentPoolProfiles; + + /** + * Properties of Windows VMs. + */ + @JsonProperty(value = "properties.windowsProfile") + private ContainerServiceWindowsProfile windowsProfile; + + /** + * Properties of Linux VMs. + */ + @JsonProperty(value = "properties.linuxProfile", required = true) + private ContainerServiceLinuxProfile linuxProfile; + + /** + * Properties of the diagnostic agent. + */ + @JsonProperty(value = "properties.diagnosticsProfile") + private ContainerServiceDiagnosticsProfile diagnosticsProfile; + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the orchestratorProfile value. + * + * @return the orchestratorProfile value + */ + public ContainerServiceOrchestratorProfile orchestratorProfile() { + return this.orchestratorProfile; + } + + /** + * Set the orchestratorProfile value. + * + * @param orchestratorProfile the orchestratorProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withOrchestratorProfile(ContainerServiceOrchestratorProfile orchestratorProfile) { + this.orchestratorProfile = orchestratorProfile; + return this; + } + + /** + * Get the customProfile value. + * + * @return the customProfile value + */ + public ContainerServiceCustomProfile customProfile() { + return this.customProfile; + } + + /** + * Set the customProfile value. + * + * @param customProfile the customProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withCustomProfile(ContainerServiceCustomProfile customProfile) { + this.customProfile = customProfile; + return this; + } + + /** + * Get the servicePrincipalProfile value. + * + * @return the servicePrincipalProfile value + */ + public ContainerServiceServicePrincipalProfile servicePrincipalProfile() { + return this.servicePrincipalProfile; + } + + /** + * Set the servicePrincipalProfile value. + * + * @param servicePrincipalProfile the servicePrincipalProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withServicePrincipalProfile(ContainerServiceServicePrincipalProfile servicePrincipalProfile) { + this.servicePrincipalProfile = servicePrincipalProfile; + return this; + } + + /** + * Get the masterProfile value. + * + * @return the masterProfile value + */ + public ContainerServiceMasterProfile masterProfile() { + return this.masterProfile; + } + + /** + * Set the masterProfile value. + * + * @param masterProfile the masterProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withMasterProfile(ContainerServiceMasterProfile masterProfile) { + this.masterProfile = masterProfile; + return this; + } + + /** + * Get the agentPoolProfiles value. + * + * @return the agentPoolProfiles value + */ + public List agentPoolProfiles() { + return this.agentPoolProfiles; + } + + /** + * Set the agentPoolProfiles value. + * + * @param agentPoolProfiles the agentPoolProfiles value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withAgentPoolProfiles(List agentPoolProfiles) { + this.agentPoolProfiles = agentPoolProfiles; + return this; + } + + /** + * Get the windowsProfile value. + * + * @return the windowsProfile value + */ + public ContainerServiceWindowsProfile windowsProfile() { + return this.windowsProfile; + } + + /** + * Set the windowsProfile value. + * + * @param windowsProfile the windowsProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withWindowsProfile(ContainerServiceWindowsProfile windowsProfile) { + this.windowsProfile = windowsProfile; + return this; + } + + /** + * Get the linuxProfile value. + * + * @return the linuxProfile value + */ + public ContainerServiceLinuxProfile linuxProfile() { + return this.linuxProfile; + } + + /** + * Set the linuxProfile value. + * + * @param linuxProfile the linuxProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withLinuxProfile(ContainerServiceLinuxProfile linuxProfile) { + this.linuxProfile = linuxProfile; + return this; + } + + /** + * Get the diagnosticsProfile value. + * + * @return the diagnosticsProfile value + */ + public ContainerServiceDiagnosticsProfile diagnosticsProfile() { + return this.diagnosticsProfile; + } + + /** + * Set the diagnosticsProfile value. + * + * @param diagnosticsProfile the diagnosticsProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withDiagnosticsProfile(ContainerServiceDiagnosticsProfile diagnosticsProfile) { + this.diagnosticsProfile = diagnosticsProfile; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ContainerServicesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ContainerServicesInner.java new file mode 100644 index 00000000000..4f52a627167 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ContainerServicesInner.java @@ -0,0 +1,988 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ContainerServices. + */ +public class ContainerServicesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ContainerServicesService service; + /** The service client containing this operation class. */ + private ComputeManagementClientImpl client; + + /** + * Initializes an instance of ContainerServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ContainerServicesInner(Retrofit retrofit, ComputeManagementClientImpl client) { + this.service = retrofit.create(ContainerServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServices to be + * used by Retrofit to perform actually REST calls. + */ + interface ContainerServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.ContainerServices list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices") + Observable> list(@Path("subscriptionId") String subscriptionId, @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.ContainerServices createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("containerServiceName") String containerServiceName, @Path("subscriptionId") String subscriptionId, @Body ContainerServiceInner 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.ContainerServices beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("containerServiceName") String containerServiceName, @Path("subscriptionId") String subscriptionId, @Body ContainerServiceInner 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.ContainerServices getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}") + Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("containerServiceName") String containerServiceName, @Path("subscriptionId") String subscriptionId, @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.ContainerServices delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("containerServiceName") String containerServiceName, @Path("subscriptionId") String subscriptionId, @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.ContainerServices beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("containerServiceName") String containerServiceName, @Path("subscriptionId") String subscriptionId, @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.ContainerServices listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @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.ContainerServices listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @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.ContainerServices listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ContainerServiceInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContainerServiceInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContainerServiceInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ContainerServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-01-31"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates a container service. + * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ContainerServiceInner object if successful. + */ + public ContainerServiceInner createOrUpdate(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters).toBlocking().last().body(); + } + + /** + * Creates or updates a container service. + * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters), serviceCallback); + } + + /** + * Creates or updates a container service. + * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters).map(new Func1, ContainerServiceInner>() { + @Override + public ContainerServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a container service. + * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (containerServiceName == null) { + throw new IllegalArgumentException("Parameter containerServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-01-31"; + Observable> observable = service.createOrUpdate(resourceGroupName, containerServiceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a container service. + * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ContainerServiceInner object if successful. + */ + public ContainerServiceInner beginCreateOrUpdate(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a container service. + * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters), serviceCallback); + } + + /** + * Creates or updates a container service. + * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContainerServiceInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, containerServiceName, parameters).map(new Func1, ContainerServiceInner>() { + @Override + public ContainerServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a container service. + * Creates or updates a container service with the specified configuration of orchestrator, masters, and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContainerServiceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String containerServiceName, ContainerServiceInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (containerServiceName == null) { + throw new IllegalArgumentException("Parameter containerServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-01-31"; + return service.beginCreateOrUpdate(resourceGroupName, containerServiceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the properties of the specified container service. + * Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ContainerServiceInner object if successful. + */ + public ContainerServiceInner getByResourceGroup(String resourceGroupName, String containerServiceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, containerServiceName).toBlocking().single().body(); + } + + /** + * Gets the properties of the specified container service. + * Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String containerServiceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, containerServiceName), serviceCallback); + } + + /** + * Gets the properties of the specified container service. + * Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContainerServiceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String containerServiceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, containerServiceName).map(new Func1, ContainerServiceInner>() { + @Override + public ContainerServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the properties of the specified container service. + * Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ContainerServiceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String containerServiceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (containerServiceName == null) { + throw new IllegalArgumentException("Parameter containerServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-01-31"; + return service.getByResourceGroup(resourceGroupName, containerServiceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the specified container service. + * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String containerServiceName) { + deleteWithServiceResponseAsync(resourceGroupName, containerServiceName).toBlocking().last().body(); + } + + /** + * Deletes the specified container service. + * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String containerServiceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, containerServiceName), serviceCallback); + } + + /** + * Deletes the specified container service. + * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String containerServiceName) { + return deleteWithServiceResponseAsync(resourceGroupName, containerServiceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified container service. + * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String containerServiceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (containerServiceName == null) { + throw new IllegalArgumentException("Parameter containerServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-01-31"; + Observable> observable = service.delete(resourceGroupName, containerServiceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the specified container service. + * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String containerServiceName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, containerServiceName).toBlocking().single().body(); + } + + /** + * Deletes the specified container service. + * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String containerServiceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, containerServiceName), serviceCallback); + } + + /** + * Deletes the specified container service. + * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String containerServiceName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, containerServiceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified container service. + * Deletes the specified container service in the specified subscription and resource group. The operation does not delete other resources created as part of creating a container service, including storage accounts, VMs, and availability sets. All the other resources created with the container service are part of the same resource group and can be deleted individually. + * + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String containerServiceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (containerServiceName == null) { + throw new IllegalArgumentException("Parameter containerServiceName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-01-31"; + return service.beginDelete(resourceGroupName, containerServiceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ContainerServiceInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param resourceGroupName The name of the resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContainerServiceInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContainerServiceInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ContainerServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-01-31"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ContainerServiceInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContainerServiceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContainerServiceInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of container services in the specified subscription. + * Gets a list of container services in the specified subscription. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ContainerServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ContainerServiceInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContainerServiceInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ContainerServiceInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of container services in the specified resource group. + * Gets a list of container services in the specified subscription and resource group. The operation returns properties of each container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ContainerServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java index e8d791f32d9..8b8b7ecb7cf 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 @@ -132,7 +132,7 @@ interface DisksService { * Creates or updates a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server @@ -147,7 +147,7 @@ public DiskInner createOrUpdate(String resourceGroupName, String diskName, DiskI * Creates or updates a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -161,7 +161,7 @@ public ServiceFuture createOrUpdateAsync(String resourceGroupName, St * Creates or updates a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -179,7 +179,7 @@ public DiskInner call(ServiceResponse response) { * Creates or updates a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -198,7 +198,7 @@ public Observable> createOrUpdateWithServiceResponseA throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -207,7 +207,7 @@ public Observable> createOrUpdateWithServiceResponseA * Creates or updates a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server @@ -222,7 +222,7 @@ public DiskInner beginCreateOrUpdate(String resourceGroupName, String diskName, * Creates or updates a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -236,7 +236,7 @@ public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupNam * Creates or updates a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DiskInner object @@ -254,7 +254,7 @@ public DiskInner call(ServiceResponse response) { * Creates or updates a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DiskInner object @@ -273,7 +273,7 @@ public Observable> beginCreateOrUpdateWithServiceResp throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -300,7 +300,7 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response updateAsync(String resourceGroupName, String dis * Updates (patches) a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Patch disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -347,7 +347,7 @@ public DiskInner call(ServiceResponse response) { * Updates (patches) a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Patch disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -366,7 +366,7 @@ public Observable> updateWithServiceResponseAsync(Str throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -375,7 +375,7 @@ public Observable> updateWithServiceResponseAsync(Str * Updates (patches) a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Patch disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server @@ -390,7 +390,7 @@ public DiskInner beginUpdate(String resourceGroupName, String diskName, DiskUpda * Updates (patches) a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Patch disk operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -404,7 +404,7 @@ public ServiceFuture beginUpdateAsync(String resourceGroupName, Strin * Updates (patches) a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Patch disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DiskInner object @@ -422,7 +422,7 @@ public DiskInner call(ServiceResponse response) { * Updates (patches) a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Patch disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DiskInner object @@ -441,7 +441,7 @@ public Observable> beginUpdateWithServiceResponseAsyn throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -468,7 +468,7 @@ private ServiceResponse beginUpdateDelegate(Response re * Gets information about a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -482,7 +482,7 @@ public DiskInner getByResourceGroup(String resourceGroupName, String diskName) { * Gets information about a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -495,7 +495,7 @@ public ServiceFuture getByResourceGroupAsync(String resourceGroupName * Gets information about a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DiskInner object */ @@ -512,7 +512,7 @@ public DiskInner call(ServiceResponse response) { * Gets information about a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DiskInner object */ @@ -526,7 +526,7 @@ public Observable> getByResourceGroupWithServiceRespo if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -552,7 +552,7 @@ private ServiceResponse getByResourceGroupDelegate(Response deleteAsync(String resourceGr * Deletes a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ @@ -596,7 +596,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServi if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -619,7 +619,7 @@ public Observable> deleteWithServi * Deletes a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -633,7 +633,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * Deletes a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -646,7 +646,7 @@ public ServiceFuture beginDeleteAsync(String resou * Deletes a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OperationStatusResponseInner object */ @@ -663,7 +663,7 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWith if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginDelete(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -792,7 +792,7 @@ public Observable>> listByResourceGroupSinglePag if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -897,7 +897,7 @@ public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -923,7 +923,7 @@ private ServiceResponse> listDelegate(Response grantAccessAsync(String resourceGroupName, * Grants access to a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get disk access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -970,7 +970,7 @@ public AccessUriInner call(ServiceResponse response) { * Grants access to a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get disk access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -989,7 +989,7 @@ public Observable> grantAccessWithServiceRespons throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.grantAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -998,7 +998,7 @@ public Observable> grantAccessWithServiceRespons * Grants access to a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get disk access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server @@ -1013,7 +1013,7 @@ public AccessUriInner beginGrantAccess(String resourceGroupName, String diskName * Grants access to a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get disk access operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1027,7 +1027,7 @@ public ServiceFuture beginGrantAccessAsync(String resourceGroupN * Grants access to a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get disk access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AccessUriInner object @@ -1045,7 +1045,7 @@ public AccessUriInner call(ServiceResponse response) { * Grants access to a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get disk access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AccessUriInner object @@ -1064,7 +1064,7 @@ public Observable> beginGrantAccessWithServiceRe throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginGrantAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1091,7 +1091,7 @@ private ServiceResponse beginGrantAccessDelegate(Response revokeAccessAsync(String reso * Revokes access to a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ @@ -1135,7 +1135,7 @@ public OperationStatusResponseInner call(ServiceResponse> revokeAccessWit if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.revokeAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1158,7 +1158,7 @@ public Observable> revokeAccessWit * Revokes access to a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -1172,7 +1172,7 @@ public OperationStatusResponseInner beginRevokeAccess(String resourceGroupName, * Revokes access to a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -1185,7 +1185,7 @@ public ServiceFuture beginRevokeAccessAsync(String * Revokes access to a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OperationStatusResponseInner object */ @@ -1202,7 +1202,7 @@ public OperationStatusResponseInner call(ServiceResponse> beginRevokeAcce if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginRevokeAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override 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 new file mode 100644 index 00000000000..652a8ced8a2 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java @@ -0,0 +1,382 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in LogAnalytics. + */ +public class LogAnalyticsInner { + /** The Retrofit service to perform REST calls. */ + private LogAnalyticsService service; + /** The service client containing this operation class. */ + private ComputeManagementClientImpl client; + + /** + * Initializes an instance of LogAnalyticsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public LogAnalyticsInner(Retrofit retrofit, ComputeManagementClientImpl client) { + this.service = retrofit.create(LogAnalyticsService.class); + this.client = client; + } + + /** + * The interface defining all the services for LogAnalytics to be + * used by Retrofit to perform actually REST calls. + */ + 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); + + @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); + + @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); + + @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); + + } + + /** + * Export logs that show Api requests made by this subscription in the given time window to show throttling activities. + * + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getRequestRateByInterval Api. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LogAnalyticsOperationResultInner object if successful. + */ + public LogAnalyticsOperationResultInner exportRequestRateByInterval(String location, RequestRateByIntervalInputInner parameters) { + return exportRequestRateByIntervalWithServiceResponseAsync(location, parameters).toBlocking().last().body(); + } + + /** + * Export logs that show Api requests made by this subscription in the given time window to show throttling activities. + * + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getRequestRateByInterval Api. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture exportRequestRateByIntervalAsync(String location, RequestRateByIntervalInputInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(exportRequestRateByIntervalWithServiceResponseAsync(location, parameters), serviceCallback); + } + + /** + * Export logs that show Api requests made by this subscription in the given time window to show throttling activities. + * + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getRequestRateByInterval Api. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable exportRequestRateByIntervalAsync(String location, RequestRateByIntervalInputInner parameters) { + return exportRequestRateByIntervalWithServiceResponseAsync(location, parameters).map(new Func1, LogAnalyticsOperationResultInner>() { + @Override + public LogAnalyticsOperationResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Export logs that show Api requests made by this subscription in the given time window to show throttling activities. + * + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getRequestRateByInterval Api. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> exportRequestRateByIntervalWithServiceResponseAsync(String location, RequestRateByIntervalInputInner parameters) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-12-01"; + Observable> observable = service.exportRequestRateByInterval(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Export logs that show Api requests made by this subscription in the given time window to show throttling activities. + * + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getRequestRateByInterval Api. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LogAnalyticsOperationResultInner object if successful. + */ + public LogAnalyticsOperationResultInner beginExportRequestRateByInterval(String location, RequestRateByIntervalInputInner parameters) { + return beginExportRequestRateByIntervalWithServiceResponseAsync(location, parameters).toBlocking().single().body(); + } + + /** + * Export logs that show Api requests made by this subscription in the given time window to show throttling activities. + * + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getRequestRateByInterval Api. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginExportRequestRateByIntervalAsync(String location, RequestRateByIntervalInputInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginExportRequestRateByIntervalWithServiceResponseAsync(location, parameters), serviceCallback); + } + + /** + * Export logs that show Api requests made by this subscription in the given time window to show throttling activities. + * + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getRequestRateByInterval Api. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LogAnalyticsOperationResultInner object + */ + public Observable beginExportRequestRateByIntervalAsync(String location, RequestRateByIntervalInputInner parameters) { + return beginExportRequestRateByIntervalWithServiceResponseAsync(location, parameters).map(new Func1, LogAnalyticsOperationResultInner>() { + @Override + public LogAnalyticsOperationResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Export logs that show Api requests made by this subscription in the given time window to show throttling activities. + * + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getRequestRateByInterval Api. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LogAnalyticsOperationResultInner object + */ + public Observable> beginExportRequestRateByIntervalWithServiceResponseAsync(String location, RequestRateByIntervalInputInner parameters) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-12-01"; + return service.beginExportRequestRateByInterval(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginExportRequestRateByIntervalDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginExportRequestRateByIntervalDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Export logs that show total throttled Api requests for this subscription in the given time window. + * + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LogAnalyticsOperationResultInner object if successful. + */ + public LogAnalyticsOperationResultInner exportThrottledRequests(String location, ThrottledRequestsInputInner parameters) { + return exportThrottledRequestsWithServiceResponseAsync(location, parameters).toBlocking().last().body(); + } + + /** + * Export logs that show total throttled Api requests for this subscription in the given time window. + * + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture exportThrottledRequestsAsync(String location, ThrottledRequestsInputInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(exportThrottledRequestsWithServiceResponseAsync(location, parameters), serviceCallback); + } + + /** + * Export logs that show total throttled Api requests for this subscription in the given time window. + * + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable exportThrottledRequestsAsync(String location, ThrottledRequestsInputInner parameters) { + return exportThrottledRequestsWithServiceResponseAsync(location, parameters).map(new Func1, LogAnalyticsOperationResultInner>() { + @Override + public LogAnalyticsOperationResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Export logs that show total throttled Api requests for this subscription in the given time window. + * + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> exportThrottledRequestsWithServiceResponseAsync(String location, ThrottledRequestsInputInner parameters) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-12-01"; + Observable> observable = service.exportThrottledRequests(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Export logs that show total throttled Api requests for this subscription in the given time window. + * + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the LogAnalyticsOperationResultInner object if successful. + */ + public LogAnalyticsOperationResultInner beginExportThrottledRequests(String location, ThrottledRequestsInputInner parameters) { + return beginExportThrottledRequestsWithServiceResponseAsync(location, parameters).toBlocking().single().body(); + } + + /** + * Export logs that show total throttled Api requests for this subscription in the given time window. + * + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginExportThrottledRequestsAsync(String location, ThrottledRequestsInputInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginExportThrottledRequestsWithServiceResponseAsync(location, parameters), serviceCallback); + } + + /** + * Export logs that show total throttled Api requests for this subscription in the given time window. + * + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LogAnalyticsOperationResultInner object + */ + public Observable beginExportThrottledRequestsAsync(String location, ThrottledRequestsInputInner parameters) { + return beginExportThrottledRequestsWithServiceResponseAsync(location, parameters).map(new Func1, LogAnalyticsOperationResultInner>() { + @Override + public LogAnalyticsOperationResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Export logs that show total throttled Api requests for this subscription in the given time window. + * + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the LogAnalyticsOperationResultInner object + */ + public Observable> beginExportThrottledRequestsWithServiceResponseAsync(String location, ThrottledRequestsInputInner parameters) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-12-01"; + return service.beginExportThrottledRequests(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginExportThrottledRequestsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginExportThrottledRequestsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsOperationResultInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsOperationResultInner.java new file mode 100644 index 00000000000..8dd8065900d --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsOperationResultInner.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.LogAnalyticsOutput; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * LogAnalytics operation status response. + */ +public class LogAnalyticsOperationResultInner extends OperationStatusResponseInner { + /** + * LogAnalyticsOutput. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private LogAnalyticsOutput properties; + + /** + * Get the properties value. + * + * @return the properties value + */ + public LogAnalyticsOutput properties() { + return this.properties; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RecoveryWalkResponseInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RecoveryWalkResponseInner.java new file mode 100644 index 00000000000..1d2655887c0 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RecoveryWalkResponseInner.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response after calling a manual recovery walk. + */ +public class RecoveryWalkResponseInner { + /** + * Whether the recovery walk was performed. + */ + @JsonProperty(value = "walkPerformed", access = JsonProperty.Access.WRITE_ONLY) + private Boolean walkPerformed; + + /** + * The next update domain that needs to be walked. Null means walk spanning + * all update domains has been completed. + */ + @JsonProperty(value = "nextPlatformUpdateDomain", access = JsonProperty.Access.WRITE_ONLY) + private Integer nextPlatformUpdateDomain; + + /** + * Get the walkPerformed value. + * + * @return the walkPerformed value + */ + public Boolean walkPerformed() { + return this.walkPerformed; + } + + /** + * Get the nextPlatformUpdateDomain value. + * + * @return the nextPlatformUpdateDomain value + */ + public Integer nextPlatformUpdateDomain() { + return this.nextPlatformUpdateDomain; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RequestRateByIntervalInputInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RequestRateByIntervalInputInner.java new file mode 100644 index 00000000000..8d6af4b271a --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RequestRateByIntervalInputInner.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.IntervalInMins; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.management.compute.LogAnalyticsInputBase; + +/** + * Api request input for LogAnalytics getRequestRateByInterval Api. + */ +public class RequestRateByIntervalInputInner 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 RequestRateByIntervalInputInner object itself. + */ + public RequestRateByIntervalInputInner withIntervalLength(IntervalInMins intervalLength) { + this.intervalLength = intervalLength; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java index ddc0ed006e4..851559f1d20 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java @@ -8,7 +8,7 @@ package com.microsoft.azure.management.compute.implementation; -import com.microsoft.azure.management.compute.DiskSku; +import com.microsoft.azure.management.compute.SnapshotSku; import org.joda.time.DateTime; import com.microsoft.azure.management.compute.OperatingSystemTypes; import com.microsoft.azure.management.compute.CreationData; @@ -32,7 +32,7 @@ public class SnapshotInner extends Resource { * The sku property. */ @JsonProperty(value = "sku") - private DiskSku sku; + private SnapshotSku sku; /** * The time when the disk was created. @@ -89,7 +89,7 @@ public String managedBy() { * * @return the sku value */ - public DiskSku sku() { + public SnapshotSku sku() { return this.sku; } @@ -99,7 +99,7 @@ public DiskSku sku() { * @param sku the sku value to set * @return the SnapshotInner object itself. */ - public SnapshotInner withSku(DiskSku sku) { + public SnapshotInner withSku(SnapshotSku sku) { this.sku = sku; return this; } 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 160d3e70deb..3e8637ef477 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 @@ -132,7 +132,7 @@ interface SnapshotsService { * Creates or updates a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server @@ -147,7 +147,7 @@ public SnapshotInner createOrUpdate(String resourceGroupName, String snapshotNam * Creates or updates a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -161,7 +161,7 @@ public ServiceFuture createOrUpdateAsync(String resourceGroupName * Creates or updates a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -179,7 +179,7 @@ public SnapshotInner call(ServiceResponse response) { * Creates or updates a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -198,7 +198,7 @@ public Observable> createOrUpdateWithServiceRespo throw new IllegalArgumentException("Parameter snapshot is required and cannot be null."); } Validator.validate(snapshot); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -207,7 +207,7 @@ public Observable> createOrUpdateWithServiceRespo * Creates or updates a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server @@ -222,7 +222,7 @@ public SnapshotInner beginCreateOrUpdate(String resourceGroupName, String snapsh * Creates or updates a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -236,7 +236,7 @@ public ServiceFuture beginCreateOrUpdateAsync(String resourceGrou * Creates or updates a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SnapshotInner object @@ -254,7 +254,7 @@ public SnapshotInner call(ServiceResponse response) { * Creates or updates a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SnapshotInner object @@ -273,7 +273,7 @@ public Observable> beginCreateOrUpdateWithService throw new IllegalArgumentException("Parameter snapshot is required and cannot be null."); } Validator.validate(snapshot); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -300,7 +300,7 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response updateAsync(String resourceGroupName, String * Updates (patches) a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -347,7 +347,7 @@ public SnapshotInner call(ServiceResponse response) { * Updates (patches) a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -366,7 +366,7 @@ public Observable> updateWithServiceResponseAsync throw new IllegalArgumentException("Parameter snapshot is required and cannot be null."); } Validator.validate(snapshot); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -375,7 +375,7 @@ public Observable> updateWithServiceResponseAsync * Updates (patches) a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server @@ -390,7 +390,7 @@ public SnapshotInner beginUpdate(String resourceGroupName, String snapshotName, * Updates (patches) a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -404,7 +404,7 @@ public ServiceFuture beginUpdateAsync(String resourceGroupName, S * Updates (patches) a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SnapshotInner object @@ -422,7 +422,7 @@ public SnapshotInner call(ServiceResponse response) { * Updates (patches) a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SnapshotInner object @@ -441,7 +441,7 @@ public Observable> beginUpdateWithServiceResponse throw new IllegalArgumentException("Parameter snapshot is required and cannot be null."); } Validator.validate(snapshot); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -468,7 +468,7 @@ private ServiceResponse beginUpdateDelegate(Response getByResourceGroupAsync(String resourceGroup * Gets information about a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SnapshotInner object */ @@ -512,7 +512,7 @@ public SnapshotInner call(ServiceResponse response) { * Gets information about a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SnapshotInner object */ @@ -526,7 +526,7 @@ public Observable> getByResourceGroupWithServiceR if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -552,7 +552,7 @@ private ServiceResponse getByResourceGroupDelegate(Response deleteAsync(String resourceGr * Deletes a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ @@ -596,7 +596,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServi if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -619,7 +619,7 @@ public Observable> deleteWithServi * Deletes a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -633,7 +633,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * Deletes a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -646,7 +646,7 @@ public ServiceFuture beginDeleteAsync(String resou * Deletes a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OperationStatusResponseInner object */ @@ -663,7 +663,7 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWith if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginDelete(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -792,7 +792,7 @@ public Observable>> listByResourceGroupSingl if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -897,7 +897,7 @@ public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -923,7 +923,7 @@ private ServiceResponse> listDelegate(Response grantAccessAsync(String resourceGroupName, * Grants access to a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get snapshot access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -970,7 +970,7 @@ public AccessUriInner call(ServiceResponse response) { * Grants access to a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get snapshot access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -989,7 +989,7 @@ public Observable> grantAccessWithServiceRespons throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.grantAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -998,7 +998,7 @@ public Observable> grantAccessWithServiceRespons * Grants access to a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get snapshot access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server @@ -1013,7 +1013,7 @@ public AccessUriInner beginGrantAccess(String resourceGroupName, String snapshot * Grants access to a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get snapshot access operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1027,7 +1027,7 @@ public ServiceFuture beginGrantAccessAsync(String resourceGroupN * Grants access to a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get snapshot access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AccessUriInner object @@ -1045,7 +1045,7 @@ public AccessUriInner call(ServiceResponse response) { * Grants access to a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get snapshot access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AccessUriInner object @@ -1064,7 +1064,7 @@ public Observable> beginGrantAccessWithServiceRe throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginGrantAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1091,7 +1091,7 @@ private ServiceResponse beginGrantAccessDelegate(Response revokeAccessAsync(String reso * Revokes access to a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ @@ -1135,7 +1135,7 @@ public OperationStatusResponseInner call(ServiceResponse> revokeAccessWit if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.revokeAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1158,7 +1158,7 @@ public Observable> revokeAccessWit * Revokes access to a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -1172,7 +1172,7 @@ public OperationStatusResponseInner beginRevokeAccess(String resourceGroupName, * Revokes access to a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -1185,7 +1185,7 @@ public ServiceFuture beginRevokeAccessAsync(String * Revokes access to a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OperationStatusResponseInner object */ @@ -1202,7 +1202,7 @@ public OperationStatusResponseInner call(ServiceResponse> beginRevokeAcce if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginRevokeAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ThrottledRequestsInputInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ThrottledRequestsInputInner.java new file mode 100644 index 00000000000..34a71d127f5 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ThrottledRequestsInputInner.java @@ -0,0 +1,17 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.LogAnalyticsInputBase; + +/** + * Api request input for LogAnalytics getThrottledRequests Api. + */ +public class ThrottledRequestsInputInner extends LogAnalyticsInputBase { +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInner.java index 23869e06831..95b866ced05 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInner.java @@ -18,7 +18,6 @@ import java.util.List; import com.microsoft.azure.management.compute.VirtualMachineIdentity; import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.management.compute.VirtualMachineInstanceView; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.Resource; @@ -97,7 +96,7 @@ public class VirtualMachineInner extends Resource { * The virtual machine instance view. */ @JsonProperty(value = "properties.instanceView", access = JsonProperty.Access.WRITE_ONLY) - private VirtualMachineInstanceView instanceView; + private VirtualMachineInstanceViewInner instanceView; /** * Specifies that the image or disk that is being used was licensed @@ -294,7 +293,7 @@ public String provisioningState() { * * @return the instanceView value */ - public VirtualMachineInstanceView instanceView() { + public VirtualMachineInstanceViewInner instanceView() { return this.instanceView; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java new file mode 100644 index 00000000000..25f7cf32854 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java @@ -0,0 +1,341 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.VirtualMachineAgentInstanceView; +import com.microsoft.azure.management.compute.MaintenanceRedeployStatus; +import java.util.List; +import com.microsoft.azure.management.compute.DiskInstanceView; +import com.microsoft.azure.management.compute.VirtualMachineExtensionInstanceView; +import com.microsoft.azure.management.compute.BootDiagnosticsInstanceView; +import com.microsoft.azure.management.compute.InstanceViewStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The instance view of a virtual machine. + */ +public class VirtualMachineInstanceViewInner { + /** + * Specifies the update domain of the virtual machine. + */ + @JsonProperty(value = "platformUpdateDomain") + private Integer platformUpdateDomain; + + /** + * Specifies the fault domain of the virtual machine. + */ + @JsonProperty(value = "platformFaultDomain") + private Integer platformFaultDomain; + + /** + * The computer name assigned to the virtual machine. + */ + @JsonProperty(value = "computerName") + private String computerName; + + /** + * The Operating System running on the virtual machine. + */ + @JsonProperty(value = "osName") + private String osName; + + /** + * The version of Operating System running on the virtual machine. + */ + @JsonProperty(value = "osVersion") + private String osVersion; + + /** + * The Remote desktop certificate thumbprint. + */ + @JsonProperty(value = "rdpThumbPrint") + private String rdpThumbPrint; + + /** + * The VM Agent running on the virtual machine. + */ + @JsonProperty(value = "vmAgent") + private VirtualMachineAgentInstanceView vmAgent; + + /** + * The Maintenance Operation status on the virtual machine. + */ + @JsonProperty(value = "maintenanceRedeployStatus") + private MaintenanceRedeployStatus maintenanceRedeployStatus; + + /** + * The virtual machine disk information. + */ + @JsonProperty(value = "disks") + private List disks; + + /** + * The extensions information. + */ + @JsonProperty(value = "extensions") + private List extensions; + + /** + * Boot Diagnostics is a debugging feature which allows you to view Console + * Output and Screenshot to diagnose VM status. <br><br> For + * Linux Virtual Machines, you can easily view the output of your console + * log. <br><br> For both Windows and Linux virtual machines, + * Azure also enables you to see a screenshot of the VM from the + * hypervisor. + */ + @JsonProperty(value = "bootDiagnostics") + private BootDiagnosticsInstanceView bootDiagnostics; + + /** + * The resource status information. + */ + @JsonProperty(value = "statuses") + private List statuses; + + /** + * Get the platformUpdateDomain value. + * + * @return the platformUpdateDomain value + */ + public Integer platformUpdateDomain() { + return this.platformUpdateDomain; + } + + /** + * Set the platformUpdateDomain value. + * + * @param platformUpdateDomain the platformUpdateDomain value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withPlatformUpdateDomain(Integer platformUpdateDomain) { + this.platformUpdateDomain = platformUpdateDomain; + return this; + } + + /** + * Get the platformFaultDomain value. + * + * @return the platformFaultDomain value + */ + public Integer platformFaultDomain() { + return this.platformFaultDomain; + } + + /** + * Set the platformFaultDomain value. + * + * @param platformFaultDomain the platformFaultDomain value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withPlatformFaultDomain(Integer platformFaultDomain) { + this.platformFaultDomain = platformFaultDomain; + return this; + } + + /** + * Get the computerName value. + * + * @return the computerName value + */ + public String computerName() { + return this.computerName; + } + + /** + * Set the computerName value. + * + * @param computerName the computerName value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withComputerName(String computerName) { + this.computerName = computerName; + return this; + } + + /** + * Get the osName value. + * + * @return the osName value + */ + public String osName() { + return this.osName; + } + + /** + * Set the osName value. + * + * @param osName the osName value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withOsName(String osName) { + this.osName = osName; + return this; + } + + /** + * Get the osVersion value. + * + * @return the osVersion value + */ + public String osVersion() { + return this.osVersion; + } + + /** + * Set the osVersion value. + * + * @param osVersion the osVersion value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withOsVersion(String osVersion) { + this.osVersion = osVersion; + return this; + } + + /** + * Get the rdpThumbPrint value. + * + * @return the rdpThumbPrint value + */ + public String rdpThumbPrint() { + return this.rdpThumbPrint; + } + + /** + * Set the rdpThumbPrint value. + * + * @param rdpThumbPrint the rdpThumbPrint value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withRdpThumbPrint(String rdpThumbPrint) { + this.rdpThumbPrint = rdpThumbPrint; + return this; + } + + /** + * Get the vmAgent value. + * + * @return the vmAgent value + */ + public VirtualMachineAgentInstanceView vmAgent() { + return this.vmAgent; + } + + /** + * Set the vmAgent value. + * + * @param vmAgent the vmAgent value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withVmAgent(VirtualMachineAgentInstanceView vmAgent) { + this.vmAgent = vmAgent; + return this; + } + + /** + * Get the maintenanceRedeployStatus value. + * + * @return the maintenanceRedeployStatus value + */ + public MaintenanceRedeployStatus maintenanceRedeployStatus() { + return this.maintenanceRedeployStatus; + } + + /** + * Set the maintenanceRedeployStatus value. + * + * @param maintenanceRedeployStatus the maintenanceRedeployStatus value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withMaintenanceRedeployStatus(MaintenanceRedeployStatus maintenanceRedeployStatus) { + this.maintenanceRedeployStatus = maintenanceRedeployStatus; + return this; + } + + /** + * Get the disks value. + * + * @return the disks value + */ + public List disks() { + return this.disks; + } + + /** + * Set the disks value. + * + * @param disks the disks value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withDisks(List disks) { + this.disks = disks; + return this; + } + + /** + * Get the extensions value. + * + * @return the extensions value + */ + public List extensions() { + return this.extensions; + } + + /** + * Set the extensions value. + * + * @param extensions the extensions value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withExtensions(List extensions) { + this.extensions = extensions; + return this; + } + + /** + * Get the bootDiagnostics value. + * + * @return the bootDiagnostics value + */ + public BootDiagnosticsInstanceView bootDiagnostics() { + return this.bootDiagnostics; + } + + /** + * Set the bootDiagnostics value. + * + * @param bootDiagnostics the bootDiagnostics value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withBootDiagnostics(BootDiagnosticsInstanceView bootDiagnostics) { + this.bootDiagnostics = bootDiagnostics; + return this; + } + + /** + * Get the statuses value. + * + * @return the statuses value + */ + public List statuses() { + return this.statuses; + } + + /** + * Set the statuses value. + * + * @param statuses the statuses value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withStatuses(List statuses) { + this.statuses = statuses; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineRunCommandsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineRunCommandsInner.java index 061cd13eb6c..c894387fd06 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineRunCommandsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineRunCommandsInner.java @@ -162,7 +162,7 @@ public Observable>> listSingle if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2017-12-01"; return service.list(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -246,7 +246,7 @@ public Observable> getWithServiceRespon if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2017-12-01"; return service.get(location, commandId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java index 74282f47593..2bc0e32a743 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java @@ -79,6 +79,19 @@ public class VirtualMachineScaleSetInner extends Resource { @JsonProperty(value = "properties.singlePlacementGroup") private Boolean singlePlacementGroup; + /** + * Whether to force stictly even Virtual Machine distribution cross x-zones + * in case there is zone outage. + */ + @JsonProperty(value = "properties.zoneBalance") + private Boolean zoneBalance; + + /** + * Fault Domain count for each placement group. + */ + @JsonProperty(value = "properties.platformFaultDomainCount") + private Integer platformFaultDomainCount; + /** * The identity of the virtual machine scale set, if configured. */ @@ -229,6 +242,46 @@ public VirtualMachineScaleSetInner withSinglePlacementGroup(Boolean singlePlacem return this; } + /** + * Get the zoneBalance value. + * + * @return the zoneBalance value + */ + public Boolean zoneBalance() { + return this.zoneBalance; + } + + /** + * Set the zoneBalance value. + * + * @param zoneBalance the zoneBalance value to set + * @return the VirtualMachineScaleSetInner object itself. + */ + public VirtualMachineScaleSetInner withZoneBalance(Boolean zoneBalance) { + this.zoneBalance = zoneBalance; + 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 VirtualMachineScaleSetInner object itself. + */ + public VirtualMachineScaleSetInner withPlatformFaultDomainCount(Integer platformFaultDomainCount) { + this.platformFaultDomainCount = platformFaultDomainCount; + return this; + } + /** * Get the identity value. * diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetNetworkConfigurationInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetNetworkConfigurationInner.java index d9d1339f4a5..3c9b28a3014 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetNetworkConfigurationInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetNetworkConfigurationInner.java @@ -58,6 +58,12 @@ public class VirtualMachineScaleSetNetworkConfigurationInner extends SubResource @JsonProperty(value = "properties.ipConfigurations", required = true) private List ipConfigurations; + /** + * Whether IP forwarding enabled on this NIC. + */ + @JsonProperty(value = "properties.enableIPForwarding") + private Boolean enableIPForwarding; + /** * Get the name value. * @@ -178,4 +184,24 @@ public VirtualMachineScaleSetNetworkConfigurationInner withIpConfigurations(List return this; } + /** + * Get the enableIPForwarding value. + * + * @return the enableIPForwarding value + */ + public Boolean enableIPForwarding() { + return this.enableIPForwarding; + } + + /** + * Set the enableIPForwarding value. + * + * @param enableIPForwarding the enableIPForwarding value to set + * @return the VirtualMachineScaleSetNetworkConfigurationInner object itself. + */ + public VirtualMachineScaleSetNetworkConfigurationInner withEnableIPForwarding(Boolean enableIPForwarding) { + this.enableIPForwarding = enableIPForwarding; + return this; + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateNetworkConfigurationInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateNetworkConfigurationInner.java index 1663cf15a7a..f5d03c6fd32 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateNetworkConfigurationInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateNetworkConfigurationInner.java @@ -57,6 +57,12 @@ public class VirtualMachineScaleSetUpdateNetworkConfigurationInner extends SubRe @JsonProperty(value = "properties.ipConfigurations") private List ipConfigurations; + /** + * Whether IP forwarding enabled on this NIC. + */ + @JsonProperty(value = "properties.enableIPForwarding") + private Boolean enableIPForwarding; + /** * Get the name value. * @@ -177,4 +183,24 @@ public VirtualMachineScaleSetUpdateNetworkConfigurationInner withIpConfiguration return this; } + /** + * Get the enableIPForwarding value. + * + * @return the enableIPForwarding value + */ + public Boolean enableIPForwarding() { + return this.enableIPForwarding; + } + + /** + * Set the enableIPForwarding value. + * + * @param enableIPForwarding the enableIPForwarding value to set + * @return the VirtualMachineScaleSetUpdateNetworkConfigurationInner object itself. + */ + public VirtualMachineScaleSetUpdateNetworkConfigurationInner withEnableIPForwarding(Boolean enableIPForwarding) { + this.enableIPForwarding = enableIPForwarding; + return this; + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInner.java index 607d01d82da..cd11fc0dadc 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInner.java @@ -18,7 +18,6 @@ import com.microsoft.azure.management.compute.Plan; import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.management.compute.VirtualMachineInstanceView; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.Resource; @@ -56,7 +55,7 @@ public class VirtualMachineScaleSetVMInner extends Resource { * The virtual machine instance view. */ @JsonProperty(value = "properties.instanceView", access = JsonProperty.Access.WRITE_ONLY) - private VirtualMachineInstanceView instanceView; + private VirtualMachineInstanceViewInner instanceView; /** * Specifies the hardware settings for the virtual machine. @@ -186,7 +185,7 @@ public String vmId() { * * @return the instanceView value */ - public VirtualMachineInstanceView instanceView() { + public VirtualMachineInstanceViewInner instanceView() { return this.instanceView; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java index 95d03b488b9..d7e523a6abb 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.compute.implementation; import com.microsoft.azure.management.compute.VirtualMachineAgentInstanceView; +import com.microsoft.azure.management.compute.MaintenanceRedeployStatus; import java.util.List; import com.microsoft.azure.management.compute.DiskInstanceView; import com.microsoft.azure.management.compute.VirtualMachineExtensionInstanceView; @@ -45,6 +46,12 @@ public class VirtualMachineScaleSetVMInstanceViewInner { @JsonProperty(value = "vmAgent") private VirtualMachineAgentInstanceView vmAgent; + /** + * The Maintenance Operation status on the virtual machine. + */ + @JsonProperty(value = "maintenanceRedeployStatus") + private MaintenanceRedeployStatus maintenanceRedeployStatus; + /** * The disks information. */ @@ -167,6 +174,26 @@ public VirtualMachineScaleSetVMInstanceViewInner withVmAgent(VirtualMachineAgent return this; } + /** + * Get the maintenanceRedeployStatus value. + * + * @return the maintenanceRedeployStatus value + */ + public MaintenanceRedeployStatus maintenanceRedeployStatus() { + return this.maintenanceRedeployStatus; + } + + /** + * Set the maintenanceRedeployStatus value. + * + * @param maintenanceRedeployStatus the maintenanceRedeployStatus value to set + * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. + */ + public VirtualMachineScaleSetVMInstanceViewInner withMaintenanceRedeployStatus(MaintenanceRedeployStatus maintenanceRedeployStatus) { + this.maintenanceRedeployStatus = maintenanceRedeployStatus; + return this; + } + /** * Get the disks value. * diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java index 72c6a79a93c..b7c3251ed48 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java @@ -18,15 +18,18 @@ import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; import okhttp3.ResponseBody; +import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; import retrofit2.http.Path; import retrofit2.http.POST; +import retrofit2.http.PUT; import retrofit2.http.Query; import retrofit2.http.Url; import retrofit2.Response; @@ -83,6 +86,14 @@ interface VirtualMachineScaleSetVMsService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate") Observable> beginDeallocate(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @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.VirtualMachineScaleSetVMs update" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetVMInner 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.VirtualMachineScaleSetVMs beginUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}") + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetVMInner 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.VirtualMachineScaleSetVMs delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}", method = "DELETE", hasBody = true) Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -127,6 +138,22 @@ interface VirtualMachineScaleSetVMsService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start") Observable> beginStart(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @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.VirtualMachineScaleSetVMs redeploy" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy") + Observable> redeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @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.VirtualMachineScaleSetVMs beginRedeploy" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy") + Observable> beginRedeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @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.VirtualMachineScaleSetVMs performMaintenance" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance") + Observable> performMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @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.VirtualMachineScaleSetVMs beginPerformMaintenance" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance") + Observable> beginPerformMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @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.VirtualMachineScaleSetVMs listNext" }) @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -631,6 +658,188 @@ private ServiceResponse beginDeallocateDelegate(Re .build(response); } + /** + * Updates a virtual machine of a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. + * @param instanceId The instance ID of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine Scale Sets VM operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineScaleSetVMInner object if successful. + */ + public VirtualMachineScaleSetVMInner update(String resourceGroupName, String vmScaleSetName, String instanceId, VirtualMachineScaleSetVMInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, parameters).toBlocking().last().body(); + } + + /** + * Updates a virtual machine of a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. + * @param instanceId The instance ID of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine Scale Sets VM operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, VirtualMachineScaleSetVMInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, parameters), serviceCallback); + } + + /** + * Updates a virtual machine of a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. + * @param instanceId The instance ID of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine Scale Sets VM operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, VirtualMachineScaleSetVMInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, parameters).map(new Func1, VirtualMachineScaleSetVMInner>() { + @Override + public VirtualMachineScaleSetVMInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual machine of a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. + * @param instanceId The instance ID of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine Scale Sets VM operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId, VirtualMachineScaleSetVMInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-12-01"; + Observable> observable = service.update(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates a virtual machine of a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. + * @param instanceId The instance ID of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine Scale Sets VM operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineScaleSetVMInner object if successful. + */ + public VirtualMachineScaleSetVMInner beginUpdate(String resourceGroupName, String vmScaleSetName, String instanceId, VirtualMachineScaleSetVMInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, parameters).toBlocking().single().body(); + } + + /** + * Updates a virtual machine of a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. + * @param instanceId The instance ID of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine Scale Sets VM operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, VirtualMachineScaleSetVMInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, parameters), serviceCallback); + } + + /** + * Updates a virtual machine of a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. + * @param instanceId The instance ID of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine Scale Sets VM operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineScaleSetVMInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, VirtualMachineScaleSetVMInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, parameters).map(new Func1, VirtualMachineScaleSetVMInner>() { + @Override + public VirtualMachineScaleSetVMInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual machine of a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. + * @param instanceId The instance ID of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine Scale Sets VM operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineScaleSetVMInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId, VirtualMachineScaleSetVMInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-12-01"; + return service.beginUpdate(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Deletes a virtual machine from a VM scale set. * @@ -1731,6 +1940,338 @@ private ServiceResponse beginStartDelegate(Respons .build(response); } + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner redeploy(String resourceGroupName, String vmScaleSetName, String instanceId) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginRedeploy(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + return service.beginRedeploy(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRedeployDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Gets a list of all virtual machines in a VM scale sets. * 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 13856d034a9..9ca36448448 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 @@ -152,6 +152,22 @@ interface VirtualMachineScaleSetsService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start") Observable> beginStart(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets redeploy" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy") + Observable> redeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginRedeploy" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy") + Observable> beginRedeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets performMaintenance" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance") + Observable> performMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginPerformMaintenance" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance") + Observable> beginPerformMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets updateInstances" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade") Observable> updateInstances(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @@ -176,6 +192,10 @@ interface VirtualMachineScaleSetsService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall") Observable> beginReimageAll(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets forceRecoveryServiceFabricPlatformUpdateDomainWalk" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk") + Observable> forceRecoveryServiceFabricPlatformUpdateDomainWalk(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("platformUpdateDomain") int platformUpdateDomain, @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 listByResourceGroupNext" }) @GET Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -2642,45 +2662,42 @@ private ServiceResponse beginStartDelegate(Respons } /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner updateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public OperationStatusResponseInner redeploy(String resourceGroupName, String vmScaleSetName) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable redeployAsync(String resourceGroupName, String vmScaleSetName) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { @Override public OperationStatusResponseInner call(ServiceResponse response) { return response.body(); @@ -2689,15 +2706,14 @@ public OperationStatusResponseInner call(ServiceResponse> updateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2707,57 +2723,127 @@ public Observable> updateInstances if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (instanceIds == null) { - throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); + final String apiVersion = "2017-12-01"; + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(null); + Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner redeploy(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2017-12-01"; - VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); - vmInstanceIDs.withInstanceIds(instanceIds); - Observable> observable = service.updateInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; + if (instanceIds != null) { + vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(instanceIds); + } + Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginUpdateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public OperationStatusResponseInner beginRedeploy(String resourceGroupName, String vmScaleSetName) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OperationStatusResponseInner object */ - public Observable beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { @Override public OperationStatusResponseInner call(ServiceResponse response) { return response.body(); @@ -2766,15 +2852,14 @@ public OperationStatusResponseInner call(ServiceResponse> beginUpdateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2784,19 +2869,103 @@ public Observable> beginUpdateInst if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (instanceIds == null) { - throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); + final String apiVersion = "2017-12-01"; + final List instanceIds = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(null); + return service.beginRedeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRedeployDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginRedeploy(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2017-12-01"; - VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); - vmInstanceIDs.withInstanceIds(instanceIds); - return service.beginUpdateInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; + if (instanceIds != null) { + vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(instanceIds); + } + return service.beginRedeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginUpdateInstancesDelegate(response); + ServiceResponse clientResponse = beginRedeployDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2805,7 +2974,7 @@ public Observable> call(Response beginUpdateInstancesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) @@ -2814,7 +2983,7 @@ private ServiceResponse beginUpdateInstancesDelega } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2823,12 +2992,12 @@ private ServiceResponse beginUpdateInstancesDelega * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimage(String resourceGroupName, String vmScaleSetName) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmScaleSetName) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2836,20 +3005,20 @@ public OperationStatusResponseInner reimage(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAsync(String resourceGroupName, String vmScaleSetName) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { @Override public OperationStatusResponseInner call(ServiceResponse response) { return response.body(); @@ -2858,14 +3027,14 @@ public OperationStatusResponseInner call(ServiceResponse> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2879,11 +3048,11 @@ public Observable> reimageWithServ final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); - Observable> observable = service.reimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2893,12 +3062,12 @@ public Observable> reimageWithServ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimage(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2907,12 +3076,12 @@ public OperationStatusResponseInner reimage(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2920,8 +3089,8 @@ public ServiceFuture reimageAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { @Override public OperationStatusResponseInner call(ServiceResponse response) { return response.body(); @@ -2930,7 +3099,7 @@ public OperationStatusResponseInner call(ServiceResponse> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2955,12 +3124,12 @@ public Observable> reimageWithServ vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } - Observable> observable = service.reimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2969,12 +3138,12 @@ public Observable> reimageWithServ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginReimage(String resourceGroupName, String vmScaleSetName) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmScaleSetName) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2982,20 +3151,20 @@ public OperationStatusResponseInner beginReimage(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OperationStatusResponseInner object */ - public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { @Override public OperationStatusResponseInner call(ServiceResponse response) { return response.body(); @@ -3004,14 +3173,14 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3025,12 +3194,12 @@ public Observable> beginReimageWit final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); - return service.beginReimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageDelegate(response); + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3040,7 +3209,7 @@ public Observable> call(Response> call(Response instanceIds) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -3064,12 +3233,12 @@ public OperationStatusResponseInner beginReimage(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -3077,8 +3246,8 @@ public ServiceFuture beginReimageAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OperationStatusResponseInner object */ - public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { @Override public OperationStatusResponseInner call(ServiceResponse response) { return response.body(); @@ -3087,7 +3256,7 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3112,12 +3281,12 @@ public Observable> beginReimageWit vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } - return service.beginReimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageDelegate(response); + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3126,7 +3295,7 @@ public Observable> call(Response beginReimageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) @@ -3135,41 +3304,534 @@ private ServiceResponse beginReimageDelegate(Respo } /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimageAll(String resourceGroupName, String vmScaleSetName) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public OperationStatusResponseInner updateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); + public ServiceFuture updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName) { + public Observable updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (instanceIds == null) { + throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); + } + Validator.validate(instanceIds); + final String apiVersion = "2017-12-01"; + VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); + vmInstanceIDs.withInstanceIds(instanceIds); + Observable> observable = service.updateInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginUpdateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + } + + /** + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + } + + /** + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginUpdateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (instanceIds == null) { + throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); + } + Validator.validate(instanceIds); + final String apiVersion = "2017-12-01"; + VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); + vmInstanceIDs.withInstanceIds(instanceIds); + return service.beginUpdateInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateInstancesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateInstancesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner reimage(String resourceGroupName, String vmScaleSetName) { + return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable reimageAsync(String resourceGroupName, String vmScaleSetName) { + return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(null); + Observable> observable = service.reimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner reimage(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable reimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(instanceIds); + final String apiVersion = "2017-12-01"; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; + if (instanceIds != null) { + vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(instanceIds); + } + Observable> observable = service.reimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginReimage(String resourceGroupName, String vmScaleSetName) { + return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName) { + return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + final List instanceIds = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(null); + return service.beginReimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginReimageDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginReimage(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(instanceIds); + final String apiVersion = "2017-12-01"; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; + if (instanceIds != null) { + vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(instanceIds); + } + return service.beginReimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginReimageDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginReimageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner reimageAll(String resourceGroupName, String vmScaleSetName) { + return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + } + + /** + * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); + } + + /** + * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName) { return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { @Override public OperationStatusResponseInner call(ServiceResponse response) { @@ -3455,6 +4117,94 @@ private ServiceResponse beginReimageAllDelegate(Re .build(response); } + /** + * Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param platformUpdateDomain The platform update domain for which a manual recovery walk is requested + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RecoveryWalkResponseInner object if successful. + */ + public RecoveryWalkResponseInner forceRecoveryServiceFabricPlatformUpdateDomainWalk(String resourceGroupName, String vmScaleSetName, int platformUpdateDomain) { + return forceRecoveryServiceFabricPlatformUpdateDomainWalkWithServiceResponseAsync(resourceGroupName, vmScaleSetName, platformUpdateDomain).toBlocking().single().body(); + } + + /** + * Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param platformUpdateDomain The platform update domain for which a manual recovery walk is requested + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture forceRecoveryServiceFabricPlatformUpdateDomainWalkAsync(String resourceGroupName, String vmScaleSetName, int platformUpdateDomain, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(forceRecoveryServiceFabricPlatformUpdateDomainWalkWithServiceResponseAsync(resourceGroupName, vmScaleSetName, platformUpdateDomain), serviceCallback); + } + + /** + * Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param platformUpdateDomain The platform update domain for which a manual recovery walk is requested + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryWalkResponseInner object + */ + public Observable forceRecoveryServiceFabricPlatformUpdateDomainWalkAsync(String resourceGroupName, String vmScaleSetName, int platformUpdateDomain) { + return forceRecoveryServiceFabricPlatformUpdateDomainWalkWithServiceResponseAsync(resourceGroupName, vmScaleSetName, platformUpdateDomain).map(new Func1, RecoveryWalkResponseInner>() { + @Override + public RecoveryWalkResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param platformUpdateDomain The platform update domain for which a manual recovery walk is requested + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecoveryWalkResponseInner object + */ + public Observable> forceRecoveryServiceFabricPlatformUpdateDomainWalkWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, int platformUpdateDomain) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + return service.forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, platformUpdateDomain, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = forceRecoveryServiceFabricPlatformUpdateDomainWalkDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse forceRecoveryServiceFabricPlatformUpdateDomainWalkDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Gets a list of all VM scale sets under a resource group. * 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 73c8e8c5ffc..01719d2b67c 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 @@ -8,7 +8,6 @@ package com.microsoft.azure.management.compute.implementation; -import com.microsoft.azure.management.compute.VirtualMachineInstanceView; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; @@ -852,9 +851,9 @@ private ServiceResponse getByResourceGroupDelegate(Response * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VirtualMachineInstanceView object if successful. + * @return the VirtualMachineInstanceViewInner object if successful. */ - public VirtualMachineInstanceView instanceView(String resourceGroupName, String vmName) { + public VirtualMachineInstanceViewInner instanceView(String resourceGroupName, String vmName) { return instanceViewWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } @@ -867,7 +866,7 @@ public VirtualMachineInstanceView instanceView(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture instanceViewAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture instanceViewAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(instanceViewWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -877,12 +876,12 @@ public ServiceFuture instanceViewAsync(String resour * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualMachineInstanceView object + * @return the observable to the VirtualMachineInstanceViewInner object */ - public Observable instanceViewAsync(String resourceGroupName, String vmName) { - return instanceViewWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, VirtualMachineInstanceView>() { + public Observable instanceViewAsync(String resourceGroupName, String vmName) { + return instanceViewWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, VirtualMachineInstanceViewInner>() { @Override - public VirtualMachineInstanceView call(ServiceResponse response) { + public VirtualMachineInstanceViewInner call(ServiceResponse response) { return response.body(); } }); @@ -894,9 +893,9 @@ public VirtualMachineInstanceView call(ServiceResponse> instanceViewWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> instanceViewWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -908,11 +907,11 @@ public Observable> instanceViewWithS } final String apiVersion = "2017-12-01"; return service.instanceView(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = instanceViewDelegate(response); + ServiceResponse clientResponse = instanceViewDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -921,9 +920,9 @@ public Observable> call(Response instanceViewDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse instanceViewDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -2449,7 +2448,7 @@ public Observable> runCommandWithServiceR throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2017-12-01"; Observable> observable = service.runCommand(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -2524,7 +2523,7 @@ public Observable> beginRunCommandWithSer throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2017-12-01"; return service.beginRunCommand(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override From a9c21b38a23854b6558f60c81ce8cee4e26514cf Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 14 Mar 2018 12:17:29 -0700 Subject: [PATCH 02/15] Generated from 2991f18008e061a157866ee56ed9ffc7de18988b (#282) Make OSDisk in storage profile optional --- .../microsoft/azure/management/compute/ImageStorageProfile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java index ba07ddb38d0..d3e87946e78 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java @@ -21,7 +21,7 @@ public class ImageStorageProfile { * see [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). */ - @JsonProperty(value = "osDisk", required = true) + @JsonProperty(value = "osDisk") private ImageOSDisk osDisk; /** From 395dcc9da646dbd8c93c35876dea8685dbe832d1 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 20 Mar 2018 14:29:06 -0700 Subject: [PATCH 03/15] [AutoPR compute/resource-manager] added missing Swagger (#342) * Generated from 5ef2236c820e75f579c7310ac82937a79d96878f removed readOnly patchOnly property * Generated from 5ef2236c820e75f579c7310ac82937a79d96878f removed readOnly patchOnly property --- .../azure/management/compute/AccessLevel.java | 46 +- .../management/compute/CreationData.java | 3 +- .../management/compute/DiskCreateOption.java | 59 +- .../compute/DiskCreateOptionTypes.java | 50 +- .../azure/management/compute/DiskSku.java | 2 +- .../management/compute/HardwareProfile.java | 13 +- .../compute/ImageStorageProfile.java | 30 +- .../compute/StorageAccountTypes.java | 46 +- .../AvailabilitySetUpdateInner.java | 152 ++++ .../implementation/AvailabilitySetsInner.java | 97 +++ .../ComputeManagementClientImpl.java | 14 + .../ComputeOperationValueInner.java | 109 +++ .../compute/implementation/DisksInner.java | 26 +- .../implementation/ImageUpdateInner.java | 91 +++ .../compute/implementation/ImagesInner.java | 177 +++++ .../implementation/OperationsInner.java | 128 ++++ .../compute/implementation/SnapshotInner.java | 8 +- .../implementation/SnapshotsInner.java | 26 +- .../VirtualMachineScaleSetInner.java | 53 -- ...ualMachineScaleSetVMInstanceViewInner.java | 27 - .../VirtualMachineScaleSetVMsInner.java | 348 --------- .../VirtualMachineScaleSetsInner.java | 658 ------------------ .../VirtualMachineUpdateInner.java | 363 ++++++++++ .../implementation/VirtualMachinesInner.java | 177 +++++ 24 files changed, 1471 insertions(+), 1232 deletions(-) create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetUpdateInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeOperationValueInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageUpdateInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineUpdateInner.java diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AccessLevel.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AccessLevel.java index 47876604914..c2dbf143ca9 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AccessLevel.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AccessLevel.java @@ -8,34 +8,46 @@ package com.microsoft.azure.management.compute; -import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for AccessLevel. */ -public final class AccessLevel extends ExpandableStringEnum { - /** Static value None for AccessLevel. */ - public static final AccessLevel NONE = fromString("None"); +public enum AccessLevel { + /** Enum value None. */ + NONE("None"), - /** Static value Read for AccessLevel. */ - public static final AccessLevel READ = fromString("Read"); + /** Enum value Read. */ + READ("Read"); + + /** The actual serialized value for a AccessLevel instance. */ + private String value; + + AccessLevel(String value) { + this.value = value; + } /** - * Creates or finds a AccessLevel from its string representation. - * @param name a name to look for - * @return the corresponding AccessLevel + * Parses a serialized value to a AccessLevel instance. + * + * @param value the serialized value to parse. + * @return the parsed AccessLevel object, or null if unable to parse. */ @JsonCreator - public static AccessLevel fromString(String name) { - return fromString(name, AccessLevel.class); + public static AccessLevel fromString(String value) { + AccessLevel[] items = AccessLevel.values(); + for (AccessLevel item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; } - /** - * @return known AccessLevel values - */ - public static Collection values() { - return values(AccessLevel.class); + @JsonValue + @Override + public String toString() { + return this.value; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java index 3a4a97be686..58edcd359d7 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java @@ -16,8 +16,7 @@ public class CreationData { /** * This enumerates the possible sources of a disk's creation. Possible - * values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', - * 'Restore'. + * values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy'. */ @JsonProperty(value = "createOption", required = true) private DiskCreateOption createOption; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOption.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOption.java index 98c18c3d144..903fd7cbca9 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOption.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOption.java @@ -8,46 +8,55 @@ package com.microsoft.azure.management.compute; -import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for DiskCreateOption. */ -public final class DiskCreateOption extends ExpandableStringEnum { - /** Static value Empty for DiskCreateOption. */ - public static final DiskCreateOption EMPTY = fromString("Empty"); +public enum DiskCreateOption { + /** Enum value Empty. */ + EMPTY("Empty"), - /** Static value Attach for DiskCreateOption. */ - public static final DiskCreateOption ATTACH = fromString("Attach"); + /** Enum value Attach. */ + ATTACH("Attach"), - /** Static value FromImage for DiskCreateOption. */ - public static final DiskCreateOption FROM_IMAGE = fromString("FromImage"); + /** Enum value FromImage. */ + FROM_IMAGE("FromImage"), - /** Static value Import for DiskCreateOption. */ - public static final DiskCreateOption IMPORT = fromString("Import"); + /** Enum value Import. */ + IMPORT("Import"), - /** Static value Copy for DiskCreateOption. */ - public static final DiskCreateOption COPY = fromString("Copy"); + /** Enum value Copy. */ + COPY("Copy"); - /** Static value Restore for DiskCreateOption. */ - public static final DiskCreateOption RESTORE = fromString("Restore"); + /** The actual serialized value for a DiskCreateOption instance. */ + private String value; + + DiskCreateOption(String value) { + this.value = value; + } /** - * Creates or finds a DiskCreateOption from its string representation. - * @param name a name to look for - * @return the corresponding DiskCreateOption + * Parses a serialized value to a DiskCreateOption instance. + * + * @param value the serialized value to parse. + * @return the parsed DiskCreateOption object, or null if unable to parse. */ @JsonCreator - public static DiskCreateOption fromString(String name) { - return fromString(name, DiskCreateOption.class); + public static DiskCreateOption fromString(String value) { + DiskCreateOption[] items = DiskCreateOption.values(); + for (DiskCreateOption item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; } - /** - * @return known DiskCreateOption values - */ - public static Collection values() { - return values(DiskCreateOption.class); + @JsonValue + @Override + public String toString() { + return this.value; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOptionTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOptionTypes.java index 66781dc00fe..b8c17affbbe 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOptionTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOptionTypes.java @@ -8,37 +8,49 @@ package com.microsoft.azure.management.compute; -import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for DiskCreateOptionTypes. */ -public final class DiskCreateOptionTypes extends ExpandableStringEnum { - /** Static value FromImage for DiskCreateOptionTypes. */ - public static final DiskCreateOptionTypes FROM_IMAGE = fromString("FromImage"); +public enum DiskCreateOptionTypes { + /** Enum value FromImage. */ + FROM_IMAGE("FromImage"), - /** Static value Empty for DiskCreateOptionTypes. */ - public static final DiskCreateOptionTypes EMPTY = fromString("Empty"); + /** Enum value Empty. */ + EMPTY("Empty"), - /** Static value Attach for DiskCreateOptionTypes. */ - public static final DiskCreateOptionTypes ATTACH = fromString("Attach"); + /** Enum value Attach. */ + ATTACH("Attach"); + + /** The actual serialized value for a DiskCreateOptionTypes instance. */ + private String value; + + DiskCreateOptionTypes(String value) { + this.value = value; + } /** - * Creates or finds a DiskCreateOptionTypes from its string representation. - * @param name a name to look for - * @return the corresponding DiskCreateOptionTypes + * Parses a serialized value to a DiskCreateOptionTypes instance. + * + * @param value the serialized value to parse. + * @return the parsed DiskCreateOptionTypes object, or null if unable to parse. */ @JsonCreator - public static DiskCreateOptionTypes fromString(String name) { - return fromString(name, DiskCreateOptionTypes.class); + public static DiskCreateOptionTypes fromString(String value) { + DiskCreateOptionTypes[] items = DiskCreateOptionTypes.values(); + for (DiskCreateOptionTypes item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; } - /** - * @return known DiskCreateOptionTypes values - */ - public static Collection values() { - return values(DiskCreateOptionTypes.class); + @JsonValue + @Override + public String toString() { + return this.value; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java index b42552ed482..39b94bcaf85 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * The disks sku name. Can be Standard_LRS or Premium_LRS. + * The disks and snapshots sku name. Can be Standard_LRS or Premium_LRS. */ public class DiskSku { /** diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java index 70ea72443eb..b0a9219106e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java @@ -21,13 +21,14 @@ public class HardwareProfile { * <br><br> The available VM sizes depend on region and * availability set. For a list of available sizes use these APIs: * <br><br> [List all available virtual machine sizes in an - * availability set](virtualmachines-list-sizes-availability-set.md) + * availability + * set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) * <br><br> [List all available virtual machine sizes in a - * region](virtualmachines-list-sizes-region.md) <br><br> [List - * all available virtual machine sizes for - * resizing](virtualmachines-list-sizes-for-resizing.md). Possible values - * include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', - * 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) + * <br><br> [List all available virtual machine sizes for + * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + * Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + * 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', * 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', * 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', * 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java index d3e87946e78..616a6d8e130 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java @@ -21,7 +21,7 @@ public class ImageStorageProfile { * see [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). */ - @JsonProperty(value = "osDisk") + @JsonProperty(value = "osDisk", required = true) private ImageOSDisk osDisk; /** @@ -33,14 +33,6 @@ public class ImageStorageProfile { @JsonProperty(value = "dataDisks") private List dataDisks; - /** - * Specifies whether an image is zone resilient or not. Default is false. - * Zone resilient images can be created only in regions that provide Zone - * Redundant Storage (ZRS). - */ - @JsonProperty(value = "zoneResilient") - private Boolean zoneResilient; - /** * Get the osDisk value. * @@ -81,24 +73,4 @@ public ImageStorageProfile withDataDisks(List dataDisks) { return this; } - /** - * Get the zoneResilient value. - * - * @return the zoneResilient value - */ - public Boolean zoneResilient() { - return this.zoneResilient; - } - - /** - * Set the zoneResilient value. - * - * @param zoneResilient the zoneResilient value to set - * @return the ImageStorageProfile object itself. - */ - public ImageStorageProfile withZoneResilient(Boolean zoneResilient) { - this.zoneResilient = zoneResilient; - return this; - } - } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageAccountTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageAccountTypes.java index 0f30ca9c570..ce427401d24 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageAccountTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageAccountTypes.java @@ -8,34 +8,46 @@ package com.microsoft.azure.management.compute; -import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for StorageAccountTypes. */ -public final class StorageAccountTypes extends ExpandableStringEnum { - /** Static value Standard_LRS for StorageAccountTypes. */ - public static final StorageAccountTypes STANDARD_LRS = fromString("Standard_LRS"); +public enum StorageAccountTypes { + /** Enum value Standard_LRS. */ + STANDARD_LRS("Standard_LRS"), - /** Static value Premium_LRS for StorageAccountTypes. */ - public static final StorageAccountTypes PREMIUM_LRS = fromString("Premium_LRS"); + /** Enum value Premium_LRS. */ + PREMIUM_LRS("Premium_LRS"); + + /** The actual serialized value for a StorageAccountTypes instance. */ + private String value; + + StorageAccountTypes(String value) { + this.value = value; + } /** - * Creates or finds a StorageAccountTypes from its string representation. - * @param name a name to look for - * @return the corresponding StorageAccountTypes + * Parses a serialized value to a StorageAccountTypes instance. + * + * @param value the serialized value to parse. + * @return the parsed StorageAccountTypes object, or null if unable to parse. */ @JsonCreator - public static StorageAccountTypes fromString(String name) { - return fromString(name, StorageAccountTypes.class); + public static StorageAccountTypes fromString(String value) { + StorageAccountTypes[] items = StorageAccountTypes.values(); + for (StorageAccountTypes item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; } - /** - * @return known StorageAccountTypes values - */ - public static Collection values() { - return values(StorageAccountTypes.class); + @JsonValue + @Override + public String toString() { + return this.value; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetUpdateInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetUpdateInner.java new file mode 100644 index 00000000000..6d26aa6a3fe --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetUpdateInner.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.compute.InstanceViewStatus; +import com.microsoft.azure.management.compute.Sku; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.compute.UpdateResource; + +/** + * 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. + */ +@JsonFlatten +public class AvailabilitySetUpdateInner 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 AvailabilitySetUpdateInner object itself. + */ + public AvailabilitySetUpdateInner 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 AvailabilitySetUpdateInner object itself. + */ + public AvailabilitySetUpdateInner 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 AvailabilitySetUpdateInner object itself. + */ + public AvailabilitySetUpdateInner 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 AvailabilitySetUpdateInner object itself. + */ + public AvailabilitySetUpdateInner withSku(Sku sku) { + this.sku = sku; + 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 df52c45b336..9fc6e2ade1c 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 @@ -27,6 +27,7 @@ import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; +import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -64,6 +65,10 @@ interface AvailabilitySetsService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}") Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("availabilitySetName") String availabilitySetName, @Path("subscriptionId") String subscriptionId, @Body AvailabilitySetInner 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 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); + @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) Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("availabilitySetName") String availabilitySetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -174,6 +179,98 @@ private ServiceResponse createOrUpdateDelegate(Response updateAsync(String resourceGroupName, String availabilitySetName, AvailabilitySetUpdateInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, availabilitySetName, parameters), serviceCallback); + } + + /** + * Update an availability set. + * + * @param resourceGroupName The name of the resource group. + * @param availabilitySetName The name of the availability set. + * @param parameters Parameters supplied to the Update Availability Set operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AvailabilitySetInner object + */ + public Observable updateAsync(String resourceGroupName, String availabilitySetName, AvailabilitySetUpdateInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, availabilitySetName, parameters).map(new Func1, AvailabilitySetInner>() { + @Override + public AvailabilitySetInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update an availability set. + * + * @param resourceGroupName The name of the resource group. + * @param availabilitySetName The name of the availability set. + * @param parameters Parameters supplied to the Update Availability Set operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AvailabilitySetInner object + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String availabilitySetName, AvailabilitySetUpdateInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (availabilitySetName == null) { + throw new IllegalArgumentException("Parameter availabilitySetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-12-01"; + return service.update(resourceGroupName, availabilitySetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Delete an availability set. * diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java index 33176c4098f..bff9f747b1a 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java @@ -120,6 +120,19 @@ public ComputeManagementClientImpl withGenerateClientRequestId(boolean generateC return this; } + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + /** * The AvailabilitySetsInner object to access its operations. */ @@ -388,6 +401,7 @@ protected void initialize() { this.acceptLanguage = "en-US"; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; + this.operations = new OperationsInner(restClient().retrofit(), this); this.availabilitySets = new AvailabilitySetsInner(restClient().retrofit(), this); this.virtualMachineExtensionImages = new VirtualMachineExtensionImagesInner(restClient().retrofit(), this); this.virtualMachineExtensions = new VirtualMachineExtensionsInner(restClient().retrofit(), this); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeOperationValueInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeOperationValueInner.java new file mode 100644 index 00000000000..3640f113e0d --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeOperationValueInner.java @@ -0,0 +1,109 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Describes the properties of a Compute Operation value. + */ +@JsonFlatten +public class ComputeOperationValueInner { + /** + * The origin of the compute operation. + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private String origin; + + /** + * The name of the compute operation. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The display name of the compute operation. + */ + @JsonProperty(value = "display.operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /** + * The display name of the resource the operation applies to. + */ + @JsonProperty(value = "display.resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /** + * The description of the operation. + */ + @JsonProperty(value = "display.description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * The resource provider for the operation. + */ + @JsonProperty(value = "display.provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /** + * Get the origin value. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the operation value. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Get the resource value. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Get the provider value. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + +} 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..f6a7ae05f86 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 @@ -198,7 +198,7 @@ public Observable> createOrUpdateWithServiceResponseA throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -273,7 +273,7 @@ public Observable> beginCreateOrUpdateWithServiceResp throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -366,7 +366,7 @@ public Observable> updateWithServiceResponseAsync(Str throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -441,7 +441,7 @@ public Observable> beginUpdateWithServiceResponseAsyn throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -526,7 +526,7 @@ public Observable> getByResourceGroupWithServiceRespo if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -610,7 +610,7 @@ public Observable> deleteWithServi if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -677,7 +677,7 @@ public Observable> beginDeleteWith if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; return service.beginDelete(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -792,7 +792,7 @@ public Observable>> listByResourceGroupSinglePag if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -897,7 +897,7 @@ public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -989,7 +989,7 @@ public Observable> grantAccessWithServiceRespons throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; Observable> observable = service.grantAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1064,7 +1064,7 @@ public Observable> beginGrantAccessWithServiceRe throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; return service.beginGrantAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1149,7 +1149,7 @@ public Observable> revokeAccessWit if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; Observable> observable = service.revokeAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1216,7 +1216,7 @@ public Observable> beginRevokeAcce if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; return service.beginRevokeAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageUpdateInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageUpdateInner.java new file mode 100644 index 00000000000..505fa198d32 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageUpdateInner.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.compute.ImageStorageProfile; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.compute.UpdateResource; + +/** + * The source user image virtual hard disk. The virtual hard disk will be + * copied before being attached to the virtual machine. If SourceImage is + * provided, the destination virtual hard drive must not exist. + */ +@JsonFlatten +public class ImageUpdateInner 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 ImageUpdateInner object itself. + */ + public ImageUpdateInner 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 ImageUpdateInner object itself. + */ + public ImageUpdateInner 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/implementation/ImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java index 9c65769dfac..8ce7c3e316c 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 @@ -30,6 +30,7 @@ import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; +import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -72,6 +73,14 @@ interface ImagesService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("imageName") String imageName, @Path("subscriptionId") String subscriptionId, @Body ImageInner 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 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); + + @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); + @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) Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("imageName") String imageName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -270,6 +279,174 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response updateAsync(String resourceGroupName, String imageName, ImageUpdateInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, imageName, parameters), serviceCallback); + } + + /** + * Update an image. + * + * @param resourceGroupName The name of the resource group. + * @param imageName The name of the image. + * @param parameters Parameters supplied to the Update Image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String imageName, ImageUpdateInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, imageName, parameters).map(new Func1, ImageInner>() { + @Override + public ImageInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update an image. + * + * @param resourceGroupName The name of the resource group. + * @param imageName The name of the image. + * @param parameters Parameters supplied to the Update Image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String imageName, ImageUpdateInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (imageName == null) { + throw new IllegalArgumentException("Parameter imageName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-12-01"; + Observable> observable = service.update(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Update an image. + * + * @param resourceGroupName The name of the resource group. + * @param imageName The name of the image. + * @param parameters Parameters supplied to the Update Image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ImageInner object if successful. + */ + public ImageInner beginUpdate(String resourceGroupName, String imageName, ImageUpdateInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, imageName, parameters).toBlocking().single().body(); + } + + /** + * Update an image. + * + * @param resourceGroupName The name of the resource group. + * @param imageName The name of the image. + * @param parameters Parameters supplied to the Update Image operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String resourceGroupName, String imageName, ImageUpdateInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, imageName, parameters), serviceCallback); + } + + /** + * Update an image. + * + * @param resourceGroupName The name of the resource group. + * @param imageName The name of the image. + * @param parameters Parameters supplied to the Update Image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImageInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String imageName, ImageUpdateInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, imageName, parameters).map(new Func1, ImageInner>() { + @Override + public ImageInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update an image. + * + * @param resourceGroupName The name of the resource group. + * @param imageName The name of the image. + * @param parameters Parameters supplied to the Update Image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImageInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String imageName, ImageUpdateInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (imageName == null) { + throw new IllegalArgumentException("Parameter imageName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-12-01"; + return service.beginUpdate(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Deletes an Image. * 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 new file mode 100644 index 00000000000..896e51a2e50 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java @@ -0,0 +1,128 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private ComputeManagementClientImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, ComputeManagementClientImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Operations list" }) + @GET("providers/Microsoft.Compute/operations") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of compute operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<ComputeOperationValueInner> object if successful. + */ + public List list() { + return listWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Gets a list of compute operations. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * Gets a list of compute operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ComputeOperationValueInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of compute operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ComputeOperationValueInner> object + */ + public Observable>> listWithServiceResponseAsync() { + final String apiVersion = "2017-12-01"; + return service.list(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java index 851559f1d20..ddc0ed006e4 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java @@ -8,7 +8,7 @@ package com.microsoft.azure.management.compute.implementation; -import com.microsoft.azure.management.compute.SnapshotSku; +import com.microsoft.azure.management.compute.DiskSku; import org.joda.time.DateTime; import com.microsoft.azure.management.compute.OperatingSystemTypes; import com.microsoft.azure.management.compute.CreationData; @@ -32,7 +32,7 @@ public class SnapshotInner extends Resource { * The sku property. */ @JsonProperty(value = "sku") - private SnapshotSku sku; + private DiskSku sku; /** * The time when the disk was created. @@ -89,7 +89,7 @@ public String managedBy() { * * @return the sku value */ - public SnapshotSku sku() { + public DiskSku sku() { return this.sku; } @@ -99,7 +99,7 @@ public SnapshotSku sku() { * @param sku the sku value to set * @return the SnapshotInner object itself. */ - public SnapshotInner withSku(SnapshotSku sku) { + public SnapshotInner withSku(DiskSku sku) { this.sku = sku; return this; } 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..bd95385db8f 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 @@ -198,7 +198,7 @@ public Observable> createOrUpdateWithServiceRespo throw new IllegalArgumentException("Parameter snapshot is required and cannot be null."); } Validator.validate(snapshot); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -273,7 +273,7 @@ public Observable> beginCreateOrUpdateWithService throw new IllegalArgumentException("Parameter snapshot is required and cannot be null."); } Validator.validate(snapshot); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -366,7 +366,7 @@ public Observable> updateWithServiceResponseAsync throw new IllegalArgumentException("Parameter snapshot is required and cannot be null."); } Validator.validate(snapshot); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -441,7 +441,7 @@ public Observable> beginUpdateWithServiceResponse throw new IllegalArgumentException("Parameter snapshot is required and cannot be null."); } Validator.validate(snapshot); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -526,7 +526,7 @@ public Observable> getByResourceGroupWithServiceR if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -610,7 +610,7 @@ public Observable> deleteWithServi if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -677,7 +677,7 @@ public Observable> beginDeleteWith if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; return service.beginDelete(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -792,7 +792,7 @@ public Observable>> listByResourceGroupSingl if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -897,7 +897,7 @@ public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -989,7 +989,7 @@ public Observable> grantAccessWithServiceRespons throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; Observable> observable = service.grantAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1064,7 +1064,7 @@ public Observable> beginGrantAccessWithServiceRe throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; return service.beginGrantAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1149,7 +1149,7 @@ public Observable> revokeAccessWit if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; Observable> observable = service.revokeAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1216,7 +1216,7 @@ public Observable> beginRevokeAcce if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2017-03-30"; return service.beginRevokeAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java index 2bc0e32a743..74282f47593 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java @@ -79,19 +79,6 @@ public class VirtualMachineScaleSetInner extends Resource { @JsonProperty(value = "properties.singlePlacementGroup") private Boolean singlePlacementGroup; - /** - * Whether to force stictly even Virtual Machine distribution cross x-zones - * in case there is zone outage. - */ - @JsonProperty(value = "properties.zoneBalance") - private Boolean zoneBalance; - - /** - * Fault Domain count for each placement group. - */ - @JsonProperty(value = "properties.platformFaultDomainCount") - private Integer platformFaultDomainCount; - /** * The identity of the virtual machine scale set, if configured. */ @@ -242,46 +229,6 @@ public VirtualMachineScaleSetInner withSinglePlacementGroup(Boolean singlePlacem return this; } - /** - * Get the zoneBalance value. - * - * @return the zoneBalance value - */ - public Boolean zoneBalance() { - return this.zoneBalance; - } - - /** - * Set the zoneBalance value. - * - * @param zoneBalance the zoneBalance value to set - * @return the VirtualMachineScaleSetInner object itself. - */ - public VirtualMachineScaleSetInner withZoneBalance(Boolean zoneBalance) { - this.zoneBalance = zoneBalance; - 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 VirtualMachineScaleSetInner object itself. - */ - public VirtualMachineScaleSetInner withPlatformFaultDomainCount(Integer platformFaultDomainCount) { - this.platformFaultDomainCount = platformFaultDomainCount; - return this; - } - /** * Get the identity value. * diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java index d7e523a6abb..95d03b488b9 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java @@ -9,7 +9,6 @@ package com.microsoft.azure.management.compute.implementation; import com.microsoft.azure.management.compute.VirtualMachineAgentInstanceView; -import com.microsoft.azure.management.compute.MaintenanceRedeployStatus; import java.util.List; import com.microsoft.azure.management.compute.DiskInstanceView; import com.microsoft.azure.management.compute.VirtualMachineExtensionInstanceView; @@ -46,12 +45,6 @@ public class VirtualMachineScaleSetVMInstanceViewInner { @JsonProperty(value = "vmAgent") private VirtualMachineAgentInstanceView vmAgent; - /** - * The Maintenance Operation status on the virtual machine. - */ - @JsonProperty(value = "maintenanceRedeployStatus") - private MaintenanceRedeployStatus maintenanceRedeployStatus; - /** * The disks information. */ @@ -174,26 +167,6 @@ public VirtualMachineScaleSetVMInstanceViewInner withVmAgent(VirtualMachineAgent return this; } - /** - * Get the maintenanceRedeployStatus value. - * - * @return the maintenanceRedeployStatus value - */ - public MaintenanceRedeployStatus maintenanceRedeployStatus() { - return this.maintenanceRedeployStatus; - } - - /** - * Set the maintenanceRedeployStatus value. - * - * @param maintenanceRedeployStatus the maintenanceRedeployStatus value to set - * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. - */ - public VirtualMachineScaleSetVMInstanceViewInner withMaintenanceRedeployStatus(MaintenanceRedeployStatus maintenanceRedeployStatus) { - this.maintenanceRedeployStatus = maintenanceRedeployStatus; - return this; - } - /** * Get the disks value. * diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java index b7c3251ed48..df3a5c9885d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java @@ -138,22 +138,6 @@ interface VirtualMachineScaleSetVMsService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start") Observable> beginStart(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @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.VirtualMachineScaleSetVMs redeploy" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy") - Observable> redeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @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.VirtualMachineScaleSetVMs beginRedeploy" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy") - Observable> beginRedeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @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.VirtualMachineScaleSetVMs performMaintenance" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance") - Observable> performMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @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.VirtualMachineScaleSetVMs beginPerformMaintenance" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance") - Observable> beginPerformMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @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.VirtualMachineScaleSetVMs listNext" }) @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -1940,338 +1924,6 @@ private ServiceResponse beginStartDelegate(Respons .build(response); } - /** - * Redeploys a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. - */ - public OperationStatusResponseInner redeploy(String resourceGroupName, String vmScaleSetName, String instanceId) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); - } - - /** - * Redeploys a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); - } - - /** - * Redeploys a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { - @Override - public OperationStatusResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Redeploys a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmScaleSetName == null) { - throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); - } - if (instanceId == null) { - throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2017-12-01"; - Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Redeploys a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. - */ - public OperationStatusResponseInner beginRedeploy(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); - } - - /** - * Redeploys a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); - } - - /** - * Redeploys a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object - */ - public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { - @Override - public OperationStatusResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Redeploys a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object - */ - public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmScaleSetName == null) { - throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); - } - if (instanceId == null) { - throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2017-12-01"; - return service.beginRedeploy(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginRedeployDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Performs maintenance on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. - */ - public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); - } - - /** - * Performs maintenance on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); - } - - /** - * Performs maintenance on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { - @Override - public OperationStatusResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Performs maintenance on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmScaleSetName == null) { - throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); - } - if (instanceId == null) { - throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2017-12-01"; - Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Performs maintenance on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. - */ - public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); - } - - /** - * Performs maintenance on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); - } - - /** - * Performs maintenance on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object - */ - public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { - @Override - public OperationStatusResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Performs maintenance on a virtual machine in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object - */ - public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmScaleSetName == null) { - throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); - } - if (instanceId == null) { - throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2017-12-01"; - return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** * Gets a list of all virtual machines in a VM scale sets. * 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 9ca36448448..e738a5ffc2c 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 @@ -152,22 +152,6 @@ interface VirtualMachineScaleSetsService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start") Observable> beginStart(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets redeploy" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy") - Observable> redeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginRedeploy" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy") - Observable> beginRedeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets performMaintenance" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance") - Observable> performMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginPerformMaintenance" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance") - Observable> beginPerformMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets updateInstances" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade") Observable> updateInstances(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @@ -2661,648 +2645,6 @@ private ServiceResponse beginStartDelegate(Respons .build(response); } - /** - * Redeploy one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. - */ - public OperationStatusResponseInner redeploy(String resourceGroupName, String vmScaleSetName) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); - } - - /** - * Redeploy one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); - } - - /** - * Redeploy one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable redeployAsync(String resourceGroupName, String vmScaleSetName) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { - @Override - public OperationStatusResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Redeploy one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmScaleSetName == null) { - throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2017-12-01"; - final String instanceIdsConverted = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.withInstanceIds(null); - Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Redeploy one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. - */ - public OperationStatusResponseInner redeploy(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); - } - - /** - * Redeploy one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); - } - - /** - * Redeploy one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { - @Override - public OperationStatusResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Redeploy one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmScaleSetName == null) { - throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.withInstanceIds(instanceIds); - } - Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Redeploy one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. - */ - public OperationStatusResponseInner beginRedeploy(String resourceGroupName, String vmScaleSetName) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); - } - - /** - * Redeploy one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); - } - - /** - * Redeploy one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object - */ - public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { - @Override - public OperationStatusResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Redeploy one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object - */ - public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmScaleSetName == null) { - throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2017-12-01"; - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.withInstanceIds(null); - return service.beginRedeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginRedeployDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Redeploy one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. - */ - public OperationStatusResponseInner beginRedeploy(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); - } - - /** - * Redeploy one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); - } - - /** - * Redeploy one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object - */ - public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { - @Override - public OperationStatusResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Redeploy one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object - */ - public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmScaleSetName == null) { - throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.withInstanceIds(instanceIds); - } - return service.beginRedeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginRedeployDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. - */ - public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmScaleSetName) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { - @Override - public OperationStatusResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmScaleSetName == null) { - throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2017-12-01"; - final String instanceIdsConverted = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.withInstanceIds(null); - Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Perform maintenance on one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. - */ - public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { - @Override - public OperationStatusResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmScaleSetName == null) { - throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.withInstanceIds(instanceIds); - } - Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. - */ - public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmScaleSetName) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object - */ - public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { - @Override - public OperationStatusResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object - */ - public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmScaleSetName == null) { - throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2017-12-01"; - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.withInstanceIds(null); - return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. - */ - public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object - */ - public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { - @Override - public OperationStatusResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Perform maintenance on one or more virtual machines in a VM scale set. - * - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object - */ - public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmScaleSetName == null) { - throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.withInstanceIds(instanceIds); - } - return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. * diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineUpdateInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineUpdateInner.java new file mode 100644 index 00000000000..beebee6fe43 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineUpdateInner.java @@ -0,0 +1,363 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.Plan; +import com.microsoft.azure.management.compute.HardwareProfile; +import com.microsoft.azure.management.compute.StorageProfile; +import com.microsoft.azure.management.compute.OSProfile; +import com.microsoft.azure.management.compute.NetworkProfile; +import com.microsoft.azure.management.compute.DiagnosticsProfile; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.compute.VirtualMachineIdentity; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.compute.UpdateResource; + +/** + * Describes a Virtual Machine. + */ +@JsonFlatten +public class VirtualMachineUpdateInner 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 VirtualMachineUpdateInner object itself. + */ + public VirtualMachineUpdateInner 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 VirtualMachineUpdateInner object itself. + */ + public VirtualMachineUpdateInner 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 VirtualMachineUpdateInner object itself. + */ + public VirtualMachineUpdateInner 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 VirtualMachineUpdateInner object itself. + */ + public VirtualMachineUpdateInner 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 VirtualMachineUpdateInner object itself. + */ + public VirtualMachineUpdateInner 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 VirtualMachineUpdateInner object itself. + */ + public VirtualMachineUpdateInner 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 VirtualMachineUpdateInner object itself. + */ + public VirtualMachineUpdateInner 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 VirtualMachineUpdateInner object itself. + */ + public VirtualMachineUpdateInner 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 VirtualMachineUpdateInner object itself. + */ + public VirtualMachineUpdateInner 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 VirtualMachineUpdateInner object itself. + */ + public VirtualMachineUpdateInner withZones(List zones) { + this.zones = zones; + return this; + } + +} 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 01719d2b67c..78a4b7ddfcb 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 @@ -31,6 +31,7 @@ import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; +import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.PUT; @@ -82,6 +83,14 @@ interface VirtualMachinesService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineInner 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 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); + + @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); + @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) Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -524,6 +533,174 @@ private ServiceResponse beginCreateOrUpdateDelegate(Respons .build(response); } + /** + * The operation to update a virtual machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineInner object if successful. + */ + public VirtualMachineInner update(String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().last().body(); + } + + /** + * The operation to update a virtual machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); + } + + /** + * The operation to update a virtual machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1, VirtualMachineInner>() { + @Override + public VirtualMachineInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to update a virtual machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmName == null) { + throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-12-01"; + Observable> observable = service.update(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * The operation to update a virtual machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineInner object if successful. + */ + public VirtualMachineInner beginUpdate(String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().single().body(); + } + + /** + * The operation to update a virtual machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); + } + + /** + * The operation to update a virtual machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1, VirtualMachineInner>() { + @Override + public VirtualMachineInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to update a virtual machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmName == null) { + throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2017-12-01"; + return service.beginUpdate(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * The operation to delete a virtual machine. * From 7b10af102e1439da6e684612fac64c657c5248a7 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 26 Mar 2018 11:56:11 -0700 Subject: [PATCH 04/15] Generated from 69b1a9a3786e3a35c4a4444a6b529bda4177ff4f (#10) Fixing language --- .../azure/management/compute/AccessLevel.java | 46 +- .../management/compute/CreationData.java | 3 +- .../management/compute/DiskCreateOption.java | 59 +- .../compute/DiskCreateOptionTypes.java | 50 +- .../azure/management/compute/DiskSku.java | 2 +- .../compute/ImageStorageProfile.java | 30 +- .../compute/StorageAccountTypes.java | 46 +- .../ComputeManagementClientImpl.java | 28 +- .../compute/implementation/DisksInner.java | 26 +- .../compute/implementation/SnapshotInner.java | 8 +- .../implementation/SnapshotsInner.java | 26 +- .../VirtualMachineExtensionUpdateInner.java | 208 ++++++ .../VirtualMachineExtensionsInner.java | 206 +++++- ...rtualMachineExtensionsListResultInner.java | 44 ++ .../VirtualMachineScaleSetInner.java | 53 ++ ...ualMachineScaleSetVMInstanceViewInner.java | 27 + .../VirtualMachineScaleSetVMsInner.java | 348 +++++++++ .../VirtualMachineScaleSetsInner.java | 658 ++++++++++++++++++ .../implementation/VirtualMachinesInner.java | 170 +++++ 19 files changed, 1860 insertions(+), 178 deletions(-) create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionUpdateInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsListResultInner.java diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AccessLevel.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AccessLevel.java index c2dbf143ca9..47876604914 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AccessLevel.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AccessLevel.java @@ -8,46 +8,34 @@ package com.microsoft.azure.management.compute; +import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for AccessLevel. */ -public enum AccessLevel { - /** Enum value None. */ - NONE("None"), +public final class AccessLevel extends ExpandableStringEnum { + /** Static value None for AccessLevel. */ + public static final AccessLevel NONE = fromString("None"); - /** Enum value Read. */ - READ("Read"); - - /** The actual serialized value for a AccessLevel instance. */ - private String value; - - AccessLevel(String value) { - this.value = value; - } + /** Static value Read for AccessLevel. */ + public static final AccessLevel READ = fromString("Read"); /** - * Parses a serialized value to a AccessLevel instance. - * - * @param value the serialized value to parse. - * @return the parsed AccessLevel object, or null if unable to parse. + * Creates or finds a AccessLevel from its string representation. + * @param name a name to look for + * @return the corresponding AccessLevel */ @JsonCreator - public static AccessLevel fromString(String value) { - AccessLevel[] items = AccessLevel.values(); - for (AccessLevel item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static AccessLevel fromString(String name) { + return fromString(name, AccessLevel.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** + * @return known AccessLevel values + */ + public static Collection values() { + return values(AccessLevel.class); } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java index 58edcd359d7..3a4a97be686 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java @@ -16,7 +16,8 @@ public class CreationData { /** * This enumerates the possible sources of a disk's creation. Possible - * values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy'. + * values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', + * 'Restore'. */ @JsonProperty(value = "createOption", required = true) private DiskCreateOption createOption; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOption.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOption.java index 903fd7cbca9..98c18c3d144 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOption.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOption.java @@ -8,55 +8,46 @@ package com.microsoft.azure.management.compute; +import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for DiskCreateOption. */ -public enum DiskCreateOption { - /** Enum value Empty. */ - EMPTY("Empty"), +public final class DiskCreateOption extends ExpandableStringEnum { + /** Static value Empty for DiskCreateOption. */ + public static final DiskCreateOption EMPTY = fromString("Empty"); - /** Enum value Attach. */ - ATTACH("Attach"), + /** Static value Attach for DiskCreateOption. */ + public static final DiskCreateOption ATTACH = fromString("Attach"); - /** Enum value FromImage. */ - FROM_IMAGE("FromImage"), + /** Static value FromImage for DiskCreateOption. */ + public static final DiskCreateOption FROM_IMAGE = fromString("FromImage"); - /** Enum value Import. */ - IMPORT("Import"), + /** Static value Import for DiskCreateOption. */ + public static final DiskCreateOption IMPORT = fromString("Import"); - /** Enum value Copy. */ - COPY("Copy"); + /** Static value Copy for DiskCreateOption. */ + public static final DiskCreateOption COPY = fromString("Copy"); - /** The actual serialized value for a DiskCreateOption instance. */ - private String value; - - DiskCreateOption(String value) { - this.value = value; - } + /** Static value Restore for DiskCreateOption. */ + public static final DiskCreateOption RESTORE = fromString("Restore"); /** - * Parses a serialized value to a DiskCreateOption instance. - * - * @param value the serialized value to parse. - * @return the parsed DiskCreateOption object, or null if unable to parse. + * Creates or finds a DiskCreateOption from its string representation. + * @param name a name to look for + * @return the corresponding DiskCreateOption */ @JsonCreator - public static DiskCreateOption fromString(String value) { - DiskCreateOption[] items = DiskCreateOption.values(); - for (DiskCreateOption item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static DiskCreateOption fromString(String name) { + return fromString(name, DiskCreateOption.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** + * @return known DiskCreateOption values + */ + public static Collection values() { + return values(DiskCreateOption.class); } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOptionTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOptionTypes.java index b8c17affbbe..66781dc00fe 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOptionTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOptionTypes.java @@ -8,49 +8,37 @@ package com.microsoft.azure.management.compute; +import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for DiskCreateOptionTypes. */ -public enum DiskCreateOptionTypes { - /** Enum value FromImage. */ - FROM_IMAGE("FromImage"), +public final class DiskCreateOptionTypes extends ExpandableStringEnum { + /** Static value FromImage for DiskCreateOptionTypes. */ + public static final DiskCreateOptionTypes FROM_IMAGE = fromString("FromImage"); - /** Enum value Empty. */ - EMPTY("Empty"), + /** Static value Empty for DiskCreateOptionTypes. */ + public static final DiskCreateOptionTypes EMPTY = fromString("Empty"); - /** Enum value Attach. */ - ATTACH("Attach"); - - /** The actual serialized value for a DiskCreateOptionTypes instance. */ - private String value; - - DiskCreateOptionTypes(String value) { - this.value = value; - } + /** Static value Attach for DiskCreateOptionTypes. */ + public static final DiskCreateOptionTypes ATTACH = fromString("Attach"); /** - * Parses a serialized value to a DiskCreateOptionTypes instance. - * - * @param value the serialized value to parse. - * @return the parsed DiskCreateOptionTypes object, or null if unable to parse. + * Creates or finds a DiskCreateOptionTypes from its string representation. + * @param name a name to look for + * @return the corresponding DiskCreateOptionTypes */ @JsonCreator - public static DiskCreateOptionTypes fromString(String value) { - DiskCreateOptionTypes[] items = DiskCreateOptionTypes.values(); - for (DiskCreateOptionTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static DiskCreateOptionTypes fromString(String name) { + return fromString(name, DiskCreateOptionTypes.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** + * @return known DiskCreateOptionTypes values + */ + public static Collection values() { + return values(DiskCreateOptionTypes.class); } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java index 39b94bcaf85..b42552ed482 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * The disks and snapshots sku name. Can be Standard_LRS or Premium_LRS. + * The disks sku name. Can be Standard_LRS or Premium_LRS. */ public class DiskSku { /** diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java index 616a6d8e130..d3e87946e78 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java @@ -21,7 +21,7 @@ public class ImageStorageProfile { * see [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). */ - @JsonProperty(value = "osDisk", required = true) + @JsonProperty(value = "osDisk") private ImageOSDisk osDisk; /** @@ -33,6 +33,14 @@ public class ImageStorageProfile { @JsonProperty(value = "dataDisks") private List dataDisks; + /** + * Specifies whether an image is zone resilient or not. Default is false. + * Zone resilient images can be created only in regions that provide Zone + * Redundant Storage (ZRS). + */ + @JsonProperty(value = "zoneResilient") + private Boolean zoneResilient; + /** * Get the osDisk value. * @@ -73,4 +81,24 @@ public ImageStorageProfile withDataDisks(List dataDisks) { return this; } + /** + * Get the zoneResilient value. + * + * @return the zoneResilient value + */ + public Boolean zoneResilient() { + return this.zoneResilient; + } + + /** + * Set the zoneResilient value. + * + * @param zoneResilient the zoneResilient value to set + * @return the ImageStorageProfile object itself. + */ + public ImageStorageProfile withZoneResilient(Boolean zoneResilient) { + this.zoneResilient = zoneResilient; + return this; + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageAccountTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageAccountTypes.java index ce427401d24..0f30ca9c570 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageAccountTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageAccountTypes.java @@ -8,46 +8,34 @@ package com.microsoft.azure.management.compute; +import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for StorageAccountTypes. */ -public enum StorageAccountTypes { - /** Enum value Standard_LRS. */ - STANDARD_LRS("Standard_LRS"), +public final class StorageAccountTypes extends ExpandableStringEnum { + /** Static value Standard_LRS for StorageAccountTypes. */ + public static final StorageAccountTypes STANDARD_LRS = fromString("Standard_LRS"); - /** Enum value Premium_LRS. */ - PREMIUM_LRS("Premium_LRS"); - - /** The actual serialized value for a StorageAccountTypes instance. */ - private String value; - - StorageAccountTypes(String value) { - this.value = value; - } + /** Static value Premium_LRS for StorageAccountTypes. */ + public static final StorageAccountTypes PREMIUM_LRS = fromString("Premium_LRS"); /** - * Parses a serialized value to a StorageAccountTypes instance. - * - * @param value the serialized value to parse. - * @return the parsed StorageAccountTypes object, or null if unable to parse. + * Creates or finds a StorageAccountTypes from its string representation. + * @param name a name to look for + * @return the corresponding StorageAccountTypes */ @JsonCreator - public static StorageAccountTypes fromString(String value) { - StorageAccountTypes[] items = StorageAccountTypes.values(); - for (StorageAccountTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static StorageAccountTypes fromString(String name) { + return fromString(name, StorageAccountTypes.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** + * @return known StorageAccountTypes values + */ + public static Collection values() { + return values(StorageAccountTypes.class); } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java index bff9f747b1a..4f0e7eb94b5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java @@ -172,6 +172,19 @@ public VirtualMachineExtensionsInner virtualMachineExtensions() { return this.virtualMachineExtensions; } + /** + * The VirtualMachinesInner object to access its operations. + */ + private VirtualMachinesInner virtualMachines; + + /** + * Gets the VirtualMachinesInner object to access its operations. + * @return the VirtualMachinesInner object. + */ + public VirtualMachinesInner virtualMachines() { + return this.virtualMachines; + } + /** * The VirtualMachineImagesInner object to access its operations. */ @@ -224,19 +237,6 @@ public ImagesInner images() { return this.images; } - /** - * The VirtualMachinesInner object to access its operations. - */ - private VirtualMachinesInner virtualMachines; - - /** - * Gets the VirtualMachinesInner object to access its operations. - * @return the VirtualMachinesInner object. - */ - public VirtualMachinesInner virtualMachines() { - return this.virtualMachines; - } - /** * The VirtualMachineScaleSetsInner object to access its operations. */ @@ -405,11 +405,11 @@ protected void initialize() { this.availabilitySets = new AvailabilitySetsInner(restClient().retrofit(), this); this.virtualMachineExtensionImages = new VirtualMachineExtensionImagesInner(restClient().retrofit(), this); this.virtualMachineExtensions = new VirtualMachineExtensionsInner(restClient().retrofit(), this); + this.virtualMachines = new VirtualMachinesInner(restClient().retrofit(), this); this.virtualMachineImages = new VirtualMachineImagesInner(restClient().retrofit(), this); this.usages = new UsagesInner(restClient().retrofit(), this); this.virtualMachineSizes = new VirtualMachineSizesInner(restClient().retrofit(), this); this.images = new ImagesInner(restClient().retrofit(), this); - this.virtualMachines = new VirtualMachinesInner(restClient().retrofit(), this); this.virtualMachineScaleSets = new VirtualMachineScaleSetsInner(restClient().retrofit(), this); this.virtualMachineScaleSetExtensions = new VirtualMachineScaleSetExtensionsInner(restClient().retrofit(), this); this.virtualMachineScaleSetRollingUpgrades = new VirtualMachineScaleSetRollingUpgradesInner(restClient().retrofit(), this); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java index f6a7ae05f86..8b8b7ecb7cf 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 @@ -198,7 +198,7 @@ public Observable> createOrUpdateWithServiceResponseA throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -273,7 +273,7 @@ public Observable> beginCreateOrUpdateWithServiceResp throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -366,7 +366,7 @@ public Observable> updateWithServiceResponseAsync(Str throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -441,7 +441,7 @@ public Observable> beginUpdateWithServiceResponseAsyn throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -526,7 +526,7 @@ public Observable> getByResourceGroupWithServiceRespo if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -610,7 +610,7 @@ public Observable> deleteWithServi if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -677,7 +677,7 @@ public Observable> beginDeleteWith if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginDelete(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -792,7 +792,7 @@ public Observable>> listByResourceGroupSinglePag if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -897,7 +897,7 @@ public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -989,7 +989,7 @@ public Observable> grantAccessWithServiceRespons throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.grantAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1064,7 +1064,7 @@ public Observable> beginGrantAccessWithServiceRe throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginGrantAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1149,7 +1149,7 @@ public Observable> revokeAccessWit if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.revokeAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1216,7 +1216,7 @@ public Observable> beginRevokeAcce if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginRevokeAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java index ddc0ed006e4..851559f1d20 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java @@ -8,7 +8,7 @@ package com.microsoft.azure.management.compute.implementation; -import com.microsoft.azure.management.compute.DiskSku; +import com.microsoft.azure.management.compute.SnapshotSku; import org.joda.time.DateTime; import com.microsoft.azure.management.compute.OperatingSystemTypes; import com.microsoft.azure.management.compute.CreationData; @@ -32,7 +32,7 @@ public class SnapshotInner extends Resource { * The sku property. */ @JsonProperty(value = "sku") - private DiskSku sku; + private SnapshotSku sku; /** * The time when the disk was created. @@ -89,7 +89,7 @@ public String managedBy() { * * @return the sku value */ - public DiskSku sku() { + public SnapshotSku sku() { return this.sku; } @@ -99,7 +99,7 @@ public DiskSku sku() { * @param sku the sku value to set * @return the SnapshotInner object itself. */ - public SnapshotInner withSku(DiskSku sku) { + public SnapshotInner withSku(SnapshotSku sku) { this.sku = sku; return this; } 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 bd95385db8f..3e8637ef477 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 @@ -198,7 +198,7 @@ public Observable> createOrUpdateWithServiceRespo throw new IllegalArgumentException("Parameter snapshot is required and cannot be null."); } Validator.validate(snapshot); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -273,7 +273,7 @@ public Observable> beginCreateOrUpdateWithService throw new IllegalArgumentException("Parameter snapshot is required and cannot be null."); } Validator.validate(snapshot); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -366,7 +366,7 @@ public Observable> updateWithServiceResponseAsync throw new IllegalArgumentException("Parameter snapshot is required and cannot be null."); } Validator.validate(snapshot); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -441,7 +441,7 @@ public Observable> beginUpdateWithServiceResponse throw new IllegalArgumentException("Parameter snapshot is required and cannot be null."); } Validator.validate(snapshot); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -526,7 +526,7 @@ public Observable> getByResourceGroupWithServiceR if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -610,7 +610,7 @@ public Observable> deleteWithServi if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -677,7 +677,7 @@ public Observable> beginDeleteWith if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginDelete(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -792,7 +792,7 @@ public Observable>> listByResourceGroupSingl if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -897,7 +897,7 @@ public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -989,7 +989,7 @@ public Observable> grantAccessWithServiceRespons throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.grantAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1064,7 +1064,7 @@ public Observable> beginGrantAccessWithServiceRe throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginGrantAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1149,7 +1149,7 @@ public Observable> revokeAccessWit if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.revokeAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1216,7 +1216,7 @@ public Observable> beginRevokeAcce if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginRevokeAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionUpdateInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionUpdateInner.java new file mode 100644 index 00000000000..84ad2bf4707 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionUpdateInner.java @@ -0,0 +1,208 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.compute.UpdateResource; + +/** + * Describes a Virtual Machine Extension. + */ +@JsonFlatten +public class VirtualMachineExtensionUpdateInner 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 VirtualMachineExtensionUpdateInner object itself. + */ + public VirtualMachineExtensionUpdateInner 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 VirtualMachineExtensionUpdateInner object itself. + */ + public VirtualMachineExtensionUpdateInner 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 VirtualMachineExtensionUpdateInner object itself. + */ + public VirtualMachineExtensionUpdateInner 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 VirtualMachineExtensionUpdateInner object itself. + */ + public VirtualMachineExtensionUpdateInner 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 VirtualMachineExtensionUpdateInner object itself. + */ + public VirtualMachineExtensionUpdateInner 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 VirtualMachineExtensionUpdateInner object itself. + */ + public VirtualMachineExtensionUpdateInner 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 VirtualMachineExtensionUpdateInner object itself. + */ + public VirtualMachineExtensionUpdateInner withProtectedSettings(Object protectedSettings) { + this.protectedSettings = protectedSettings; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java index d305cd8be81..eaf7bcb2d6d 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 @@ -22,6 +22,7 @@ import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; +import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -63,6 +64,14 @@ interface VirtualMachineExtensionsService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineExtensionInner 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 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); + + @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); + @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) Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -81,7 +90,7 @@ interface VirtualMachineExtensionsService { * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -97,7 +106,7 @@ public VirtualMachineExtensionInner createOrUpdate(String resourceGroupName, Str * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -112,7 +121,7 @@ public ServiceFuture createOrUpdateAsync(String re * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -131,7 +140,7 @@ public VirtualMachineExtensionInner call(ServiceResponse> createOrUpdateW * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -179,7 +188,7 @@ public VirtualMachineExtensionInner beginCreateOrUpdate(String resourceGroupName * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -194,7 +203,7 @@ public ServiceFuture beginCreateOrUpdateAsync(Stri * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -213,7 +222,7 @@ public VirtualMachineExtensionInner call(ServiceResponse beginCreateOrUpdateDelegat .build(response); } + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineExtensionInner object if successful. + */ + public VirtualMachineExtensionInner update(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { + return updateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).toBlocking().last().body(); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters), serviceCallback); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @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) { + return updateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).map(new Func1, VirtualMachineExtensionInner>() { + @Override + public VirtualMachineExtensionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmName == null) { + throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); + } + if (vmExtensionName == null) { + throw new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (extensionParameters == null) { + throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); + } + Validator.validate(extensionParameters); + final String apiVersion = "2017-12-01"; + Observable> observable = service.update(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineExtensionInner object if successful. + */ + public VirtualMachineExtensionInner beginUpdate(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).toBlocking().single().body(); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters), serviceCallback); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @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) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).map(new Func1, VirtualMachineExtensionInner>() { + @Override + public VirtualMachineExtensionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmName == null) { + throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); + } + if (vmExtensionName == null) { + throw new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (extensionParameters == null) { + throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); + } + Validator.validate(extensionParameters); + final String apiVersion = "2017-12-01"; + return service.beginUpdate(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * The operation to delete the extension. * diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsListResultInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsListResultInner.java new file mode 100644 index 00000000000..35ae87eec32 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsListResultInner.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.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The List Extension operation response. + */ +public class VirtualMachineExtensionsListResultInner { + /** + * The list of extensions. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value value. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the VirtualMachineExtensionsListResultInner object itself. + */ + public VirtualMachineExtensionsListResultInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java index 74282f47593..2bc0e32a743 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java @@ -79,6 +79,19 @@ public class VirtualMachineScaleSetInner extends Resource { @JsonProperty(value = "properties.singlePlacementGroup") private Boolean singlePlacementGroup; + /** + * Whether to force stictly even Virtual Machine distribution cross x-zones + * in case there is zone outage. + */ + @JsonProperty(value = "properties.zoneBalance") + private Boolean zoneBalance; + + /** + * Fault Domain count for each placement group. + */ + @JsonProperty(value = "properties.platformFaultDomainCount") + private Integer platformFaultDomainCount; + /** * The identity of the virtual machine scale set, if configured. */ @@ -229,6 +242,46 @@ public VirtualMachineScaleSetInner withSinglePlacementGroup(Boolean singlePlacem return this; } + /** + * Get the zoneBalance value. + * + * @return the zoneBalance value + */ + public Boolean zoneBalance() { + return this.zoneBalance; + } + + /** + * Set the zoneBalance value. + * + * @param zoneBalance the zoneBalance value to set + * @return the VirtualMachineScaleSetInner object itself. + */ + public VirtualMachineScaleSetInner withZoneBalance(Boolean zoneBalance) { + this.zoneBalance = zoneBalance; + 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 VirtualMachineScaleSetInner object itself. + */ + public VirtualMachineScaleSetInner withPlatformFaultDomainCount(Integer platformFaultDomainCount) { + this.platformFaultDomainCount = platformFaultDomainCount; + return this; + } + /** * Get the identity value. * diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java index 95d03b488b9..d7e523a6abb 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.compute.implementation; import com.microsoft.azure.management.compute.VirtualMachineAgentInstanceView; +import com.microsoft.azure.management.compute.MaintenanceRedeployStatus; import java.util.List; import com.microsoft.azure.management.compute.DiskInstanceView; import com.microsoft.azure.management.compute.VirtualMachineExtensionInstanceView; @@ -45,6 +46,12 @@ public class VirtualMachineScaleSetVMInstanceViewInner { @JsonProperty(value = "vmAgent") private VirtualMachineAgentInstanceView vmAgent; + /** + * The Maintenance Operation status on the virtual machine. + */ + @JsonProperty(value = "maintenanceRedeployStatus") + private MaintenanceRedeployStatus maintenanceRedeployStatus; + /** * The disks information. */ @@ -167,6 +174,26 @@ public VirtualMachineScaleSetVMInstanceViewInner withVmAgent(VirtualMachineAgent return this; } + /** + * Get the maintenanceRedeployStatus value. + * + * @return the maintenanceRedeployStatus value + */ + public MaintenanceRedeployStatus maintenanceRedeployStatus() { + return this.maintenanceRedeployStatus; + } + + /** + * Set the maintenanceRedeployStatus value. + * + * @param maintenanceRedeployStatus the maintenanceRedeployStatus value to set + * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. + */ + public VirtualMachineScaleSetVMInstanceViewInner withMaintenanceRedeployStatus(MaintenanceRedeployStatus maintenanceRedeployStatus) { + this.maintenanceRedeployStatus = maintenanceRedeployStatus; + return this; + } + /** * Get the disks value. * diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java index df3a5c9885d..b7c3251ed48 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java @@ -138,6 +138,22 @@ interface VirtualMachineScaleSetVMsService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start") Observable> beginStart(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @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.VirtualMachineScaleSetVMs redeploy" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy") + Observable> redeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @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.VirtualMachineScaleSetVMs beginRedeploy" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy") + Observable> beginRedeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @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.VirtualMachineScaleSetVMs performMaintenance" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance") + Observable> performMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @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.VirtualMachineScaleSetVMs beginPerformMaintenance" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance") + Observable> beginPerformMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @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.VirtualMachineScaleSetVMs listNext" }) @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -1924,6 +1940,338 @@ private ServiceResponse beginStartDelegate(Respons .build(response); } + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner redeploy(String resourceGroupName, String vmScaleSetName, String instanceId) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginRedeploy(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + return service.beginRedeploy(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRedeployDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Gets a list of all virtual machines in a VM scale sets. * 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 e738a5ffc2c..9ca36448448 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 @@ -152,6 +152,22 @@ interface VirtualMachineScaleSetsService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start") Observable> beginStart(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets redeploy" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy") + Observable> redeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginRedeploy" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy") + Observable> beginRedeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets performMaintenance" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance") + Observable> performMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginPerformMaintenance" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance") + Observable> beginPerformMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets updateInstances" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade") Observable> updateInstances(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @@ -2645,6 +2661,648 @@ private ServiceResponse beginStartDelegate(Respons .build(response); } + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner redeploy(String resourceGroupName, String vmScaleSetName) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable redeployAsync(String resourceGroupName, String vmScaleSetName) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(null); + Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner redeploy(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(instanceIds); + final String apiVersion = "2017-12-01"; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; + if (instanceIds != null) { + vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(instanceIds); + } + Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginRedeploy(String resourceGroupName, String vmScaleSetName) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + final List instanceIds = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(null); + return service.beginRedeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRedeployDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginRedeploy(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Redeploy one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(instanceIds); + final String apiVersion = "2017-12-01"; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; + if (instanceIds != null) { + vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(instanceIds); + } + return service.beginRedeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRedeployDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Perform maintenance on one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmScaleSetName) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + } + + /** + * Perform maintenance on one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); + } + + /** + * Perform maintenance on one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Perform maintenance on one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(null); + Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Perform maintenance on one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + } + + /** + * Perform maintenance on one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + } + + /** + * Perform maintenance on one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Perform maintenance on one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(instanceIds); + final String apiVersion = "2017-12-01"; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; + if (instanceIds != null) { + vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(instanceIds); + } + Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Perform maintenance on one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmScaleSetName) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + } + + /** + * Perform maintenance on one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); + } + + /** + * Perform maintenance on one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Perform maintenance on one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + final List instanceIds = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(null); + return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Perform maintenance on one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + } + + /** + * Perform maintenance on one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + } + + /** + * Perform maintenance on one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Perform maintenance on one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(instanceIds); + final String apiVersion = "2017-12-01"; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; + if (instanceIds != null) { + vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(instanceIds); + } + return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. * 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 78a4b7ddfcb..83d7664d18c 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 @@ -67,6 +67,10 @@ public VirtualMachinesInner(Retrofit retrofit, ComputeManagementClientImpl clien * used by Retrofit to perform actually REST calls. */ interface VirtualMachinesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines getExtensions" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions") + Observable> getExtensions(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines capture" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture") Observable> capture(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineCaptureParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -197,6 +201,172 @@ interface VirtualMachinesService { } + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineExtensionsListResultInner object if successful. + */ + public VirtualMachineExtensionsListResultInner getExtensions(String resourceGroupName, String vmName) { + return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getExtensionsAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getExtensionsWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionsListResultInner object + */ + public Observable getExtensionsAsync(String resourceGroupName, String vmName) { + return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, VirtualMachineExtensionsListResultInner>() { + @Override + public VirtualMachineExtensionsListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionsListResultInner object + */ + public Observable> getExtensionsWithServiceResponseAsync(String resourceGroupName, String vmName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmName == null) { + throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + final String expand = null; + return service.getExtensions(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getExtensionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineExtensionsListResultInner object if successful. + */ + public VirtualMachineExtensionsListResultInner getExtensions(String resourceGroupName, String vmName, String expand) { + return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName, expand).toBlocking().single().body(); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getExtensionsAsync(String resourceGroupName, String vmName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getExtensionsWithServiceResponseAsync(resourceGroupName, vmName, expand), serviceCallback); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionsListResultInner object + */ + public Observable getExtensionsAsync(String resourceGroupName, String vmName, String expand) { + return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName, expand).map(new Func1, VirtualMachineExtensionsListResultInner>() { + @Override + public VirtualMachineExtensionsListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionsListResultInner object + */ + public Observable> getExtensionsWithServiceResponseAsync(String resourceGroupName, String vmName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmName == null) { + throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + return service.getExtensions(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getExtensionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getExtensionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * From 09018a320ea5d97dcc2b8d414b14f585e66e0217 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 26 Mar 2018 13:20:37 -0700 Subject: [PATCH 05/15] Generated from c7c6787a288fdc3447bfd28568032e1c966275e7 (#11) Update config for Go SDK Switched to package-2018-04 per request of the compute team (similar change was done for package-2017-03). Removed package-2017-12 for now as it fails to build. --- .../ComputeManagementClientImpl.java | 28 +-- .../VirtualMachineExtensionsInner.java | 206 +----------------- .../implementation/VirtualMachinesInner.java | 170 --------------- 3 files changed, 22 insertions(+), 382 deletions(-) diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java index 4f0e7eb94b5..bff9f747b1a 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java @@ -172,19 +172,6 @@ public VirtualMachineExtensionsInner virtualMachineExtensions() { return this.virtualMachineExtensions; } - /** - * The VirtualMachinesInner object to access its operations. - */ - private VirtualMachinesInner virtualMachines; - - /** - * Gets the VirtualMachinesInner object to access its operations. - * @return the VirtualMachinesInner object. - */ - public VirtualMachinesInner virtualMachines() { - return this.virtualMachines; - } - /** * The VirtualMachineImagesInner object to access its operations. */ @@ -237,6 +224,19 @@ public ImagesInner images() { return this.images; } + /** + * The VirtualMachinesInner object to access its operations. + */ + private VirtualMachinesInner virtualMachines; + + /** + * Gets the VirtualMachinesInner object to access its operations. + * @return the VirtualMachinesInner object. + */ + public VirtualMachinesInner virtualMachines() { + return this.virtualMachines; + } + /** * The VirtualMachineScaleSetsInner object to access its operations. */ @@ -405,11 +405,11 @@ protected void initialize() { this.availabilitySets = new AvailabilitySetsInner(restClient().retrofit(), this); this.virtualMachineExtensionImages = new VirtualMachineExtensionImagesInner(restClient().retrofit(), this); this.virtualMachineExtensions = new VirtualMachineExtensionsInner(restClient().retrofit(), this); - this.virtualMachines = new VirtualMachinesInner(restClient().retrofit(), this); this.virtualMachineImages = new VirtualMachineImagesInner(restClient().retrofit(), this); this.usages = new UsagesInner(restClient().retrofit(), this); this.virtualMachineSizes = new VirtualMachineSizesInner(restClient().retrofit(), this); this.images = new ImagesInner(restClient().retrofit(), this); + this.virtualMachines = new VirtualMachinesInner(restClient().retrofit(), this); this.virtualMachineScaleSets = new VirtualMachineScaleSetsInner(restClient().retrofit(), this); this.virtualMachineScaleSetExtensions = new VirtualMachineScaleSetExtensionsInner(restClient().retrofit(), this); this.virtualMachineScaleSetRollingUpgrades = new VirtualMachineScaleSetRollingUpgradesInner(restClient().retrofit(), this); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java index eaf7bcb2d6d..d305cd8be81 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 @@ -22,7 +22,6 @@ import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; -import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -64,14 +63,6 @@ interface VirtualMachineExtensionsService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineExtensionInner 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 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); - - @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); - @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) Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -90,7 +81,7 @@ interface VirtualMachineExtensionsService { * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be created or updated. + * @param vmName The name of the virtual machine where the extension should be create or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -106,7 +97,7 @@ public VirtualMachineExtensionInner createOrUpdate(String resourceGroupName, Str * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be created or updated. + * @param vmName The name of the virtual machine where the extension should be create or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -121,7 +112,7 @@ public ServiceFuture createOrUpdateAsync(String re * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be created or updated. + * @param vmName The name of the virtual machine where the extension should be create or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -140,7 +131,7 @@ public VirtualMachineExtensionInner call(ServiceResponse> createOrUpdateW * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be created or updated. + * @param vmName The name of the virtual machine where the extension should be create or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -188,7 +179,7 @@ public VirtualMachineExtensionInner beginCreateOrUpdate(String resourceGroupName * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be created or updated. + * @param vmName The name of the virtual machine where the extension should be create or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -203,7 +194,7 @@ public ServiceFuture beginCreateOrUpdateAsync(Stri * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be created or updated. + * @param vmName The name of the virtual machine where the extension should be create or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -222,7 +213,7 @@ public VirtualMachineExtensionInner call(ServiceResponse beginCreateOrUpdateDelegat .build(response); } - /** - * The operation to update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VirtualMachineExtensionInner object if successful. - */ - public VirtualMachineExtensionInner update(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { - return updateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).toBlocking().last().body(); - } - - /** - * The operation to update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters), serviceCallback); - } - - /** - * The operation to update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. - * @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) { - return updateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).map(new Func1, VirtualMachineExtensionInner>() { - @Override - public VirtualMachineExtensionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * The operation to update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmName == null) { - throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); - } - if (vmExtensionName == null) { - throw new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (extensionParameters == null) { - throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); - } - Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; - Observable> observable = service.update(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * The operation to update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VirtualMachineExtensionInner object if successful. - */ - public VirtualMachineExtensionInner beginUpdate(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { - return beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).toBlocking().single().body(); - } - - /** - * The operation to update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginUpdateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters), serviceCallback); - } - - /** - * The operation to update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. - * @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) { - return beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).map(new Func1, VirtualMachineExtensionInner>() { - @Override - public VirtualMachineExtensionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * The operation to update the extension. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualMachineExtensionInner object - */ - public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmName == null) { - throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); - } - if (vmExtensionName == null) { - throw new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (extensionParameters == null) { - throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); - } - Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; - return service.beginUpdate(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** * The operation to delete the extension. * 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..78a4b7ddfcb 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 @@ -67,10 +67,6 @@ public VirtualMachinesInner(Retrofit retrofit, ComputeManagementClientImpl clien * used by Retrofit to perform actually REST calls. */ interface VirtualMachinesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines getExtensions" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions") - Observable> getExtensions(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines capture" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture") Observable> capture(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineCaptureParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -201,172 +197,6 @@ interface VirtualMachinesService { } - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VirtualMachineExtensionsListResultInner object if successful. - */ - public VirtualMachineExtensionsListResultInner getExtensions(String resourceGroupName, String vmName) { - return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); - } - - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getExtensionsAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getExtensionsWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); - } - - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualMachineExtensionsListResultInner object - */ - public Observable getExtensionsAsync(String resourceGroupName, String vmName) { - return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, VirtualMachineExtensionsListResultInner>() { - @Override - public VirtualMachineExtensionsListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualMachineExtensionsListResultInner object - */ - public Observable> getExtensionsWithServiceResponseAsync(String resourceGroupName, String vmName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmName == null) { - throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2017-12-01"; - final String expand = null; - return service.getExtensions(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getExtensionsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @param expand The expand expression to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VirtualMachineExtensionsListResultInner object if successful. - */ - public VirtualMachineExtensionsListResultInner getExtensions(String resourceGroupName, String vmName, String expand) { - return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName, expand).toBlocking().single().body(); - } - - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @param expand The expand expression to apply on the operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getExtensionsAsync(String resourceGroupName, String vmName, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getExtensionsWithServiceResponseAsync(resourceGroupName, vmName, expand), serviceCallback); - } - - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @param expand The expand expression to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualMachineExtensionsListResultInner object - */ - public Observable getExtensionsAsync(String resourceGroupName, String vmName, String expand) { - return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName, expand).map(new Func1, VirtualMachineExtensionsListResultInner>() { - @Override - public VirtualMachineExtensionsListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @param expand The expand expression to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualMachineExtensionsListResultInner object - */ - public Observable> getExtensionsWithServiceResponseAsync(String resourceGroupName, String vmName, String expand) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (vmName == null) { - throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2017-12-01"; - return service.getExtensions(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getExtensionsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getExtensionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * From 090c44e099b22a3dc3ac22c5ef0122e161186966 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 26 Mar 2018 14:34:44 -0700 Subject: [PATCH 06/15] Generated from 9117a2903580ccfea2088a766843a698728790d8 (#12) added suppressions From 04dddadebffac6c0074974511e58781843d3c82d Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 28 Mar 2018 11:14:11 -0700 Subject: [PATCH 07/15] Generated from 86d35f2db719327df04a1774debe868c9b1f232e (#14) Adding PATCH to 2015-06-15 --- .../ComputeManagementClientImpl.java | 28 +-- .../VirtualMachineExtensionsInner.java | 206 +++++++++++++++++- .../implementation/VirtualMachinesInner.java | 170 +++++++++++++++ 3 files changed, 382 insertions(+), 22 deletions(-) diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java index bff9f747b1a..4f0e7eb94b5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java @@ -172,6 +172,19 @@ public VirtualMachineExtensionsInner virtualMachineExtensions() { return this.virtualMachineExtensions; } + /** + * The VirtualMachinesInner object to access its operations. + */ + private VirtualMachinesInner virtualMachines; + + /** + * Gets the VirtualMachinesInner object to access its operations. + * @return the VirtualMachinesInner object. + */ + public VirtualMachinesInner virtualMachines() { + return this.virtualMachines; + } + /** * The VirtualMachineImagesInner object to access its operations. */ @@ -224,19 +237,6 @@ public ImagesInner images() { return this.images; } - /** - * The VirtualMachinesInner object to access its operations. - */ - private VirtualMachinesInner virtualMachines; - - /** - * Gets the VirtualMachinesInner object to access its operations. - * @return the VirtualMachinesInner object. - */ - public VirtualMachinesInner virtualMachines() { - return this.virtualMachines; - } - /** * The VirtualMachineScaleSetsInner object to access its operations. */ @@ -405,11 +405,11 @@ protected void initialize() { this.availabilitySets = new AvailabilitySetsInner(restClient().retrofit(), this); this.virtualMachineExtensionImages = new VirtualMachineExtensionImagesInner(restClient().retrofit(), this); this.virtualMachineExtensions = new VirtualMachineExtensionsInner(restClient().retrofit(), this); + this.virtualMachines = new VirtualMachinesInner(restClient().retrofit(), this); this.virtualMachineImages = new VirtualMachineImagesInner(restClient().retrofit(), this); this.usages = new UsagesInner(restClient().retrofit(), this); this.virtualMachineSizes = new VirtualMachineSizesInner(restClient().retrofit(), this); this.images = new ImagesInner(restClient().retrofit(), this); - this.virtualMachines = new VirtualMachinesInner(restClient().retrofit(), this); this.virtualMachineScaleSets = new VirtualMachineScaleSetsInner(restClient().retrofit(), this); this.virtualMachineScaleSetExtensions = new VirtualMachineScaleSetExtensionsInner(restClient().retrofit(), this); this.virtualMachineScaleSetRollingUpgrades = new VirtualMachineScaleSetRollingUpgradesInner(restClient().retrofit(), this); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java index d305cd8be81..eaf7bcb2d6d 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 @@ -22,6 +22,7 @@ import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; +import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -63,6 +64,14 @@ interface VirtualMachineExtensionsService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineExtensionInner 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 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); + + @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); + @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) Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -81,7 +90,7 @@ interface VirtualMachineExtensionsService { * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -97,7 +106,7 @@ public VirtualMachineExtensionInner createOrUpdate(String resourceGroupName, Str * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -112,7 +121,7 @@ public ServiceFuture createOrUpdateAsync(String re * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -131,7 +140,7 @@ public VirtualMachineExtensionInner call(ServiceResponse> createOrUpdateW * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -179,7 +188,7 @@ public VirtualMachineExtensionInner beginCreateOrUpdate(String resourceGroupName * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -194,7 +203,7 @@ public ServiceFuture beginCreateOrUpdateAsync(Stri * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -213,7 +222,7 @@ public VirtualMachineExtensionInner call(ServiceResponse beginCreateOrUpdateDelegat .build(response); } + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineExtensionInner object if successful. + */ + public VirtualMachineExtensionInner update(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { + return updateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).toBlocking().last().body(); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters), serviceCallback); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @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) { + return updateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).map(new Func1, VirtualMachineExtensionInner>() { + @Override + public VirtualMachineExtensionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmName == null) { + throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); + } + if (vmExtensionName == null) { + throw new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (extensionParameters == null) { + throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); + } + Validator.validate(extensionParameters); + final String apiVersion = "2017-12-01"; + Observable> observable = service.update(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineExtensionInner object if successful. + */ + public VirtualMachineExtensionInner beginUpdate(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).toBlocking().single().body(); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters), serviceCallback); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @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) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).map(new Func1, VirtualMachineExtensionInner>() { + @Override + public VirtualMachineExtensionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdateInner extensionParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmName == null) { + throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); + } + if (vmExtensionName == null) { + throw new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (extensionParameters == null) { + throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); + } + Validator.validate(extensionParameters); + final String apiVersion = "2017-12-01"; + return service.beginUpdate(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * The operation to delete the extension. * 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 78a4b7ddfcb..83d7664d18c 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 @@ -67,6 +67,10 @@ public VirtualMachinesInner(Retrofit retrofit, ComputeManagementClientImpl clien * used by Retrofit to perform actually REST calls. */ interface VirtualMachinesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines getExtensions" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions") + Observable> getExtensions(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines capture" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture") Observable> capture(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineCaptureParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -197,6 +201,172 @@ interface VirtualMachinesService { } + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineExtensionsListResultInner object if successful. + */ + public VirtualMachineExtensionsListResultInner getExtensions(String resourceGroupName, String vmName) { + return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getExtensionsAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getExtensionsWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionsListResultInner object + */ + public Observable getExtensionsAsync(String resourceGroupName, String vmName) { + return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, VirtualMachineExtensionsListResultInner>() { + @Override + public VirtualMachineExtensionsListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionsListResultInner object + */ + public Observable> getExtensionsWithServiceResponseAsync(String resourceGroupName, String vmName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmName == null) { + throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + final String expand = null; + return service.getExtensions(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getExtensionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineExtensionsListResultInner object if successful. + */ + public VirtualMachineExtensionsListResultInner getExtensions(String resourceGroupName, String vmName, String expand) { + return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName, expand).toBlocking().single().body(); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getExtensionsAsync(String resourceGroupName, String vmName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getExtensionsWithServiceResponseAsync(resourceGroupName, vmName, expand), serviceCallback); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionsListResultInner object + */ + public Observable getExtensionsAsync(String resourceGroupName, String vmName, String expand) { + return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName, expand).map(new Func1, VirtualMachineExtensionsListResultInner>() { + @Override + public VirtualMachineExtensionsListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionsListResultInner object + */ + public Observable> getExtensionsWithServiceResponseAsync(String resourceGroupName, String vmName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmName == null) { + throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + return service.getExtensions(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getExtensionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getExtensionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * From 70abd1134694ab5a7cb62d52471a0a950a977dc6 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 9 Apr 2018 11:04:09 -0700 Subject: [PATCH 08/15] [AutoPR compute/resource-manager] Added Eviction Policy Property for VirtualMachineScaleSetVMProfile for version 2017-12-01 (#64) * Generated from ab266460a5418919d40261eb06f280da380e771a comit * Generated from 57858e7e576c2e84a8ddc038e8e915497b7a2c3d Changed evictionpolicy modelasstring to true --- .../VirtualMachineEvictionPolicyTypes.java | 41 +++++++++++++++++++ .../VirtualMachineScaleSetVMProfile.java | 28 +++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineEvictionPolicyTypes.java diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineEvictionPolicyTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineEvictionPolicyTypes.java new file mode 100644 index 00000000000..21c3f09eeaa --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineEvictionPolicyTypes.java @@ -0,0 +1,41 @@ +/** + * 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.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VirtualMachineEvictionPolicyTypes. + */ +public final class VirtualMachineEvictionPolicyTypes extends ExpandableStringEnum { + /** Static value Deallocate for VirtualMachineEvictionPolicyTypes. */ + public static final VirtualMachineEvictionPolicyTypes DEALLOCATE = fromString("Deallocate"); + + /** Static value Delete for VirtualMachineEvictionPolicyTypes. */ + public static final VirtualMachineEvictionPolicyTypes DELETE = fromString("Delete"); + + /** + * Creates or finds a VirtualMachineEvictionPolicyTypes from its string representation. + * @param name a name to look for + * @return the corresponding VirtualMachineEvictionPolicyTypes + */ + @JsonCreator + public static VirtualMachineEvictionPolicyTypes fromString(String name) { + return fromString(name, VirtualMachineEvictionPolicyTypes.class); + } + + /** + * @return known VirtualMachineEvictionPolicyTypes values + */ + public static Collection values() { + return values(VirtualMachineEvictionPolicyTypes.class); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java index eb0b85307dd..d6eb8a39b22 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java @@ -71,6 +71,14 @@ public class VirtualMachineScaleSetVMProfile { @JsonProperty(value = "priority") private VirtualMachinePriorityTypes priority; + /** + * Specifies the eviction policy for virtual machines in the low priority + * scale set. <br><br>Minimum api-version: 2017-10-30-preview. + * Possible values include: 'Deallocate', 'Delete'. + */ + @JsonProperty(value = "evictionPolicy") + private VirtualMachineEvictionPolicyTypes evictionPolicy; + /** * Get the osProfile value. * @@ -211,4 +219,24 @@ public VirtualMachineScaleSetVMProfile withPriority(VirtualMachinePriorityTypes return this; } + /** + * Get the evictionPolicy value. + * + * @return the evictionPolicy value + */ + public VirtualMachineEvictionPolicyTypes evictionPolicy() { + return this.evictionPolicy; + } + + /** + * Set the evictionPolicy value. + * + * @param evictionPolicy the evictionPolicy value to set + * @return the VirtualMachineScaleSetVMProfile object itself. + */ + public VirtualMachineScaleSetVMProfile withEvictionPolicy(VirtualMachineEvictionPolicyTypes evictionPolicy) { + this.evictionPolicy = evictionPolicy; + return this; + } + } From 54ede76a7259a4cf4be44184a7f1fc3139d7dd14 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 16 Apr 2018 15:25:26 -0700 Subject: [PATCH 09/15] Generated from 75d27eb3c72fa6b6e0f98ea126576da3f5a31544 (#74) Fix minor typos in compute. --- ...erationHistoricalStatusInfoProperties.java | 94 +++++++ .../UpgradeOperationHistoryStatus.java | 64 +++++ .../compute/UpgradeOperationInvoker.java | 56 ++++ .../management/compute/UpgradeState.java | 59 +++++ .../VirtualMachineScaleSetVMProfile.java | 2 +- .../AvailabilitySetUpdateInner.java | 10 +- .../implementation/ImageUpdateInner.java | 4 +- ...adeOperationHistoricalStatusInfoInner.java | 63 +++++ .../VirtualMachineScaleSetsInner.java | 240 ++++++++++++++++++ .../VirtualMachineUpdateInner.java | 2 +- 10 files changed, 580 insertions(+), 14 deletions(-) create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoryStatus.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationInvoker.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeState.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UpgradeOperationHistoricalStatusInfoInner.java diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java new file mode 100644 index 00000000000..8caf3e303f6 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java @@ -0,0 +1,94 @@ +/** + * 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.management.compute.implementation.ImageReferenceInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes each OS upgrade on the Virtual Machine Scale Set. + */ +public class UpgradeOperationHistoricalStatusInfoProperties { + /** + * Information about the overall status of the upgrade operation. + */ + @JsonProperty(value = "runningStatus", access = JsonProperty.Access.WRITE_ONLY) + private UpgradeOperationHistoryStatus runningStatus; + + /** + * Counts of the VM's in each state. + */ + @JsonProperty(value = "progress", access = JsonProperty.Access.WRITE_ONLY) + private RollingUpgradeProgressInfo progress; + + /** + * Error Details for this upgrade if there are any. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private ApiError error; + + /** + * Invoker of the Upgrade Operation. Possible values include: 'Unknown', + * 'User', 'Platform'. + */ + @JsonProperty(value = "startedBy", access = JsonProperty.Access.WRITE_ONLY) + private UpgradeOperationInvoker startedBy; + + /** + * Image Reference details. + */ + @JsonProperty(value = "targetImageReference", access = JsonProperty.Access.WRITE_ONLY) + private ImageReferenceInner targetImageReference; + + /** + * Get the runningStatus value. + * + * @return the runningStatus value + */ + public UpgradeOperationHistoryStatus runningStatus() { + return this.runningStatus; + } + + /** + * Get the progress value. + * + * @return the progress value + */ + public RollingUpgradeProgressInfo progress() { + return this.progress; + } + + /** + * Get the error value. + * + * @return the error value + */ + public ApiError error() { + return this.error; + } + + /** + * Get the startedBy value. + * + * @return the startedBy value + */ + public UpgradeOperationInvoker startedBy() { + return this.startedBy; + } + + /** + * Get the targetImageReference value. + * + * @return the targetImageReference value + */ + public ImageReferenceInner targetImageReference() { + return this.targetImageReference; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoryStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoryStatus.java new file mode 100644 index 00000000000..05246efb3db --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoryStatus.java @@ -0,0 +1,64 @@ +/** + * 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 org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about the current running state of the overall upgrade. + */ +public class UpgradeOperationHistoryStatus { + /** + * Code indicating the current status of the upgrade. Possible values + * include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted'. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private UpgradeState code; + + /** + * Start time of the upgrade. + */ + @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startTime; + + /** + * End time of the upgrade. + */ + @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endTime; + + /** + * Get the code value. + * + * @return the code value + */ + public UpgradeState code() { + return this.code; + } + + /** + * Get the startTime value. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime value. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationInvoker.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationInvoker.java new file mode 100644 index 00000000000..5347e60514b --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationInvoker.java @@ -0,0 +1,56 @@ +/** + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for UpgradeOperationInvoker. + */ +public enum UpgradeOperationInvoker { + /** Enum value Unknown. */ + UNKNOWN("Unknown"), + + /** Enum value User. */ + USER("User"), + + /** Enum value Platform. */ + PLATFORM("Platform"); + + /** The actual serialized value for a UpgradeOperationInvoker instance. */ + private String value; + + UpgradeOperationInvoker(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a UpgradeOperationInvoker instance. + * + * @param value the serialized value to parse. + * @return the parsed UpgradeOperationInvoker object, or null if unable to parse. + */ + @JsonCreator + public static UpgradeOperationInvoker fromString(String value) { + UpgradeOperationInvoker[] items = UpgradeOperationInvoker.values(); + for (UpgradeOperationInvoker item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeState.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeState.java new file mode 100644 index 00000000000..4c8c2239ed9 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeState.java @@ -0,0 +1,59 @@ +/** + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for UpgradeState. + */ +public enum UpgradeState { + /** Enum value RollingForward. */ + ROLLING_FORWARD("RollingForward"), + + /** Enum value Cancelled. */ + CANCELLED("Cancelled"), + + /** Enum value Completed. */ + COMPLETED("Completed"), + + /** Enum value Faulted. */ + FAULTED("Faulted"); + + /** The actual serialized value for a UpgradeState instance. */ + private String value; + + UpgradeState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a UpgradeState instance. + * + * @param value the serialized value to parse. + * @return the parsed UpgradeState object, or null if unable to parse. + */ + @JsonCreator + public static UpgradeState fromString(String value) { + UpgradeState[] items = UpgradeState.values(); + for (UpgradeState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java index d6eb8a39b22..346adc9f02f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java @@ -72,7 +72,7 @@ public class VirtualMachineScaleSetVMProfile { private VirtualMachinePriorityTypes priority; /** - * Specifies the eviction policy for virtual machines in the low priority + * Specifies the eviction policy for virtual machines in a low priority * scale set. <br><br>Minimum api-version: 2017-10-30-preview. * Possible values include: 'Deallocate', 'Delete'. */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetUpdateInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetUpdateInner.java index 6d26aa6a3fe..2b2474840db 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetUpdateInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetUpdateInner.java @@ -18,15 +18,7 @@ /** * 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. + * should be assigned to. Only tags may be updated. */ @JsonFlatten public class AvailabilitySetUpdateInner extends UpdateResource { diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageUpdateInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageUpdateInner.java index 505fa198d32..2c00425ba57 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageUpdateInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageUpdateInner.java @@ -15,9 +15,7 @@ import com.microsoft.azure.management.compute.UpdateResource; /** - * The source user image virtual hard disk. The virtual hard disk will be - * copied before being attached to the virtual machine. If SourceImage is - * provided, the destination virtual hard drive must not exist. + * The source user image virtual hard disk. Only tags may be updated. */ @JsonFlatten public class ImageUpdateInner extends UpdateResource { diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UpgradeOperationHistoricalStatusInfoInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UpgradeOperationHistoricalStatusInfoInner.java new file mode 100644 index 00000000000..18e68d2cb21 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UpgradeOperationHistoricalStatusInfoInner.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.UpgradeOperationHistoricalStatusInfoProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Virtual Machine Scale Set OS Upgrade History operation response. + */ +public class UpgradeOperationHistoricalStatusInfoInner { + /** + * Information about the properties of the upgrade operation. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private UpgradeOperationHistoricalStatusInfoProperties properties; + + /** + * Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Resource location. + */ + @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) + private String location; + + /** + * Get the properties value. + * + * @return the properties value + */ + public UpgradeOperationHistoricalStatusInfoProperties properties() { + return this.properties; + } + + /** + * Get the type value. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get the location value. + * + * @return the location value + */ + public String location() { + return this.location; + } + +} 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 9ca36448448..cd60ad34a27 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 @@ -128,6 +128,10 @@ interface VirtualMachineScaleSetsService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus") Observable> listSkus(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @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 getOSUpgradeHistory" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory") + Observable> getOSUpgradeHistory(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @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 powerOff" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff") Observable> powerOff(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @@ -208,6 +212,10 @@ interface VirtualMachineScaleSetsService { @GET Observable> listSkusNext(@Url String nextUrl, @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 getOSUpgradeHistoryNext" }) + @GET + Observable> getOSUpgradeHistoryNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -1698,6 +1706,127 @@ private ServiceResponse> listSkusDeleg .build(response); } + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<UpgradeOperationHistoricalStatusInfoInner> object if successful. + */ + public PagedList getOSUpgradeHistory(final String resourceGroupName, final String vmScaleSetName) { + ServiceResponse> response = getOSUpgradeHistorySinglePageAsync(resourceGroupName, vmScaleSetName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getOSUpgradeHistoryAsync(final String resourceGroupName, final String vmScaleSetName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getOSUpgradeHistorySinglePageAsync(resourceGroupName, vmScaleSetName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UpgradeOperationHistoricalStatusInfoInner> object + */ + public Observable> getOSUpgradeHistoryAsync(final String resourceGroupName, final String vmScaleSetName) { + return getOSUpgradeHistoryWithServiceResponseAsync(resourceGroupName, vmScaleSetName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UpgradeOperationHistoricalStatusInfoInner> object + */ + public Observable>> getOSUpgradeHistoryWithServiceResponseAsync(final String resourceGroupName, final String vmScaleSetName) { + return getOSUpgradeHistorySinglePageAsync(resourceGroupName, vmScaleSetName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getOSUpgradeHistoryNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<UpgradeOperationHistoricalStatusInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getOSUpgradeHistorySinglePageAsync(final String resourceGroupName, final String vmScaleSetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01"; + return service.getOSUpgradeHistory(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getOSUpgradeHistoryDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getOSUpgradeHistoryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. * @@ -4538,4 +4667,115 @@ private ServiceResponse> listSkusNextD .build(response); } + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<UpgradeOperationHistoricalStatusInfoInner> object if successful. + */ + public PagedList getOSUpgradeHistoryNext(final String nextPageLink) { + ServiceResponse> response = getOSUpgradeHistoryNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getOSUpgradeHistoryNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getOSUpgradeHistoryNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UpgradeOperationHistoricalStatusInfoInner> object + */ + public Observable> getOSUpgradeHistoryNextAsync(final String nextPageLink) { + return getOSUpgradeHistoryNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UpgradeOperationHistoricalStatusInfoInner> object + */ + public Observable>> getOSUpgradeHistoryNextWithServiceResponseAsync(final String nextPageLink) { + return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getOSUpgradeHistoryNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<UpgradeOperationHistoricalStatusInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getOSUpgradeHistoryNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.getOSUpgradeHistoryNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getOSUpgradeHistoryNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getOSUpgradeHistoryNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineUpdateInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineUpdateInner.java index beebee6fe43..26d3a8aa84c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineUpdateInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineUpdateInner.java @@ -22,7 +22,7 @@ import com.microsoft.azure.management.compute.UpdateResource; /** - * Describes a Virtual Machine. + * Describes a Virtual Machine Update. */ @JsonFlatten public class VirtualMachineUpdateInner extends UpdateResource { From 868d42c7393dd3361c4ed679716cc24d052ce3be Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 27 Apr 2018 13:08:00 -0700 Subject: [PATCH 10/15] Generated from c0def97e9fc1e839db7727fd31c2f583f6cf04d6 (#123) updated OS Upgrade History API (cherry picked from commit e784ecac207c88dda10fa0986609907486994913) --- .../compute/RollbackStatusInfo.java | 63 +++++++++++++++++++ ...erationHistoricalStatusInfoProperties.java | 15 +++++ 2 files changed, 78 insertions(+) create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollbackStatusInfo.java diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollbackStatusInfo.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollbackStatusInfo.java new file mode 100644 index 00000000000..5f2a1bbcba9 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollbackStatusInfo.java @@ -0,0 +1,63 @@ +/** + * 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; + +/** + * Information about rollback on failed VM instances after a OS Upgrade + * operation. + */ +public class RollbackStatusInfo { + /** + * The number of instances which have been successfully rolled back. + */ + @JsonProperty(value = "successfullyRolledbackInstanceCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer successfullyRolledbackInstanceCount; + + /** + * The number of instances which failed to rollback. + */ + @JsonProperty(value = "failedRolledbackInstanceCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer failedRolledbackInstanceCount; + + /** + * Error Details if OS rollback failed. + */ + @JsonProperty(value = "rollbackError", access = JsonProperty.Access.WRITE_ONLY) + private ApiError rollbackError; + + /** + * Get the successfullyRolledbackInstanceCount value. + * + * @return the successfullyRolledbackInstanceCount value + */ + public Integer successfullyRolledbackInstanceCount() { + return this.successfullyRolledbackInstanceCount; + } + + /** + * Get the failedRolledbackInstanceCount value. + * + * @return the failedRolledbackInstanceCount value + */ + public Integer failedRolledbackInstanceCount() { + return this.failedRolledbackInstanceCount; + } + + /** + * Get the rollbackError value. + * + * @return the rollbackError value + */ + public ApiError rollbackError() { + return this.rollbackError; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java index 8caf3e303f6..3803354d9c2 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java @@ -46,6 +46,12 @@ public class UpgradeOperationHistoricalStatusInfoProperties { @JsonProperty(value = "targetImageReference", access = JsonProperty.Access.WRITE_ONLY) private ImageReferenceInner targetImageReference; + /** + * Information about OS rollback if performed. + */ + @JsonProperty(value = "rollbackInfo", access = JsonProperty.Access.WRITE_ONLY) + private RollbackStatusInfo rollbackInfo; + /** * Get the runningStatus value. * @@ -91,4 +97,13 @@ public ImageReferenceInner targetImageReference() { return this.targetImageReference; } + /** + * Get the rollbackInfo value. + * + * @return the rollbackInfo value + */ + public RollbackStatusInfo rollbackInfo() { + return this.rollbackInfo; + } + } From 156bf3f722a392a2f0d3f329eb6af447cb89c1b9 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 1 May 2018 17:04:06 -0700 Subject: [PATCH 11/15] Generated from 8fe96075f82faeec0c0e316e0dd1a1c0ee77e376 (#126) fixed formatting --- .../azure/management/compute/DataDisk.java | 16 ++++++++-------- .../azure/management/compute/OSDisk.java | 16 ++++++++-------- .../compute/VirtualMachineScaleSetOSDisk.java | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java index f937855d07f..47f5ccd4dec 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java @@ -62,14 +62,14 @@ public class DataDisk { /** * Specifies how the virtual machine should be created.<br><br> - * Possible values are:<br><br> **Attach** \u2013 This value is - * used when you are using a specialized disk to create the virtual - * machine.<br><br> **FromImage** \u2013 This value is used - * when you are using an image to create the virtual machine. If you are - * using a platform image, you also use the imageReference element - * described above. If you are using a marketplace image, you also use the - * plan element previously described. Possible values include: 'FromImage', - * 'Empty', 'Attach'. + * Possible values are:<br><br> **Attach** This value is used + * when you are using a specialized disk to create the virtual + * machine.<br><br> **FromImage** This value is used when you + * are using an image to create the virtual machine. If you are using a + * platform image, you also use the imageReference element described above. + * If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach'. */ @JsonProperty(value = "createOption", required = true) private DiskCreateOptionTypes createOption; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java index 0f6da66a142..13fec1deee9 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java @@ -74,14 +74,14 @@ public class OSDisk { /** * Specifies how the virtual machine should be created.<br><br> - * Possible values are:<br><br> **Attach** \u2013 This value is - * used when you are using a specialized disk to create the virtual - * machine.<br><br> **FromImage** \u2013 This value is used - * when you are using an image to create the virtual machine. If you are - * using a platform image, you also use the imageReference element - * described above. If you are using a marketplace image, you also use the - * plan element previously described. Possible values include: 'FromImage', - * 'Empty', 'Attach'. + * Possible values are:<br><br> **Attach** This value is used + * when you are using a specialized disk to create the virtual + * machine.<br><br> **FromImage** This value is used when you + * are using an image to create the virtual machine. If you are using a + * platform image, you also use the imageReference element described above. + * If you are using a marketplace image, you also use the plan element + * previously described. Possible values include: 'FromImage', 'Empty', + * 'Attach'. */ @JsonProperty(value = "createOption", required = true) private DiskCreateOptionTypes createOption; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java index 34b6840c803..595f6da7931 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java @@ -41,8 +41,8 @@ public class VirtualMachineScaleSetOSDisk { /** * Specifies how the virtual machines in the scale set should be * created.<br><br> The only allowed value is: **FromImage** - * \u2013 This value is used when you are using an image to create the - * virtual machine. If you are using a platform image, you also use the + * This value is used when you are using an image to create the virtual + * machine. If you are using a platform image, you also use the * imageReference element described above. If you are using a marketplace * image, you also use the plan element previously described. Possible * values include: 'FromImage', 'Empty', 'Attach'. 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 12/15] 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."); } From e6ea9756d2a3b0b27dd6c6952c9673762983eba9 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 21 May 2018 10:46:37 -0700 Subject: [PATCH 13/15] Generated from 7014b952af241255afcf4e2b620cfd40737a3ea1 (#169) Upgrade Compute API version to 2018-04-01 and Fix the response of all POST operation. --- .../compute/AvailabilitySetUpdate.java | 5 +- .../azure/management/compute/DataDisk.java | 16 +- .../management/compute/DiskInstanceView.java | 7 +- .../azure/management/compute/OSDisk.java | 16 +- .../management/compute/RunCommandResult.java | 45 + .../VirtualMachineAgentInstanceView.java | 7 +- ...alMachineExtensionHandlerInstanceView.java | 7 +- .../VirtualMachineExtensionInstanceView.java | 13 +- .../compute/VirtualMachineHealthStatus.java | 5 +- .../compute/VirtualMachineScaleSetOSDisk.java | 4 +- .../implementation/AccessUriInner.java | 4 +- .../implementation/AvailabilitySetInner.java | 5 +- .../implementation/AvailabilitySetsInner.java | 45 +- .../compute/implementation/DisksInner.java | 98 +- .../compute/implementation/ImagesInner.java | 70 +- .../InstanceViewStatusInner.java | 149 +++ .../implementation/LogAnalyticsInner.java | 8 +- .../LogAnalyticsOperationResultInner.java | 2 +- .../implementation/OperationsInner.java | 2 +- .../implementation/SnapshotsInner.java | 98 +- .../compute/implementation/UsagesInner.java | 2 +- .../VirtualMachineCaptureResultInner.java | 65 +- .../VirtualMachineExtensionImagesInner.java | 8 +- .../VirtualMachineExtensionsInner.java | 64 +- .../VirtualMachineImagesInner.java | 12 +- .../VirtualMachineInstanceViewInner.java | 7 +- .../VirtualMachineRunCommandsInner.java | 4 +- ...VirtualMachineScaleSetExtensionsInner.java | 62 +- ...rtualMachineScaleSetInstanceViewInner.java | 7 +- ...alMachineScaleSetRollingUpgradesInner.java | 106 +- ...ualMachineScaleSetVMInstanceViewInner.java | 7 +- .../VirtualMachineScaleSetVMsInner.java | 480 +++++---- .../VirtualMachineScaleSetsInner.java | 964 +++++++++--------- .../VirtualMachineSizesInner.java | 2 +- .../implementation/VirtualMachinesInner.java | 529 +++++----- 35 files changed, 1530 insertions(+), 1395 deletions(-) create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandResult.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/InstanceViewStatusInner.java diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java index a8d809578f7..b4af193fcfa 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java @@ -10,6 +10,7 @@ import java.util.List; import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; @@ -41,7 +42,7 @@ public class AvailabilitySetUpdate extends UpdateResource { * The resource status information. */ @JsonProperty(value = "properties.statuses", access = JsonProperty.Access.WRITE_ONLY) - private List statuses; + private List statuses; /** * Sku of the availability set. @@ -114,7 +115,7 @@ public AvailabilitySetUpdate withVirtualMachines(List virtualMachin * * @return the statuses value */ - public List statuses() { + public List statuses() { return this.statuses; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java index 47f5ccd4dec..f937855d07f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java @@ -62,14 +62,14 @@ public class DataDisk { /** * Specifies how the virtual machine should be created.<br><br> - * Possible values are:<br><br> **Attach** This value is used - * when you are using a specialized disk to create the virtual - * machine.<br><br> **FromImage** This value is used when you - * are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. - * If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach'. + * Possible values are:<br><br> **Attach** \u2013 This value is + * used when you are using a specialized disk to create the virtual + * machine.<br><br> **FromImage** \u2013 This value is used + * when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element + * described above. If you are using a marketplace image, you also use the + * plan element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach'. */ @JsonProperty(value = "createOption", required = true) private DiskCreateOptionTypes createOption; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskInstanceView.java index 92474499e72..1034d96e779 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskInstanceView.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.compute; import java.util.List; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -32,7 +33,7 @@ public class DiskInstanceView { * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** * Get the name value. @@ -79,7 +80,7 @@ public DiskInstanceView withEncryptionSettings(List encr * * @return the statuses value */ - public List statuses() { + public List statuses() { return this.statuses; } @@ -89,7 +90,7 @@ public List statuses() { * @param statuses the statuses value to set * @return the DiskInstanceView object itself. */ - public DiskInstanceView withStatuses(List statuses) { + public DiskInstanceView withStatuses(List statuses) { this.statuses = statuses; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java index 13fec1deee9..0f6da66a142 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java @@ -74,14 +74,14 @@ public class OSDisk { /** * Specifies how the virtual machine should be created.<br><br> - * Possible values are:<br><br> **Attach** This value is used - * when you are using a specialized disk to create the virtual - * machine.<br><br> **FromImage** This value is used when you - * are using an image to create the virtual machine. If you are using a - * platform image, you also use the imageReference element described above. - * If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', - * 'Attach'. + * Possible values are:<br><br> **Attach** \u2013 This value is + * used when you are using a specialized disk to create the virtual + * machine.<br><br> **FromImage** \u2013 This value is used + * when you are using an image to create the virtual machine. If you are + * using a platform image, you also use the imageReference element + * described above. If you are using a marketplace image, you also use the + * plan element previously described. Possible values include: 'FromImage', + * 'Empty', 'Attach'. */ @JsonProperty(value = "createOption", required = true) private DiskCreateOptionTypes createOption; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandResult.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandResult.java new file mode 100644 index 00000000000..99db5878d7f --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandResult.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Run command operation response. + */ +@JsonFlatten +public class RunCommandResult { + /** + * Operation output data (raw JSON). + */ + @JsonProperty(value = "properties.output") + private Object output; + + /** + * Get the output value. + * + * @return the output value + */ + public Object output() { + return this.output; + } + + /** + * Set the output value. + * + * @param output the output value to set + * @return the RunCommandResult object itself. + */ + public RunCommandResult withOutput(Object output) { + this.output = output; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineAgentInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineAgentInstanceView.java index a910f51fc87..452708005d7 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineAgentInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineAgentInstanceView.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.compute; import java.util.List; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -31,7 +32,7 @@ public class VirtualMachineAgentInstanceView { * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** * Get the vmAgentVersion value. @@ -78,7 +79,7 @@ public VirtualMachineAgentInstanceView withExtensionHandlers(List statuses() { + public List statuses() { return this.statuses; } @@ -88,7 +89,7 @@ public List statuses() { * @param statuses the statuses value to set * @return the VirtualMachineAgentInstanceView object itself. */ - public VirtualMachineAgentInstanceView withStatuses(List statuses) { + public VirtualMachineAgentInstanceView withStatuses(List statuses) { this.statuses = statuses; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionHandlerInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionHandlerInstanceView.java index 1623c25193b..8940b5ec06f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionHandlerInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionHandlerInstanceView.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.compute; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -31,7 +32,7 @@ public class VirtualMachineExtensionHandlerInstanceView { * The extension handler status. */ @JsonProperty(value = "status") - private InstanceViewStatus status; + private InstanceViewStatusInner status; /** * Get the type value. @@ -78,7 +79,7 @@ public VirtualMachineExtensionHandlerInstanceView withTypeHandlerVersion(String * * @return the status value */ - public InstanceViewStatus status() { + public InstanceViewStatusInner status() { return this.status; } @@ -88,7 +89,7 @@ public InstanceViewStatus status() { * @param status the status value to set * @return the VirtualMachineExtensionHandlerInstanceView object itself. */ - public VirtualMachineExtensionHandlerInstanceView withStatus(InstanceViewStatus status) { + public VirtualMachineExtensionHandlerInstanceView withStatus(InstanceViewStatusInner status) { this.status = status; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionInstanceView.java index 74926a3efc6..ea26c9a4262 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionInstanceView.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.compute; import java.util.List; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -38,13 +39,13 @@ public class VirtualMachineExtensionInstanceView { * The resource status information. */ @JsonProperty(value = "substatuses") - private List substatuses; + private List substatuses; /** * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** * Get the name value. @@ -111,7 +112,7 @@ public VirtualMachineExtensionInstanceView withTypeHandlerVersion(String typeHan * * @return the substatuses value */ - public List substatuses() { + public List substatuses() { return this.substatuses; } @@ -121,7 +122,7 @@ public List substatuses() { * @param substatuses the substatuses value to set * @return the VirtualMachineExtensionInstanceView object itself. */ - public VirtualMachineExtensionInstanceView withSubstatuses(List substatuses) { + public VirtualMachineExtensionInstanceView withSubstatuses(List substatuses) { this.substatuses = substatuses; return this; } @@ -131,7 +132,7 @@ public VirtualMachineExtensionInstanceView withSubstatuses(List statuses() { + public List statuses() { return this.statuses; } @@ -141,7 +142,7 @@ public List statuses() { * @param statuses the statuses value to set * @return the VirtualMachineExtensionInstanceView object itself. */ - public VirtualMachineExtensionInstanceView withStatuses(List statuses) { + public VirtualMachineExtensionInstanceView withStatuses(List statuses) { this.statuses = statuses; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineHealthStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineHealthStatus.java index 9a640f90c1b..e98e8986939 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineHealthStatus.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineHealthStatus.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.compute; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -18,14 +19,14 @@ public class VirtualMachineHealthStatus { * The health status information for the VM. */ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private InstanceViewStatus status; + private InstanceViewStatusInner status; /** * Get the status value. * * @return the status value */ - public InstanceViewStatus status() { + public InstanceViewStatusInner status() { return this.status; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java index 595f6da7931..34b6840c803 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java @@ -41,8 +41,8 @@ public class VirtualMachineScaleSetOSDisk { /** * Specifies how the virtual machines in the scale set should be * created.<br><br> The only allowed value is: **FromImage** - * This value is used when you are using an image to create the virtual - * machine. If you are using a platform image, you also use the + * \u2013 This value is used when you are using an image to create the + * virtual machine. If you are using a platform image, you also use the * imageReference element described above. If you are using a marketplace * image, you also use the plan element previously described. Possible * values include: 'FromImage', 'Empty', 'Attach'. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AccessUriInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AccessUriInner.java index 0bdf469df11..099d5ba1655 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AccessUriInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AccessUriInner.java @@ -9,17 +9,15 @@ package com.microsoft.azure.management.compute.implementation; import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; /** * A disk access SAS uri. */ -@JsonFlatten public class AccessUriInner { /** * A SAS uri for accessing a disk. */ - @JsonProperty(value = "properties.output.accessSAS", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "accessSAS", access = JsonProperty.Access.WRITE_ONLY) private String accessSAS; /** diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetInner.java index 182ef4a7cfc..21d2b0ae3ae 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetInner.java @@ -10,7 +10,6 @@ import java.util.List; import com.microsoft.azure.SubResource; -import com.microsoft.azure.management.compute.InstanceViewStatus; import com.microsoft.azure.management.compute.Sku; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; @@ -52,7 +51,7 @@ public class AvailabilitySetInner extends Resource { * The resource status information. */ @JsonProperty(value = "properties.statuses", access = JsonProperty.Access.WRITE_ONLY) - private List statuses; + private List statuses; /** * Sku of the availability set. @@ -125,7 +124,7 @@ public AvailabilitySetInner withVirtualMachines(List virtualMachine * * @return the statuses value */ - public List statuses() { + public List statuses() { return this.statuses; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java index 54e82371d0e..e2f0371f4a5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java @@ -40,7 +40,7 @@ * An instance of this class provides access to all the operations defined * in AvailabilitySets. */ -public class AvailabilitySetsInner implements InnerSupportsGet, InnerSupportsDelete { +public class AvailabilitySetsInner implements InnerSupportsGet, InnerSupportsDelete { /** The Retrofit service to perform REST calls. */ private AvailabilitySetsService service; /** The service client containing this operation class. */ @@ -158,7 +158,7 @@ public Observable> createOrUpdateWithServi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.createOrUpdate(resourceGroupName, availabilitySetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -250,7 +250,7 @@ public Observable> updateWithServiceRespon throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.update(resourceGroupName, availabilitySetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -280,10 +280,9 @@ private ServiceResponse updateDelegate(Response deleteAsync(String resourceGroupName, String availabilitySetName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String availabilitySetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, availabilitySetName), serviceCallback); } @@ -305,12 +304,12 @@ public ServiceFuture deleteAsync(String resourceGr * @param resourceGroupName The name of the resource group. * @param availabilitySetName The name of the availability set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable deleteAsync(String resourceGroupName, String availabilitySetName) { - return deleteWithServiceResponseAsync(resourceGroupName, availabilitySetName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String availabilitySetName) { + return deleteWithServiceResponseAsync(resourceGroupName, availabilitySetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -322,9 +321,9 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String availabilitySetName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String availabilitySetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -334,13 +333,13 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.delete(resourceGroupName, availabilitySetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteDelegate(response); + ServiceResponse clientResponse = deleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -349,9 +348,9 @@ public Observable> call(Response deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -419,7 +418,7 @@ public Observable> getByResourceGroupWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, availabilitySetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -500,7 +499,7 @@ public Observable>> listByResourceGro if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -589,7 +588,7 @@ public Observable>> listAvailableS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listAvailableSizes(resourceGroupName, availabilitySetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java index 60bbfac6a05..f7823911202 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java @@ -46,7 +46,7 @@ * An instance of this class provides access to all the operations defined * in Disks. */ -public class DisksInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class DisksInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private DisksService service; /** The service client containing this operation class. */ @@ -558,10 +558,9 @@ private ServiceResponse getByResourceGroupDelegate(Response deleteAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); } @@ -585,10 +584,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String diskName) { - return deleteWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String diskName) { + return deleteWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -602,7 +601,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String diskName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -614,7 +613,7 @@ public Observable> deleteWithServi } final String apiVersion = "2018-04-01"; Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -625,10 +624,9 @@ public Observable> deleteWithServi * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String diskName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, diskName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String diskName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, diskName).toBlocking().single().body(); } /** @@ -640,7 +638,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); } @@ -650,12 +648,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param resourceGroupName The name of the resource group. * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String diskName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String diskName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -667,9 +665,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String diskName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -681,11 +679,11 @@ public Observable> beginDeleteWith } final String apiVersion = "2018-04-01"; return service.beginDelete(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -694,9 +692,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1097,10 +1095,9 @@ private ServiceResponse beginGrantAccessDelegate(Response revokeAccessAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { + public ServiceFuture revokeAccessAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(revokeAccessWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); } @@ -1124,10 +1121,10 @@ public ServiceFuture revokeAccessAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable revokeAccessAsync(String resourceGroupName, String diskName) { - return revokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, OperationStatusResponseInner>() { + public Observable revokeAccessAsync(String resourceGroupName, String diskName) { + return revokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1141,7 +1138,7 @@ public OperationStatusResponseInner call(ServiceResponse> revokeAccessWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> revokeAccessWithServiceResponseAsync(String resourceGroupName, String diskName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1153,7 +1150,7 @@ public Observable> revokeAccessWit } final String apiVersion = "2018-04-01"; Observable> observable = service.revokeAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1164,10 +1161,9 @@ public Observable> revokeAccessWit * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRevokeAccess(String resourceGroupName, String diskName) { - return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName).toBlocking().single().body(); + public void beginRevokeAccess(String resourceGroupName, String diskName) { + beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName).toBlocking().single().body(); } /** @@ -1179,7 +1175,7 @@ public OperationStatusResponseInner beginRevokeAccess(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRevokeAccessAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRevokeAccessAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); } @@ -1189,12 +1185,12 @@ public ServiceFuture beginRevokeAccessAsync(String * @param resourceGroupName The name of the resource group. * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRevokeAccessAsync(String resourceGroupName, String diskName) { - return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRevokeAccessAsync(String resourceGroupName, String diskName) { + return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1206,9 +1202,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRevokeAccessWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> beginRevokeAccessWithServiceResponseAsync(String resourceGroupName, String diskName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1220,11 +1216,11 @@ public Observable> beginRevokeAcce } final String apiVersion = "2018-04-01"; return service.beginRevokeAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRevokeAccessDelegate(response); + ServiceResponse clientResponse = beginRevokeAccessDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1233,9 +1229,9 @@ public Observable> call(Response beginRevokeAccessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRevokeAccessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java index a62e0428b2f..755ce287a84 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java @@ -44,7 +44,7 @@ * An instance of this class provides access to all the operations defined * in Images. */ -public class ImagesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class ImagesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private ImagesService service; /** The service client containing this operation class. */ @@ -182,7 +182,7 @@ public Observable> createOrUpdateWithServiceResponse throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -257,7 +257,7 @@ public Observable> beginCreateOrUpdateWithServiceRes throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -350,7 +350,7 @@ public Observable> updateWithServiceResponseAsync(St throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -425,7 +425,7 @@ public Observable> beginUpdateWithServiceResponseAsy throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -456,10 +456,9 @@ private ServiceResponse beginUpdateDelegate(Response r * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner delete(String resourceGroupName, String imageName) { - return deleteWithServiceResponseAsync(resourceGroupName, imageName).toBlocking().last().body(); + public void delete(String resourceGroupName, String imageName) { + deleteWithServiceResponseAsync(resourceGroupName, imageName).toBlocking().last().body(); } /** @@ -471,7 +470,7 @@ public OperationStatusResponseInner delete(String resourceGroupName, String imag * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String imageName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String imageName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, imageName), serviceCallback); } @@ -483,10 +482,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String imageName) { - return deleteWithServiceResponseAsync(resourceGroupName, imageName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String imageName) { + return deleteWithServiceResponseAsync(resourceGroupName, imageName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -500,7 +499,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String imageName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String imageName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -510,9 +509,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, imageName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -523,10 +522,9 @@ public Observable> deleteWithServi * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String imageName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, imageName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String imageName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, imageName).toBlocking().single().body(); } /** @@ -538,7 +536,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String imageName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String imageName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, imageName), serviceCallback); } @@ -548,12 +546,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param resourceGroupName The name of the resource group. * @param imageName The name of the image. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String imageName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, imageName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String imageName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, imageName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -565,9 +563,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String imageName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String imageName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -577,13 +575,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, imageName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -592,9 +590,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -663,7 +661,7 @@ public Observable> getByResourceGroupWithServiceResp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, imageName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -745,7 +743,7 @@ public Observable> getByResourceGroupWithServiceResp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, imageName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -858,7 +856,7 @@ public Observable>> listByResourceGroupSinglePa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -963,7 +961,7 @@ public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/InstanceViewStatusInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/InstanceViewStatusInner.java new file mode 100644 index 00000000000..4072f36348c --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/InstanceViewStatusInner.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.StatusLevelTypes; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Instance view status. + */ +public class InstanceViewStatusInner { + /** + * The status code. + */ + @JsonProperty(value = "code") + private String code; + + /** + * The level code. Possible values include: 'Info', 'Warning', 'Error'. + */ + @JsonProperty(value = "level") + private StatusLevelTypes level; + + /** + * The short localizable label for the status. + */ + @JsonProperty(value = "displayStatus") + private String displayStatus; + + /** + * The detailed status message, including for alerts and error messages. + */ + @JsonProperty(value = "message") + private String message; + + /** + * The time of the status. + */ + @JsonProperty(value = "time") + private DateTime time; + + /** + * Get the code value. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the code value. + * + * @param code the code value to set + * @return the InstanceViewStatusInner object itself. + */ + public InstanceViewStatusInner withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the level value. + * + * @return the level value + */ + public StatusLevelTypes level() { + return this.level; + } + + /** + * Set the level value. + * + * @param level the level value to set + * @return the InstanceViewStatusInner object itself. + */ + public InstanceViewStatusInner withLevel(StatusLevelTypes level) { + this.level = level; + return this; + } + + /** + * Get the displayStatus value. + * + * @return the displayStatus value + */ + public String displayStatus() { + return this.displayStatus; + } + + /** + * Set the displayStatus value. + * + * @param displayStatus the displayStatus value to set + * @return the InstanceViewStatusInner object itself. + */ + public InstanceViewStatusInner withDisplayStatus(String displayStatus) { + this.displayStatus = displayStatus; + return this; + } + + /** + * Get the message value. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the message value. + * + * @param message the message value to set + * @return the InstanceViewStatusInner object itself. + */ + public InstanceViewStatusInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the time value. + * + * @return the time value + */ + public DateTime time() { + return this.time; + } + + /** + * Set the time value. + * + * @param time the time value to set + * @return the InstanceViewStatusInner object itself. + */ + public InstanceViewStatusInner withTime(DateTime time) { + this.time = time; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java index 834eb1ac67c..d4f5a1599a3 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java @@ -136,7 +136,7 @@ public Observable> exportReque throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.exportRequestRateByInterval(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -204,7 +204,7 @@ public Observable> beginExport throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginExportRequestRateByInterval(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -290,7 +290,7 @@ public Observable> exportThrot throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.exportThrottledRequests(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -358,7 +358,7 @@ public Observable> beginExport throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginExportThrottledRequests(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsOperationResultInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsOperationResultInner.java index 8dd8065900d..0e4a96c88ce 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsOperationResultInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsOperationResultInner.java @@ -14,7 +14,7 @@ /** * LogAnalytics operation status response. */ -public class LogAnalyticsOperationResultInner extends OperationStatusResponseInner { +public class LogAnalyticsOperationResultInner { /** * LogAnalyticsOutput. */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java index bdff105f020..88d162435d5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java @@ -102,7 +102,7 @@ public List call(ServiceResponse>> listWithServiceResponseAsync() { - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java index fa3f54f8c94..c2cf34357fc 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java @@ -46,7 +46,7 @@ * An instance of this class provides access to all the operations defined * in Snapshots. */ -public class SnapshotsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class SnapshotsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private SnapshotsService service; /** The service client containing this operation class. */ @@ -558,10 +558,9 @@ private ServiceResponse getByResourceGroupDelegate(Response deleteAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); } @@ -585,10 +584,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String snapshotName) { - return deleteWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String snapshotName) { + return deleteWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -602,7 +601,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -614,7 +613,7 @@ public Observable> deleteWithServi } final String apiVersion = "2018-04-01"; Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -625,10 +624,9 @@ public Observable> deleteWithServi * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String snapshotName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String snapshotName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().single().body(); } /** @@ -640,7 +638,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); } @@ -650,12 +648,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String snapshotName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String snapshotName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -667,9 +665,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -681,11 +679,11 @@ public Observable> beginDeleteWith } final String apiVersion = "2018-04-01"; return service.beginDelete(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -694,9 +692,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1097,10 +1095,9 @@ private ServiceResponse beginGrantAccessDelegate(Response revokeAccessAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { + public ServiceFuture revokeAccessAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(revokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); } @@ -1124,10 +1121,10 @@ public ServiceFuture revokeAccessAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable revokeAccessAsync(String resourceGroupName, String snapshotName) { - return revokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, OperationStatusResponseInner>() { + public Observable revokeAccessAsync(String resourceGroupName, String snapshotName) { + return revokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1141,7 +1138,7 @@ public OperationStatusResponseInner call(ServiceResponse> revokeAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> revokeAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1153,7 +1150,7 @@ public Observable> revokeAccessWit } final String apiVersion = "2018-04-01"; Observable> observable = service.revokeAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1164,10 +1161,9 @@ public Observable> revokeAccessWit * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRevokeAccess(String resourceGroupName, String snapshotName) { - return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().single().body(); + public void beginRevokeAccess(String resourceGroupName, String snapshotName) { + beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().single().body(); } /** @@ -1179,7 +1175,7 @@ public OperationStatusResponseInner beginRevokeAccess(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRevokeAccessAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRevokeAccessAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); } @@ -1189,12 +1185,12 @@ public ServiceFuture beginRevokeAccessAsync(String * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRevokeAccessAsync(String resourceGroupName, String snapshotName) { - return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRevokeAccessAsync(String resourceGroupName, String snapshotName) { + return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1206,9 +1202,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRevokeAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> beginRevokeAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1220,11 +1216,11 @@ public Observable> beginRevokeAcce } final String apiVersion = "2018-04-01"; return service.beginRevokeAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRevokeAccessDelegate(response); + ServiceResponse clientResponse = beginRevokeAccessDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1233,9 +1229,9 @@ public Observable> call(Response beginRevokeAccessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRevokeAccessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java index c3d91764761..aaeba3646e9 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java @@ -157,7 +157,7 @@ public Observable>> listSinglePageAsync(final S if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineCaptureResultInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineCaptureResultInner.java index fc79bfbd422..14721c0ab94 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineCaptureResultInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineCaptureResultInner.java @@ -8,39 +8,72 @@ package com.microsoft.azure.management.compute.implementation; +import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.SubResource; /** - * Resource Id. + * Output of virtual machine capture operation. */ -@JsonFlatten public class VirtualMachineCaptureResultInner extends SubResource { /** - * Operation output data (raw JSON). + * the schema of the captured virtual machine. */ - @JsonProperty(value = "properties.output") - private Object output; + @JsonProperty(value = "$schema", access = JsonProperty.Access.WRITE_ONLY) + private String schema; /** - * Get the output value. + * the version of the content. + */ + @JsonProperty(value = "contentVersion", access = JsonProperty.Access.WRITE_ONLY) + private String contentVersion; + + /** + * parameters of the captured virtual machine. + */ + @JsonProperty(value = "parameters", access = JsonProperty.Access.WRITE_ONLY) + private Object parameters; + + /** + * a list of resource items of the captured virtual machine. + */ + @JsonProperty(value = "resources", access = JsonProperty.Access.WRITE_ONLY) + private List resources; + + /** + * Get the schema value. + * + * @return the schema value + */ + public String schema() { + return this.schema; + } + + /** + * Get the contentVersion value. + * + * @return the contentVersion value + */ + public String contentVersion() { + return this.contentVersion; + } + + /** + * Get the parameters value. * - * @return the output value + * @return the parameters value */ - public Object output() { - return this.output; + public Object parameters() { + return this.parameters; } /** - * Set the output value. + * Get the resources value. * - * @param output the output value to set - * @return the VirtualMachineCaptureResultInner object itself. + * @return the resources value */ - public VirtualMachineCaptureResultInner withOutput(Object output) { - this.output = output; - return this; + public List resources() { + return this.resources; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java index 821c88e1a11..1d1bb26c2a5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java @@ -142,7 +142,7 @@ public Observable> getWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(location, publisherName, type, version, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -226,7 +226,7 @@ public Observable>> list if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listTypes(location, publisherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -317,7 +317,7 @@ public Observable>> list if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String filter = null; final Integer top = null; final String orderby = null; @@ -416,7 +416,7 @@ public Observable>> list if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listVersions(location, publisherName, type, this.client.subscriptionId(), filter, top, orderby, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java index 44db0ff482d..9ab5d94e57f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java @@ -164,7 +164,7 @@ public Observable> createOrUpdateW throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -246,7 +246,7 @@ public Observable> beginCreateOrUp throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -346,7 +346,7 @@ public Observable> updateWithServi throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -428,7 +428,7 @@ public Observable> beginUpdateWith throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -459,10 +459,9 @@ private ServiceResponse beginUpdateDelegate(Respon * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner delete(String resourceGroupName, String vmName, String vmExtensionName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).toBlocking().last().body(); + public void delete(String resourceGroupName, String vmName, String vmExtensionName) { + deleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).toBlocking().last().body(); } /** @@ -475,7 +474,7 @@ public OperationStatusResponseInner delete(String resourceGroupName, String vmNa * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String vmName, String vmExtensionName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String vmName, String vmExtensionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName), serviceCallback); } @@ -488,10 +487,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String vmName, String vmExtensionName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String vmName, String vmExtensionName) { + return deleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -506,7 +505,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -519,9 +518,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -533,10 +532,9 @@ public Observable> deleteWithServi * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String vmName, String vmExtensionName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String vmName, String vmExtensionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).toBlocking().single().body(); } /** @@ -549,7 +547,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmName, String vmExtensionName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmName, String vmExtensionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName), serviceCallback); } @@ -560,12 +558,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param vmName The name of the virtual machine where the extension should be deleted. * @param vmExtensionName The name of the virtual machine extension. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String vmName, String vmExtensionName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String vmName, String vmExtensionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -578,9 +576,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -593,13 +591,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -608,9 +606,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -686,7 +684,7 @@ public Observable> getWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.get(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -775,7 +773,7 @@ public Observable> getWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java index ddda82d3f99..ac0a3f4df8f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java @@ -157,7 +157,7 @@ public Observable> getWithServiceRespo if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(location, publisherName, offer, skus, version, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -255,7 +255,7 @@ public Observable>> listW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String filter = null; final Integer top = null; final String orderby = null; @@ -361,7 +361,7 @@ public Observable>> listW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(location, publisherName, offer, skus, this.client.subscriptionId(), filter, top, orderby, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -445,7 +445,7 @@ public Observable>> listO if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listOffers(location, publisherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -522,7 +522,7 @@ public Observable>> listP if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listPublishers(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -613,7 +613,7 @@ public Observable>> listS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listSkus(location, publisherName, offer, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java index 25f7cf32854..c0ac832e016 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java @@ -14,7 +14,6 @@ import com.microsoft.azure.management.compute.DiskInstanceView; import com.microsoft.azure.management.compute.VirtualMachineExtensionInstanceView; import com.microsoft.azure.management.compute.BootDiagnosticsInstanceView; -import com.microsoft.azure.management.compute.InstanceViewStatus; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -96,7 +95,7 @@ public class VirtualMachineInstanceViewInner { * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** * Get the platformUpdateDomain value. @@ -323,7 +322,7 @@ public VirtualMachineInstanceViewInner withBootDiagnostics(BootDiagnosticsInstan * * @return the statuses value */ - public List statuses() { + public List statuses() { return this.statuses; } @@ -333,7 +332,7 @@ public List statuses() { * @param statuses the statuses value to set * @return the VirtualMachineInstanceViewInner object itself. */ - public VirtualMachineInstanceViewInner withStatuses(List statuses) { + public VirtualMachineInstanceViewInner withStatuses(List statuses) { this.statuses = statuses; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineRunCommandsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineRunCommandsInner.java index c894387fd06..c4f988300f5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineRunCommandsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineRunCommandsInner.java @@ -162,7 +162,7 @@ public Observable>> listSingle if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -246,7 +246,7 @@ public Observable> getWithServiceRespon if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(location, commandId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionsInner.java index c6227de9e0d..40700ffa935 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionsInner.java @@ -168,7 +168,7 @@ public Observable> createO throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -250,7 +250,7 @@ public Observable> beginCr throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -282,10 +282,9 @@ private ServiceResponse beginCreateOrUpdat * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner delete(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).toBlocking().last().body(); + public void delete(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).toBlocking().last().body(); } /** @@ -298,7 +297,7 @@ public OperationStatusResponseInner delete(String resourceGroupName, String vmSc * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName), serviceCallback); } @@ -311,10 +310,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -329,7 +328,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -342,9 +341,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -356,10 +355,9 @@ public Observable> deleteWithServi * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).toBlocking().single().body(); } /** @@ -372,7 +370,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName), serviceCallback); } @@ -383,12 +381,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param vmScaleSetName The name of the VM scale set where the extension should be deleted. * @param vmssExtensionName The name of the VM scale set extension. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -401,9 +399,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -416,13 +414,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -431,9 +429,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -509,7 +507,7 @@ public Observable> getWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.get(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -598,7 +596,7 @@ public Observable> getWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -719,7 +717,7 @@ public Observable>> l if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInstanceViewInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInstanceViewInner.java index b7c0f55da1d..2fda853b700 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInstanceViewInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInstanceViewInner.java @@ -11,7 +11,6 @@ import com.microsoft.azure.management.compute.VirtualMachineScaleSetInstanceViewStatusesSummary; import java.util.List; import com.microsoft.azure.management.compute.VirtualMachineScaleSetVMExtensionsSummary; -import com.microsoft.azure.management.compute.InstanceViewStatus; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -34,7 +33,7 @@ public class VirtualMachineScaleSetInstanceViewInner { * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** * Get the virtualMachine value. @@ -59,7 +58,7 @@ public List extensions() { * * @return the statuses value */ - public List statuses() { + public List statuses() { return this.statuses; } @@ -69,7 +68,7 @@ public List statuses() { * @param statuses the statuses value to set * @return the VirtualMachineScaleSetInstanceViewInner object itself. */ - public VirtualMachineScaleSetInstanceViewInner withStatuses(List statuses) { + public VirtualMachineScaleSetInstanceViewInner withStatuses(List statuses) { this.statuses = statuses; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetRollingUpgradesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetRollingUpgradesInner.java index 29bc0ff7187..67bfade10d4 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetRollingUpgradesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetRollingUpgradesInner.java @@ -82,10 +82,9 @@ interface VirtualMachineScaleSetRollingUpgradesService { * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner cancel(String resourceGroupName, String vmScaleSetName) { - return cancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void cancel(String resourceGroupName, String vmScaleSetName) { + cancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -97,7 +96,7 @@ public OperationStatusResponseInner cancel(String resourceGroupName, String vmSc * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture cancelAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture cancelAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -109,10 +108,10 @@ public ServiceFuture cancelAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable cancelAsync(String resourceGroupName, String vmScaleSetName) { - return cancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable cancelAsync(String resourceGroupName, String vmScaleSetName) { + return cancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -126,7 +125,7 @@ public OperationStatusResponseInner call(ServiceResponse> cancelWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> cancelWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -136,9 +135,9 @@ public Observable> cancelWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.cancel(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -149,10 +148,9 @@ public Observable> cancelWithServi * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginCancel(String resourceGroupName, String vmScaleSetName) { - return beginCancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginCancel(String resourceGroupName, String vmScaleSetName) { + beginCancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -164,7 +162,7 @@ public OperationStatusResponseInner beginCancel(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginCancelAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginCancelAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginCancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -174,12 +172,12 @@ public ServiceFuture beginCancelAsync(String resou * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginCancelAsync(String resourceGroupName, String vmScaleSetName) { - return beginCancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginCancelAsync(String resourceGroupName, String vmScaleSetName) { + return beginCancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -191,9 +189,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginCancelWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginCancelWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -203,13 +201,13 @@ public Observable> beginCancelWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCancel(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginCancelDelegate(response); + ServiceResponse clientResponse = beginCancelDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -218,9 +216,9 @@ public Observable> call(Response beginCancelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginCancelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -234,10 +232,9 @@ private ServiceResponse beginCancelDelegate(Respon * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner startOSUpgrade(String resourceGroupName, String vmScaleSetName) { - return startOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void startOSUpgrade(String resourceGroupName, String vmScaleSetName) { + startOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -249,7 +246,7 @@ public OperationStatusResponseInner startOSUpgrade(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture startOSUpgradeAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture startOSUpgradeAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(startOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -261,10 +258,10 @@ public ServiceFuture startOSUpgradeAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable startOSUpgradeAsync(String resourceGroupName, String vmScaleSetName) { - return startOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable startOSUpgradeAsync(String resourceGroupName, String vmScaleSetName) { + return startOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -278,7 +275,7 @@ public OperationStatusResponseInner call(ServiceResponse> startOSUpgradeWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> startOSUpgradeWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -288,9 +285,9 @@ public Observable> startOSUpgradeW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.startOSUpgrade(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -301,10 +298,9 @@ public Observable> startOSUpgradeW * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginStartOSUpgrade(String resourceGroupName, String vmScaleSetName) { - return beginStartOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginStartOSUpgrade(String resourceGroupName, String vmScaleSetName) { + beginStartOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -316,7 +312,7 @@ public OperationStatusResponseInner beginStartOSUpgrade(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginStartOSUpgradeAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginStartOSUpgradeAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginStartOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -326,12 +322,12 @@ public ServiceFuture beginStartOSUpgradeAsync(Stri * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginStartOSUpgradeAsync(String resourceGroupName, String vmScaleSetName) { - return beginStartOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginStartOSUpgradeAsync(String resourceGroupName, String vmScaleSetName) { + return beginStartOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -343,9 +339,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginStartOSUpgradeWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginStartOSUpgradeWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -355,13 +351,13 @@ public Observable> beginStartOSUpg if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginStartOSUpgrade(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginStartOSUpgradeDelegate(response); + ServiceResponse clientResponse = beginStartOSUpgradeDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -370,9 +366,9 @@ public Observable> call(Response beginStartOSUpgradeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginStartOSUpgradeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -440,7 +436,7 @@ public Observable> getLatestWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getLatest(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java index d7e523a6abb..d0dfa38a43f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java @@ -15,7 +15,6 @@ import com.microsoft.azure.management.compute.VirtualMachineExtensionInstanceView; import com.microsoft.azure.management.compute.VirtualMachineHealthStatus; import com.microsoft.azure.management.compute.BootDiagnosticsInstanceView; -import com.microsoft.azure.management.compute.InstanceViewStatus; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -85,7 +84,7 @@ public class VirtualMachineScaleSetVMInstanceViewInner { * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** * The placement group in which the VM is running. If the VM is deallocated @@ -268,7 +267,7 @@ public VirtualMachineScaleSetVMInstanceViewInner withBootDiagnostics(BootDiagnos * * @return the statuses value */ - public List statuses() { + public List statuses() { return this.statuses; } @@ -278,7 +277,7 @@ public List statuses() { * @param statuses the statuses value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. */ - public VirtualMachineScaleSetVMInstanceViewInner withStatuses(List statuses) { + public VirtualMachineScaleSetVMInstanceViewInner withStatuses(List statuses) { this.statuses = statuses; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java index b7c3251ed48..f41c093ce1b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java @@ -169,10 +169,9 @@ interface VirtualMachineScaleSetVMsService { * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimage(String resourceGroupName, String vmScaleSetName, String instanceId) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void reimage(String resourceGroupName, String vmScaleSetName, String instanceId) { + reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -185,7 +184,7 @@ public OperationStatusResponseInner reimage(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -198,10 +197,10 @@ public ServiceFuture reimageAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable reimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -216,7 +215,7 @@ public OperationStatusResponseInner call(ServiceResponse> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -229,9 +228,9 @@ public Observable> reimageWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.reimage(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -243,10 +242,9 @@ public Observable> reimageWithServ * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginReimage(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginReimage(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -259,7 +257,7 @@ public OperationStatusResponseInner beginReimage(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -270,12 +268,12 @@ public ServiceFuture beginReimageAsync(String reso * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -288,9 +286,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -303,13 +301,13 @@ public Observable> beginReimageWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginReimage(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageDelegate(response); + ServiceResponse clientResponse = beginReimageDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -318,9 +316,9 @@ public Observable> call(Response beginReimageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginReimageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -335,10 +333,9 @@ private ServiceResponse beginReimageDelegate(Respo * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimageAll(String resourceGroupName, String vmScaleSetName, String instanceId) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void reimageAll(String resourceGroupName, String vmScaleSetName, String instanceId) { + reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -351,7 +348,7 @@ public OperationStatusResponseInner reimageAll(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -364,10 +361,10 @@ public ServiceFuture reimageAllAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -382,7 +379,7 @@ public OperationStatusResponseInner call(ServiceResponse> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -395,9 +392,9 @@ public Observable> reimageAllWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.reimageAll(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -409,10 +406,9 @@ public Observable> reimageAllWithS * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginReimageAll(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginReimageAll(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -425,7 +421,7 @@ public OperationStatusResponseInner beginReimageAll(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -436,12 +432,12 @@ public ServiceFuture beginReimageAllAsync(String r * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -454,9 +450,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -469,13 +465,13 @@ public Observable> beginReimageAll if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginReimageAll(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageAllDelegate(response); + ServiceResponse clientResponse = beginReimageAllDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -484,9 +480,9 @@ public Observable> call(Response beginReimageAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginReimageAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -501,10 +497,9 @@ private ServiceResponse beginReimageAllDelegate(Re * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner deallocate(String resourceGroupName, String vmScaleSetName, String instanceId) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void deallocate(String resourceGroupName, String vmScaleSetName, String instanceId) { + deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -517,7 +512,7 @@ public OperationStatusResponseInner deallocate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -530,10 +525,10 @@ public ServiceFuture deallocateAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -548,7 +543,7 @@ public OperationStatusResponseInner call(ServiceResponse> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -561,9 +556,9 @@ public Observable> deallocateWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.deallocate(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -575,10 +570,9 @@ public Observable> deallocateWithS * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDeallocate(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginDeallocate(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -591,7 +585,7 @@ public OperationStatusResponseInner beginDeallocate(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -602,12 +596,12 @@ public ServiceFuture beginDeallocateAsync(String r * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -620,9 +614,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -635,13 +629,13 @@ public Observable> beginDeallocate if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDeallocate(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeallocateDelegate(response); + ServiceResponse clientResponse = beginDeallocateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -650,9 +644,9 @@ public Observable> call(Response beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -735,7 +729,7 @@ public Observable> updateWithServ throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -817,7 +811,7 @@ public Observable> beginUpdateWit throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -849,10 +843,9 @@ private ServiceResponse beginUpdateDelegate(Respo * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner delete(String resourceGroupName, String vmScaleSetName, String instanceId) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void delete(String resourceGroupName, String vmScaleSetName, String instanceId) { + deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -865,7 +858,7 @@ public OperationStatusResponseInner delete(String resourceGroupName, String vmSc * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -878,10 +871,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -896,7 +889,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -909,9 +902,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -923,10 +916,9 @@ public Observable> deleteWithServi * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -939,7 +931,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -950,12 +942,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -968,9 +960,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -983,13 +975,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -998,9 +990,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1076,7 +1068,7 @@ public Observable> getWithService if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1167,7 +1159,7 @@ public Observable> ge if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getInstanceView(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1288,7 +1280,7 @@ public Observable>> listSing if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String filter = null; final String select = null; final String expand = null; @@ -1420,7 +1412,7 @@ public Observable>> listSing if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, virtualMachineScaleSetName, this.client.subscriptionId(), filter, select, expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1451,10 +1443,9 @@ private ServiceResponse> listDelegate(R * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner powerOff(String resourceGroupName, String vmScaleSetName, String instanceId) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void powerOff(String resourceGroupName, String vmScaleSetName, String instanceId) { + powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -1467,7 +1458,7 @@ public OperationStatusResponseInner powerOff(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1480,10 +1471,10 @@ public ServiceFuture powerOffAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1498,7 +1489,7 @@ public OperationStatusResponseInner call(ServiceResponse> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1511,9 +1502,9 @@ public Observable> powerOffWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.powerOff(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1525,10 +1516,9 @@ public Observable> powerOffWithSer * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginPowerOff(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginPowerOff(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -1541,7 +1531,7 @@ public OperationStatusResponseInner beginPowerOff(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1552,12 +1542,12 @@ public ServiceFuture beginPowerOffAsync(String res * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1570,9 +1560,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1585,13 +1575,13 @@ public Observable> beginPowerOffWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginPowerOff(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPowerOffDelegate(response); + ServiceResponse clientResponse = beginPowerOffDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1600,9 +1590,9 @@ public Observable> call(Response beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1617,10 +1607,9 @@ private ServiceResponse beginPowerOffDelegate(Resp * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner restart(String resourceGroupName, String vmScaleSetName, String instanceId) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void restart(String resourceGroupName, String vmScaleSetName, String instanceId) { + restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -1633,7 +1622,7 @@ public OperationStatusResponseInner restart(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1646,10 +1635,10 @@ public ServiceFuture restartAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable restartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable restartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1664,7 +1653,7 @@ public OperationStatusResponseInner call(ServiceResponse> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1677,9 +1666,9 @@ public Observable> restartWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.restart(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1691,10 +1680,9 @@ public Observable> restartWithServ * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRestart(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginRestart(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -1707,7 +1695,7 @@ public OperationStatusResponseInner beginRestart(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1718,12 +1706,12 @@ public ServiceFuture beginRestartAsync(String reso * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1736,9 +1724,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1751,13 +1739,13 @@ public Observable> beginRestartWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginRestart(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRestartDelegate(response); + ServiceResponse clientResponse = beginRestartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1766,9 +1754,9 @@ public Observable> call(Response beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1783,10 +1771,9 @@ private ServiceResponse beginRestartDelegate(Respo * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner start(String resourceGroupName, String vmScaleSetName, String instanceId) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void start(String resourceGroupName, String vmScaleSetName, String instanceId) { + startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -1799,7 +1786,7 @@ public OperationStatusResponseInner start(String resourceGroupName, String vmSca * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1812,10 +1799,10 @@ public ServiceFuture startAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable startAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable startAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1830,7 +1817,7 @@ public OperationStatusResponseInner call(ServiceResponse> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1843,9 +1830,9 @@ public Observable> startWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.start(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1857,10 +1844,9 @@ public Observable> startWithServic * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginStart(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginStart(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -1873,7 +1859,7 @@ public OperationStatusResponseInner beginStart(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1884,12 +1870,12 @@ public ServiceFuture beginStartAsync(String resour * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1902,9 +1888,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1917,13 +1903,13 @@ public Observable> beginStartWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginStart(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginStartDelegate(response); + ServiceResponse clientResponse = beginStartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1932,9 +1918,9 @@ public Observable> call(Response beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1949,10 +1935,9 @@ private ServiceResponse beginStartDelegate(Respons * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner redeploy(String resourceGroupName, String vmScaleSetName, String instanceId) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void redeploy(String resourceGroupName, String vmScaleSetName, String instanceId) { + redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -1965,7 +1950,7 @@ public OperationStatusResponseInner redeploy(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1978,10 +1963,10 @@ public ServiceFuture redeployAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1996,7 +1981,7 @@ public OperationStatusResponseInner call(ServiceResponse> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2009,9 +1994,9 @@ public Observable> redeployWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2023,10 +2008,9 @@ public Observable> redeployWithSer * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRedeploy(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginRedeploy(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -2039,7 +2023,7 @@ public OperationStatusResponseInner beginRedeploy(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -2050,12 +2034,12 @@ public ServiceFuture beginRedeployAsync(String res * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2068,9 +2052,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2083,13 +2067,13 @@ public Observable> beginRedeployWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginRedeploy(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRedeployDelegate(response); + ServiceResponse clientResponse = beginRedeployDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2098,9 +2082,9 @@ public Observable> call(Response beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2115,10 +2099,9 @@ private ServiceResponse beginRedeployDelegate(Resp * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void performMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId) { + performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -2131,7 +2114,7 @@ public OperationStatusResponseInner performMaintenance(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -2144,10 +2127,10 @@ public ServiceFuture performMaintenanceAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2162,7 +2145,7 @@ public OperationStatusResponseInner call(ServiceResponse> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2175,9 +2158,9 @@ public Observable> performMaintena if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2189,10 +2172,9 @@ public Observable> performMaintena * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -2205,7 +2187,7 @@ public OperationStatusResponseInner beginPerformMaintenance(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -2216,12 +2198,12 @@ public ServiceFuture beginPerformMaintenanceAsync( * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2234,9 +2216,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2249,13 +2231,13 @@ public Observable> beginPerformMai if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2264,9 +2246,9 @@ public Observable> call(Response beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java index 9a9f8d9d3d4..653343e722c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java @@ -47,7 +47,7 @@ * An instance of this class provides access to all the operations defined * in VirtualMachineScaleSets. */ -public class VirtualMachineScaleSetsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class VirtualMachineScaleSetsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private VirtualMachineScaleSetsService service; /** The service client containing this operation class. */ @@ -289,7 +289,7 @@ public Observable> createOrUpdateWi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -364,7 +364,7 @@ public Observable> beginCreateOrUpd throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -457,7 +457,7 @@ public Observable> updateWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -532,7 +532,7 @@ public Observable> beginUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -562,10 +562,9 @@ private ServiceResponse beginUpdateDelegate(Respons * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner delete(String resourceGroupName, String vmScaleSetName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void delete(String resourceGroupName, String vmScaleSetName) { + deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -577,7 +576,7 @@ public OperationStatusResponseInner delete(String resourceGroupName, String vmSc * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -589,10 +588,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String vmScaleSetName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String vmScaleSetName) { + return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -606,7 +605,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -616,9 +615,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -629,10 +628,9 @@ public Observable> deleteWithServi * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String vmScaleSetName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String vmScaleSetName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -644,7 +642,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -654,12 +652,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -671,9 +669,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -683,13 +681,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -698,9 +696,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -769,7 +767,7 @@ public Observable> getByResourceGro if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -799,10 +797,9 @@ private ServiceResponse getByResourceGroupDelegate( * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner deallocate(String resourceGroupName, String vmScaleSetName) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void deallocate(String resourceGroupName, String vmScaleSetName) { + deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -814,7 +811,7 @@ public OperationStatusResponseInner deallocate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -826,10 +823,10 @@ public ServiceFuture deallocateAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName) { + return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -843,7 +840,7 @@ public OperationStatusResponseInner call(ServiceResponse> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -853,12 +850,12 @@ public Observable> deallocateWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.deallocate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates. @@ -869,10 +866,9 @@ public Observable> deallocateWithS * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner deallocate(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void deallocate(String resourceGroupName, String vmScaleSetName, List instanceIds) { + deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -885,7 +881,7 @@ public OperationStatusResponseInner deallocate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -898,10 +894,10 @@ public ServiceFuture deallocateAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -916,7 +912,7 @@ public OperationStatusResponseInner call(ServiceResponse> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -927,14 +923,14 @@ public Observable> deallocateWithS throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.deallocate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -945,10 +941,9 @@ public Observable> deallocateWithS * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDeallocate(String resourceGroupName, String vmScaleSetName) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginDeallocate(String resourceGroupName, String vmScaleSetName) { + beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -960,7 +955,7 @@ public OperationStatusResponseInner beginDeallocate(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -970,12 +965,12 @@ public ServiceFuture beginDeallocateAsync(String r * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName) { + return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -987,9 +982,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -999,16 +994,16 @@ public Observable> beginDeallocate if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginDeallocate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeallocateDelegate(response); + ServiceResponse clientResponse = beginDeallocateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1026,10 +1021,9 @@ public Observable> call(Response instanceIds) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginDeallocate(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -1042,7 +1036,7 @@ public OperationStatusResponseInner beginDeallocate(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -1053,12 +1047,12 @@ public ServiceFuture beginDeallocateAsync(String r * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1071,9 +1065,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1084,18 +1078,18 @@ public Observable> beginDeallocate throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginDeallocate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeallocateDelegate(response); + ServiceResponse clientResponse = beginDeallocateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1104,9 +1098,9 @@ public Observable> call(Response beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1121,10 +1115,9 @@ private ServiceResponse beginDeallocateDelegate(Re * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner deleteInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void deleteInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { + deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -1137,7 +1130,7 @@ public OperationStatusResponseInner deleteInstances(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -1150,10 +1143,10 @@ public ServiceFuture deleteInstancesAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1168,7 +1161,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> deleteInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1182,11 +1175,11 @@ public Observable> deleteInstances throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); Observable> observable = service.deleteInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1198,10 +1191,9 @@ public Observable> deleteInstances * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDeleteInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginDeleteInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -1214,7 +1206,7 @@ public OperationStatusResponseInner beginDeleteInstances(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -1225,12 +1217,12 @@ public ServiceFuture beginDeleteInstancesAsync(Str * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1243,9 +1235,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginDeleteInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1259,15 +1251,15 @@ public Observable> beginDeleteInst throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); return service.beginDeleteInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteInstancesDelegate(response); + ServiceResponse clientResponse = beginDeleteInstancesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1276,9 +1268,9 @@ public Observable> call(Response beginDeleteInstancesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteInstancesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1346,7 +1338,7 @@ public Observable> getI if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getInstanceView(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1459,7 +1451,7 @@ public Observable>> listByReso if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1564,7 +1556,7 @@ public Observable>> listSingle if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1685,7 +1677,7 @@ public Observable>> listSku if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listSkus(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1806,7 +1798,7 @@ public Observable, Observable>>>() { @Override @@ -1836,10 +1828,9 @@ private ServiceResponse> ge * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner powerOff(String resourceGroupName, String vmScaleSetName) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void powerOff(String resourceGroupName, String vmScaleSetName) { + powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -1851,7 +1842,7 @@ public OperationStatusResponseInner powerOff(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -1863,10 +1854,10 @@ public ServiceFuture powerOffAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName) { + return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1880,7 +1871,7 @@ public OperationStatusResponseInner call(ServiceResponse> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1890,12 +1881,12 @@ public Observable> powerOffWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.powerOff(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. @@ -1906,10 +1897,9 @@ public Observable> powerOffWithSer * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner powerOff(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void powerOff(String resourceGroupName, String vmScaleSetName, List instanceIds) { + powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -1922,7 +1912,7 @@ public OperationStatusResponseInner powerOff(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -1935,10 +1925,10 @@ public ServiceFuture powerOffAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1953,7 +1943,7 @@ public OperationStatusResponseInner call(ServiceResponse> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1964,14 +1954,14 @@ public Observable> powerOffWithSer throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.powerOff(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1982,10 +1972,9 @@ public Observable> powerOffWithSer * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginPowerOff(String resourceGroupName, String vmScaleSetName) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginPowerOff(String resourceGroupName, String vmScaleSetName) { + beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -1997,7 +1986,7 @@ public OperationStatusResponseInner beginPowerOff(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2007,12 +1996,12 @@ public ServiceFuture beginPowerOffAsync(String res * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName) { + return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2024,9 +2013,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2036,16 +2025,16 @@ public Observable> beginPowerOffWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginPowerOff(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPowerOffDelegate(response); + ServiceResponse clientResponse = beginPowerOffDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2063,10 +2052,9 @@ public Observable> call(Response instanceIds) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginPowerOff(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -2079,7 +2067,7 @@ public OperationStatusResponseInner beginPowerOff(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -2090,12 +2078,12 @@ public ServiceFuture beginPowerOffAsync(String res * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2108,9 +2096,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2121,18 +2109,18 @@ public Observable> beginPowerOffWi throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginPowerOff(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPowerOffDelegate(response); + ServiceResponse clientResponse = beginPowerOffDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2141,9 +2129,9 @@ public Observable> call(Response beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2157,10 +2145,9 @@ private ServiceResponse beginPowerOffDelegate(Resp * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner restart(String resourceGroupName, String vmScaleSetName) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void restart(String resourceGroupName, String vmScaleSetName) { + restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -2172,7 +2159,7 @@ public OperationStatusResponseInner restart(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2184,10 +2171,10 @@ public ServiceFuture restartAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable restartAsync(String resourceGroupName, String vmScaleSetName) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable restartAsync(String resourceGroupName, String vmScaleSetName) { + return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2201,7 +2188,7 @@ public OperationStatusResponseInner call(ServiceResponse> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2211,12 +2198,12 @@ public Observable> restartWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.restart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Restarts one or more virtual machines in a VM scale set. @@ -2227,10 +2214,9 @@ public Observable> restartWithServ * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner restart(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void restart(String resourceGroupName, String vmScaleSetName, List instanceIds) { + restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -2243,7 +2229,7 @@ public OperationStatusResponseInner restart(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -2256,10 +2242,10 @@ public ServiceFuture restartAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable restartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable restartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2274,7 +2260,7 @@ public OperationStatusResponseInner call(ServiceResponse> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2285,14 +2271,14 @@ public Observable> restartWithServ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.restart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2303,10 +2289,9 @@ public Observable> restartWithServ * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRestart(String resourceGroupName, String vmScaleSetName) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginRestart(String resourceGroupName, String vmScaleSetName) { + beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -2318,7 +2303,7 @@ public OperationStatusResponseInner beginRestart(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2328,12 +2313,12 @@ public ServiceFuture beginRestartAsync(String reso * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName) { + return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2345,9 +2330,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2357,16 +2342,16 @@ public Observable> beginRestartWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginRestart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRestartDelegate(response); + ServiceResponse clientResponse = beginRestartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2384,10 +2369,9 @@ public Observable> call(Response instanceIds) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginRestart(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -2400,7 +2384,7 @@ public OperationStatusResponseInner beginRestart(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -2411,12 +2395,12 @@ public ServiceFuture beginRestartAsync(String reso * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2429,9 +2413,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2442,18 +2426,18 @@ public Observable> beginRestartWit throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginRestart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRestartDelegate(response); + ServiceResponse clientResponse = beginRestartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2462,9 +2446,9 @@ public Observable> call(Response beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2478,10 +2462,9 @@ private ServiceResponse beginRestartDelegate(Respo * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner start(String resourceGroupName, String vmScaleSetName) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void start(String resourceGroupName, String vmScaleSetName) { + startWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -2493,7 +2476,7 @@ public OperationStatusResponseInner start(String resourceGroupName, String vmSca * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2505,10 +2488,10 @@ public ServiceFuture startAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable startAsync(String resourceGroupName, String vmScaleSetName) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable startAsync(String resourceGroupName, String vmScaleSetName) { + return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2522,7 +2505,7 @@ public OperationStatusResponseInner call(ServiceResponse> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2532,12 +2515,12 @@ public Observable> startWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.start(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Starts one or more virtual machines in a VM scale set. @@ -2548,10 +2531,9 @@ public Observable> startWithServic * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner start(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void start(String resourceGroupName, String vmScaleSetName, List instanceIds) { + startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -2564,7 +2546,7 @@ public OperationStatusResponseInner start(String resourceGroupName, String vmSca * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -2577,10 +2559,10 @@ public ServiceFuture startAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable startAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable startAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2595,7 +2577,7 @@ public OperationStatusResponseInner call(ServiceResponse> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2606,14 +2588,14 @@ public Observable> startWithServic throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.start(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2624,10 +2606,9 @@ public Observable> startWithServic * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginStart(String resourceGroupName, String vmScaleSetName) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginStart(String resourceGroupName, String vmScaleSetName) { + beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -2639,7 +2620,7 @@ public OperationStatusResponseInner beginStart(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2649,12 +2630,12 @@ public ServiceFuture beginStartAsync(String resour * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName) { + return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2666,9 +2647,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2678,16 +2659,16 @@ public Observable> beginStartWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginStart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginStartDelegate(response); + ServiceResponse clientResponse = beginStartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2705,10 +2686,9 @@ public Observable> call(Response instanceIds) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginStart(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -2721,7 +2701,7 @@ public OperationStatusResponseInner beginStart(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -2732,12 +2712,12 @@ public ServiceFuture beginStartAsync(String resour * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2750,9 +2730,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2763,18 +2743,18 @@ public Observable> beginStartWithS throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginStart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginStartDelegate(response); + ServiceResponse clientResponse = beginStartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2783,9 +2763,9 @@ public Observable> call(Response beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2799,10 +2779,9 @@ private ServiceResponse beginStartDelegate(Respons * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner redeploy(String resourceGroupName, String vmScaleSetName) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void redeploy(String resourceGroupName, String vmScaleSetName) { + redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -2814,7 +2793,7 @@ public OperationStatusResponseInner redeploy(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2826,10 +2805,10 @@ public ServiceFuture redeployAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable redeployAsync(String resourceGroupName, String vmScaleSetName) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable redeployAsync(String resourceGroupName, String vmScaleSetName) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2843,7 +2822,7 @@ public OperationStatusResponseInner call(ServiceResponse> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2853,12 +2832,12 @@ public Observable> redeployWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Redeploy one or more virtual machines in a VM scale set. @@ -2869,10 +2848,9 @@ public Observable> redeployWithSer * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner redeploy(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void redeploy(String resourceGroupName, String vmScaleSetName, List instanceIds) { + redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -2885,7 +2863,7 @@ public OperationStatusResponseInner redeploy(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -2898,10 +2876,10 @@ public ServiceFuture redeployAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2916,7 +2894,7 @@ public OperationStatusResponseInner call(ServiceResponse> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2927,14 +2905,14 @@ public Observable> redeployWithSer throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2945,10 +2923,9 @@ public Observable> redeployWithSer * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRedeploy(String resourceGroupName, String vmScaleSetName) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginRedeploy(String resourceGroupName, String vmScaleSetName) { + beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -2960,7 +2937,7 @@ public OperationStatusResponseInner beginRedeploy(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2970,12 +2947,12 @@ public ServiceFuture beginRedeployAsync(String res * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2987,9 +2964,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2999,16 +2976,16 @@ public Observable> beginRedeployWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginRedeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRedeployDelegate(response); + ServiceResponse clientResponse = beginRedeployDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3026,10 +3003,9 @@ public Observable> call(Response instanceIds) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginRedeploy(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -3042,7 +3018,7 @@ public OperationStatusResponseInner beginRedeploy(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -3053,12 +3029,12 @@ public ServiceFuture beginRedeployAsync(String res * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3071,9 +3047,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3084,18 +3060,18 @@ public Observable> beginRedeployWi throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginRedeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRedeployDelegate(response); + ServiceResponse clientResponse = beginRedeployDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3104,9 +3080,9 @@ public Observable> call(Response beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3120,10 +3096,9 @@ private ServiceResponse beginRedeployDelegate(Resp * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmScaleSetName) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void performMaintenance(String resourceGroupName, String vmScaleSetName) { + performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -3135,7 +3110,7 @@ public OperationStatusResponseInner performMaintenance(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -3147,10 +3122,10 @@ public ServiceFuture performMaintenanceAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3164,7 +3139,7 @@ public OperationStatusResponseInner call(ServiceResponse> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3174,12 +3149,12 @@ public Observable> performMaintena if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Perform maintenance on one or more virtual machines in a VM scale set. @@ -3190,10 +3165,9 @@ public Observable> performMaintena * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void performMaintenance(String resourceGroupName, String vmScaleSetName, List instanceIds) { + performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -3206,7 +3180,7 @@ public OperationStatusResponseInner performMaintenance(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -3219,10 +3193,10 @@ public ServiceFuture performMaintenanceAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3237,7 +3211,7 @@ public OperationStatusResponseInner call(ServiceResponse> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3248,14 +3222,14 @@ public Observable> performMaintena throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -3266,10 +3240,9 @@ public Observable> performMaintena * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmScaleSetName) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginPerformMaintenance(String resourceGroupName, String vmScaleSetName) { + beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -3281,7 +3254,7 @@ public OperationStatusResponseInner beginPerformMaintenance(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -3291,12 +3264,12 @@ public ServiceFuture beginPerformMaintenanceAsync( * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3308,9 +3281,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3320,16 +3293,16 @@ public Observable> beginPerformMai if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3347,10 +3320,9 @@ public Observable> call(Response instanceIds) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -3363,7 +3335,7 @@ public OperationStatusResponseInner beginPerformMaintenance(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -3374,12 +3346,12 @@ public ServiceFuture beginPerformMaintenanceAsync( * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3392,9 +3364,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3405,18 +3377,18 @@ public Observable> beginPerformMai throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3425,9 +3397,9 @@ public Observable> call(Response beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3442,10 +3414,9 @@ private ServiceResponse beginPerformMaintenanceDel * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner updateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void updateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { + updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -3458,7 +3429,7 @@ public OperationStatusResponseInner updateInstances(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -3471,10 +3442,10 @@ public ServiceFuture updateInstancesAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3489,7 +3460,7 @@ public OperationStatusResponseInner call(ServiceResponse> updateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> updateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3503,11 +3474,11 @@ public Observable> updateInstances throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); Observable> observable = service.updateInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -3519,10 +3490,9 @@ public Observable> updateInstances * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginUpdateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginUpdateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -3535,7 +3505,7 @@ public OperationStatusResponseInner beginUpdateInstances(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -3546,12 +3516,12 @@ public ServiceFuture beginUpdateInstancesAsync(Str * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3564,9 +3534,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginUpdateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginUpdateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3580,15 +3550,15 @@ public Observable> beginUpdateInst throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); return service.beginUpdateInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginUpdateInstancesDelegate(response); + ServiceResponse clientResponse = beginUpdateInstancesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3597,9 +3567,9 @@ public Observable> call(Response beginUpdateInstancesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginUpdateInstancesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3613,10 +3583,9 @@ private ServiceResponse beginUpdateInstancesDelega * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimage(String resourceGroupName, String vmScaleSetName) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void reimage(String resourceGroupName, String vmScaleSetName) { + reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -3628,7 +3597,7 @@ public OperationStatusResponseInner reimage(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -3640,10 +3609,10 @@ public ServiceFuture reimageAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAsync(String resourceGroupName, String vmScaleSetName) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable reimageAsync(String resourceGroupName, String vmScaleSetName) { + return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3657,7 +3626,7 @@ public OperationStatusResponseInner call(ServiceResponse> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3667,12 +3636,12 @@ public Observable> reimageWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.reimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. @@ -3683,10 +3652,9 @@ public Observable> reimageWithServ * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimage(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void reimage(String resourceGroupName, String vmScaleSetName, List instanceIds) { + reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -3699,7 +3667,7 @@ public OperationStatusResponseInner reimage(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -3712,10 +3680,10 @@ public ServiceFuture reimageAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable reimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3730,7 +3698,7 @@ public OperationStatusResponseInner call(ServiceResponse> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3741,14 +3709,14 @@ public Observable> reimageWithServ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.reimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -3759,10 +3727,9 @@ public Observable> reimageWithServ * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginReimage(String resourceGroupName, String vmScaleSetName) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginReimage(String resourceGroupName, String vmScaleSetName) { + beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -3774,7 +3741,7 @@ public OperationStatusResponseInner beginReimage(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -3784,12 +3751,12 @@ public ServiceFuture beginReimageAsync(String reso * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName) { + return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3801,9 +3768,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3813,16 +3780,16 @@ public Observable> beginReimageWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginReimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageDelegate(response); + ServiceResponse clientResponse = beginReimageDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3840,10 +3807,9 @@ public Observable> call(Response instanceIds) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginReimage(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -3856,7 +3822,7 @@ public OperationStatusResponseInner beginReimage(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -3867,12 +3833,12 @@ public ServiceFuture beginReimageAsync(String reso * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3885,9 +3851,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3898,18 +3864,18 @@ public Observable> beginReimageWit throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginReimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageDelegate(response); + ServiceResponse clientResponse = beginReimageDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3918,9 +3884,9 @@ public Observable> call(Response beginReimageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginReimageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -3934,10 +3900,9 @@ private ServiceResponse beginReimageDelegate(Respo * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimageAll(String resourceGroupName, String vmScaleSetName) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void reimageAll(String resourceGroupName, String vmScaleSetName) { + reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -3949,7 +3914,7 @@ public OperationStatusResponseInner reimageAll(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -3961,10 +3926,10 @@ public ServiceFuture reimageAllAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName) { + return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3978,7 +3943,7 @@ public OperationStatusResponseInner call(ServiceResponse> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3988,12 +3953,12 @@ public Observable> reimageAllWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.reimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. @@ -4004,10 +3969,9 @@ public Observable> reimageAllWithS * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimageAll(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void reimageAll(String resourceGroupName, String vmScaleSetName, List instanceIds) { + reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -4020,7 +3984,7 @@ public OperationStatusResponseInner reimageAll(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -4033,10 +3997,10 @@ public ServiceFuture reimageAllAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -4051,7 +4015,7 @@ public OperationStatusResponseInner call(ServiceResponse> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -4062,14 +4026,14 @@ public Observable> reimageAllWithS throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.reimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -4080,10 +4044,9 @@ public Observable> reimageAllWithS * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginReimageAll(String resourceGroupName, String vmScaleSetName) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginReimageAll(String resourceGroupName, String vmScaleSetName) { + beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -4095,7 +4058,7 @@ public OperationStatusResponseInner beginReimageAll(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -4105,12 +4068,12 @@ public ServiceFuture beginReimageAllAsync(String r * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName) { + return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -4122,9 +4085,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -4134,16 +4097,16 @@ public Observable> beginReimageAll if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginReimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageAllDelegate(response); + ServiceResponse clientResponse = beginReimageAllDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4161,10 +4124,9 @@ public Observable> call(Response instanceIds) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginReimageAll(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -4177,7 +4139,7 @@ public OperationStatusResponseInner beginReimageAll(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -4188,12 +4150,12 @@ public ServiceFuture beginReimageAllAsync(String r * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -4206,9 +4168,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -4219,18 +4181,18 @@ public Observable> beginReimageAll throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginReimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageAllDelegate(response); + ServiceResponse clientResponse = beginReimageAllDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4239,9 +4201,9 @@ public Observable> call(Response beginReimageAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginReimageAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -4313,7 +4275,7 @@ public Observable> forceRecoveryServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, platformUpdateDomain, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java index 36b0d482561..679c4a43d73 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java @@ -113,7 +113,7 @@ public Observable>> listWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java index e8042270a7c..b69dadbbf91 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java @@ -48,7 +48,7 @@ * An instance of this class provides access to all the operations defined * in VirtualMachines. */ -public class VirtualMachinesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class VirtualMachinesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private VirtualMachinesService service; /** The service client containing this operation class. */ @@ -266,7 +266,7 @@ public Observable> getE if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getExtensions(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -348,7 +348,7 @@ public Observable> getE if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getExtensions(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -440,7 +440,7 @@ public Observable> captureWith throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.capture(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -515,7 +515,7 @@ public Observable> beginCaptur throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCapture(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -608,7 +608,7 @@ public Observable> createOrUpdateWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -683,7 +683,7 @@ public Observable> beginCreateOrUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -776,7 +776,7 @@ public Observable> updateWithServiceRespons throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -851,7 +851,7 @@ public Observable> beginUpdateWithServiceRe throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -882,10 +882,9 @@ private ServiceResponse beginUpdateDelegate(Response deleteAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -909,10 +908,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String vmName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String vmName) { + return deleteWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -926,7 +925,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -936,9 +935,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -949,10 +948,9 @@ public Observable> deleteWithServi * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String vmName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String vmName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -964,7 +962,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -974,12 +972,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String vmName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String vmName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -991,9 +989,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1003,13 +1001,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1018,9 +1016,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1089,7 +1087,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final InstanceViewTypes expand = null; return service.getByResourceGroup(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -1171,7 +1169,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1255,7 +1253,7 @@ public Observable> instanceView if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.instanceView(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1285,10 +1283,9 @@ private ServiceResponse instanceViewDelegate(Re * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner convertToManagedDisks(String resourceGroupName, String vmName) { - return convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void convertToManagedDisks(String resourceGroupName, String vmName) { + convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -1300,7 +1297,7 @@ public OperationStatusResponseInner convertToManagedDisks(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture convertToManagedDisksAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture convertToManagedDisksAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1312,10 +1309,10 @@ public ServiceFuture convertToManagedDisksAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable convertToManagedDisksAsync(String resourceGroupName, String vmName) { - return convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable convertToManagedDisksAsync(String resourceGroupName, String vmName) { + return convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1329,7 +1326,7 @@ public OperationStatusResponseInner call(ServiceResponse> convertToManagedDisksWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> convertToManagedDisksWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1339,9 +1336,9 @@ public Observable> convertToManage if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.convertToManagedDisks(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1352,10 +1349,9 @@ public Observable> convertToManage * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginConvertToManagedDisks(String resourceGroupName, String vmName) { - return beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginConvertToManagedDisks(String resourceGroupName, String vmName) { + beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -1367,7 +1363,7 @@ public OperationStatusResponseInner beginConvertToManagedDisks(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginConvertToManagedDisksAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginConvertToManagedDisksAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1377,12 +1373,12 @@ public ServiceFuture beginConvertToManagedDisksAsy * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginConvertToManagedDisksAsync(String resourceGroupName, String vmName) { - return beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginConvertToManagedDisksAsync(String resourceGroupName, String vmName) { + return beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1394,9 +1390,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginConvertToManagedDisksWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginConvertToManagedDisksWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1406,13 +1402,13 @@ public Observable> beginConvertToM if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginConvertToManagedDisks(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginConvertToManagedDisksDelegate(response); + ServiceResponse clientResponse = beginConvertToManagedDisksDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1421,9 +1417,9 @@ public Observable> call(Response beginConvertToManagedDisksDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginConvertToManagedDisksDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1437,10 +1433,9 @@ private ServiceResponse beginConvertToManagedDisks * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner deallocate(String resourceGroupName, String vmName) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void deallocate(String resourceGroupName, String vmName) { + deallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -1452,7 +1447,7 @@ public OperationStatusResponseInner deallocate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deallocateAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture deallocateAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deallocateWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1464,10 +1459,10 @@ public ServiceFuture deallocateAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deallocateAsync(String resourceGroupName, String vmName) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable deallocateAsync(String resourceGroupName, String vmName) { + return deallocateWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1481,7 +1476,7 @@ public OperationStatusResponseInner call(ServiceResponse> deallocateWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> deallocateWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1491,9 +1486,9 @@ public Observable> deallocateWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.deallocate(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1504,10 +1499,9 @@ public Observable> deallocateWithS * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDeallocate(String resourceGroupName, String vmName) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginDeallocate(String resourceGroupName, String vmName) { + beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -1519,7 +1513,7 @@ public OperationStatusResponseInner beginDeallocate(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1529,12 +1523,12 @@ public ServiceFuture beginDeallocateAsync(String r * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeallocateAsync(String resourceGroupName, String vmName) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeallocateAsync(String resourceGroupName, String vmName) { + return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1546,9 +1540,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1558,13 +1552,13 @@ public Observable> beginDeallocate if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDeallocate(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeallocateDelegate(response); + ServiceResponse clientResponse = beginDeallocateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1573,9 +1567,9 @@ public Observable> call(Response beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1589,10 +1583,9 @@ private ServiceResponse beginDeallocateDelegate(Re * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner generalize(String resourceGroupName, String vmName) { - return generalizeWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void generalize(String resourceGroupName, String vmName) { + generalizeWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -1604,7 +1597,7 @@ public OperationStatusResponseInner generalize(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture generalizeAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture generalizeAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(generalizeWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1614,12 +1607,12 @@ public ServiceFuture generalizeAsync(String resour * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable generalizeAsync(String resourceGroupName, String vmName) { - return generalizeWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable generalizeAsync(String resourceGroupName, String vmName) { + return generalizeWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1631,9 +1624,9 @@ public OperationStatusResponseInner call(ServiceResponse> generalizeWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> generalizeWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1643,13 +1636,13 @@ public Observable> generalizeWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.generalize(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = generalizeDelegate(response); + ServiceResponse clientResponse = generalizeDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1658,9 +1651,9 @@ public Observable> call(Response generalizeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse generalizeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -1756,7 +1749,7 @@ public Observable>> listByResourceGrou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1861,7 +1854,7 @@ public Observable>> listSinglePageAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1945,7 +1938,7 @@ public Observable>> listAvailableS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listAvailableSizes(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1980,10 +1973,9 @@ private ServiceResponse> listAvailableSizesDel * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner powerOff(String resourceGroupName, String vmName) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void powerOff(String resourceGroupName, String vmName) { + powerOffWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -1995,7 +1987,7 @@ public OperationStatusResponseInner powerOff(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture powerOffAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture powerOffAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(powerOffWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2007,10 +1999,10 @@ public ServiceFuture powerOffAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable powerOffAsync(String resourceGroupName, String vmName) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable powerOffAsync(String resourceGroupName, String vmName) { + return powerOffWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2024,7 +2016,7 @@ public OperationStatusResponseInner call(ServiceResponse> powerOffWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> powerOffWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2034,9 +2026,9 @@ public Observable> powerOffWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.powerOff(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2047,10 +2039,9 @@ public Observable> powerOffWithSer * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginPowerOff(String resourceGroupName, String vmName) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginPowerOff(String resourceGroupName, String vmName) { + beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -2062,7 +2053,7 @@ public OperationStatusResponseInner beginPowerOff(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2072,12 +2063,12 @@ public ServiceFuture beginPowerOffAsync(String res * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPowerOffAsync(String resourceGroupName, String vmName) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPowerOffAsync(String resourceGroupName, String vmName) { + return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2089,9 +2080,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2101,13 +2092,13 @@ public Observable> beginPowerOffWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginPowerOff(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPowerOffDelegate(response); + ServiceResponse clientResponse = beginPowerOffDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2116,9 +2107,9 @@ public Observable> call(Response beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2132,10 +2123,9 @@ private ServiceResponse beginPowerOffDelegate(Resp * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner restart(String resourceGroupName, String vmName) { - return restartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void restart(String resourceGroupName, String vmName) { + restartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -2147,7 +2137,7 @@ public OperationStatusResponseInner restart(String resourceGroupName, String vmN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture restartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture restartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2159,10 +2149,10 @@ public ServiceFuture restartAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable restartAsync(String resourceGroupName, String vmName) { - return restartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable restartAsync(String resourceGroupName, String vmName) { + return restartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2176,7 +2166,7 @@ public OperationStatusResponseInner call(ServiceResponse> restartWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2186,9 +2176,9 @@ public Observable> restartWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.restart(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2199,10 +2189,9 @@ public Observable> restartWithServ * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRestart(String resourceGroupName, String vmName) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginRestart(String resourceGroupName, String vmName) { + beginRestartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -2214,7 +2203,7 @@ public OperationStatusResponseInner beginRestart(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRestartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRestartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2224,12 +2213,12 @@ public ServiceFuture beginRestartAsync(String reso * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRestartAsync(String resourceGroupName, String vmName) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRestartAsync(String resourceGroupName, String vmName) { + return beginRestartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2241,9 +2230,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2253,13 +2242,13 @@ public Observable> beginRestartWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginRestart(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRestartDelegate(response); + ServiceResponse clientResponse = beginRestartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2268,9 +2257,9 @@ public Observable> call(Response beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2284,10 +2273,9 @@ private ServiceResponse beginRestartDelegate(Respo * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner start(String resourceGroupName, String vmName) { - return startWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void start(String resourceGroupName, String vmName) { + startWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -2299,7 +2287,7 @@ public OperationStatusResponseInner start(String resourceGroupName, String vmNam * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture startAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture startAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2311,10 +2299,10 @@ public ServiceFuture startAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable startAsync(String resourceGroupName, String vmName) { - return startWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable startAsync(String resourceGroupName, String vmName) { + return startWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2328,7 +2316,7 @@ public OperationStatusResponseInner call(ServiceResponse> startWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> startWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2338,9 +2326,9 @@ public Observable> startWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.start(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2351,10 +2339,9 @@ public Observable> startWithServic * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginStart(String resourceGroupName, String vmName) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginStart(String resourceGroupName, String vmName) { + beginStartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -2366,7 +2353,7 @@ public OperationStatusResponseInner beginStart(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginStartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginStartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2376,12 +2363,12 @@ public ServiceFuture beginStartAsync(String resour * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginStartAsync(String resourceGroupName, String vmName) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginStartAsync(String resourceGroupName, String vmName) { + return beginStartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2393,9 +2380,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginStartWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2405,13 +2392,13 @@ public Observable> beginStartWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginStart(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginStartDelegate(response); + ServiceResponse clientResponse = beginStartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2420,9 +2407,9 @@ public Observable> call(Response beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2436,10 +2423,9 @@ private ServiceResponse beginStartDelegate(Respons * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner redeploy(String resourceGroupName, String vmName) { - return redeployWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void redeploy(String resourceGroupName, String vmName) { + redeployWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -2451,7 +2437,7 @@ public OperationStatusResponseInner redeploy(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture redeployAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture redeployAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2463,10 +2449,10 @@ public ServiceFuture redeployAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable redeployAsync(String resourceGroupName, String vmName) { - return redeployWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable redeployAsync(String resourceGroupName, String vmName) { + return redeployWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2480,7 +2466,7 @@ public OperationStatusResponseInner call(ServiceResponse> redeployWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2490,9 +2476,9 @@ public Observable> redeployWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.redeploy(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2503,10 +2489,9 @@ public Observable> redeployWithSer * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRedeploy(String resourceGroupName, String vmName) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginRedeploy(String resourceGroupName, String vmName) { + beginRedeployWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -2518,7 +2503,7 @@ public OperationStatusResponseInner beginRedeploy(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2528,12 +2513,12 @@ public ServiceFuture beginRedeployAsync(String res * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRedeployAsync(String resourceGroupName, String vmName) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRedeployAsync(String resourceGroupName, String vmName) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2545,9 +2530,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2557,13 +2542,13 @@ public Observable> beginRedeployWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginRedeploy(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRedeployDelegate(response); + ServiceResponse clientResponse = beginRedeployDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2572,9 +2557,9 @@ public Observable> call(Response beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2588,10 +2573,9 @@ private ServiceResponse beginRedeployDelegate(Resp * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmName) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void performMaintenance(String resourceGroupName, String vmName) { + performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -2603,7 +2587,7 @@ public OperationStatusResponseInner performMaintenance(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2615,10 +2599,10 @@ public ServiceFuture performMaintenanceAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable performMaintenanceAsync(String resourceGroupName, String vmName) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable performMaintenanceAsync(String resourceGroupName, String vmName) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2632,7 +2616,7 @@ public OperationStatusResponseInner call(ServiceResponse> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2642,9 +2626,9 @@ public Observable> performMaintena if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.performMaintenance(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2655,10 +2639,9 @@ public Observable> performMaintena * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmName) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginPerformMaintenance(String resourceGroupName, String vmName) { + beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -2670,7 +2653,7 @@ public OperationStatusResponseInner beginPerformMaintenance(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2680,12 +2663,12 @@ public ServiceFuture beginPerformMaintenanceAsync( * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmName) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmName) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2697,9 +2680,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2709,13 +2692,13 @@ public Observable> beginPerformMai if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginPerformMaintenance(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2724,9 +2707,9 @@ public Observable> call(Response beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2741,9 +2724,9 @@ private ServiceResponse beginPerformMaintenanceDel * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RunCommandResultInner object if successful. + * @return the List<InstanceViewStatusInner> object if successful. */ - public RunCommandResultInner runCommand(String resourceGroupName, String vmName, RunCommandInput parameters) { + public List runCommand(String resourceGroupName, String vmName, RunCommandInput parameters) { return runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().last().body(); } @@ -2757,7 +2740,7 @@ public RunCommandResultInner runCommand(String resourceGroupName, String vmName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture runCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters, final ServiceCallback serviceCallback) { + public ServiceFuture> runCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters, final ServiceCallback> serviceCallback) { return ServiceFuture.fromResponse(runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); } @@ -2770,10 +2753,10 @@ public ServiceFuture runCommandAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable runCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { - return runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1, RunCommandResultInner>() { + public Observable> runCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { + return runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1>, List>() { @Override - public RunCommandResultInner call(ServiceResponse response) { + public List call(ServiceResponse> response) { return response.body(); } }); @@ -2788,7 +2771,7 @@ public RunCommandResultInner call(ServiceResponse respons * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> runCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { + public Observable>> runCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2802,9 +2785,9 @@ public Observable> runCommandWithServiceR throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.runCommand(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken>() { }.getType()); } /** @@ -2816,9 +2799,9 @@ public Observable> runCommandWithServiceR * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RunCommandResultInner object if successful. + * @return the List<InstanceViewStatusInner> object if successful. */ - public RunCommandResultInner beginRunCommand(String resourceGroupName, String vmName, RunCommandInput parameters) { + public List beginRunCommand(String resourceGroupName, String vmName, RunCommandInput parameters) { return beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().single().body(); } @@ -2832,7 +2815,7 @@ public RunCommandResultInner beginRunCommand(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters, final ServiceCallback serviceCallback) { + public ServiceFuture> beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters, final ServiceCallback> serviceCallback) { return ServiceFuture.fromResponse(beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); } @@ -2843,12 +2826,12 @@ public ServiceFuture beginRunCommandAsync(String resource * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Run command operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RunCommandResultInner object + * @return the observable to the List<InstanceViewStatusInner> object */ - public Observable beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { - return beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1, RunCommandResultInner>() { + public Observable> beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { + return beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1>, List>() { @Override - public RunCommandResultInner call(ServiceResponse response) { + public List call(ServiceResponse> response) { return response.body(); } }); @@ -2861,9 +2844,9 @@ public RunCommandResultInner call(ServiceResponse respons * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Run command operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RunCommandResultInner object + * @return the observable to the List<InstanceViewStatusInner> object */ - public Observable> beginRunCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { + public Observable>> beginRunCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2877,13 +2860,13 @@ public Observable> beginRunCommandWithSer throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginRunCommand(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = beginRunCommandDelegate(response); + ServiceResponse> clientResponse = beginRunCommandDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2892,9 +2875,9 @@ public Observable> call(Response beginRunCommandDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> beginRunCommandDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); From 81d5253b0b38fe6e32f3f96605c81ef0044d4488 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 23 May 2018 12:37:29 -0700 Subject: [PATCH 14/15] [AutoPR compute/resource-manager] Added the swagger file for the new service Gallery. (#156) * Generated from b48862551b5e97eb40acb3da63e55522a9db566c Added the swagger file for the new service Gallery. * Generated from 0ae8adebcc75669620242663ebae391ca17bd2d0 Fixed minor issues. Added an example. * Generated from 958b583af5cb30874efc02c325d7e62c8737afce Merge branch 'dev/xiowei/addSwaggerForGallery' of https://github.com/vanbasten2323/azure-rest-api-specs into dev/xiowei/addSwaggerForGallery * Generated from 29d0c5762aad64243a021fac44d65b8610304e4e Fixed description for 202 response. * Generated from b74f3ee0fdca928bf92a7fdd2bcd17994deadca9 Changed the operationId to conform to naming convention. * Generated from 664c041aeed346e4fdc3a2c8c29c1c59e7505b66 Fixed some typos. * Generated from e7ab96432e0bfc7c49839ca5d1194ec1be0c23a9 Add default error response. Make provisioningInfo a enum type. * Generated from c26feda2acff5be97893b6e5db4270e09dbf1c25 Fixed comments according to CR. * Generated from b757a4ec5fd9e1a35bedefd53fe3d92e111db5eb Resolved merge conflicts. * Generated from fa546f92703f69fabf94f3e104282d5e8d95965e Updated the readme.md --- .../compute/AggregatedReplicationState.java | 59 ++ .../azure/management/compute/Disallowed.java | 44 + .../GalleryArtifactPublishingProfileBase.java | 70 ++ .../compute/GalleryArtifactSource.java | 43 + .../compute/GalleryDataDiskImage.java | 45 + .../management/compute/GalleryDiskImage.java | 70 ++ .../management/compute/GalleryIdentifier.java | 32 + .../compute/GalleryImageIdentifier.java | 95 ++ .../GalleryImageVersionPublishingProfile.java | 86 ++ .../GalleryImageVersionStorageProfile.java | 70 ++ .../compute/GalleryOSDiskImage.java | 16 + .../azure/management/compute/HostCaching.java | 56 ++ .../management/compute/ImagePurchasePlan.java | 96 ++ .../management/compute/ManagedArtifact.java | 43 + .../RecommendedMachineConfiguration.java | 69 ++ .../compute/RegionalReplicationStatus.java | 122 +++ .../management/compute/ReplicationState.java | 59 ++ .../management/compute/ReplicationStatus.java | 72 ++ .../compute/ReplicationStatusTypes.java | 50 + .../management/compute/ResourceRange.java | 69 ++ .../implementation/GalleriesInner.java | 950 ++++++++++++++++++ .../implementation/GalleryImageInner.java | 336 +++++++ .../implementation/GalleryImageListInner.java | 71 ++ .../GalleryImageVersionInner.java | 120 +++ .../GalleryImageVersionListInner.java | 71 ++ .../GalleryImageVersionsInner.java | 906 +++++++++++++++++ .../implementation/GalleryImagesInner.java | 766 ++++++++++++++ .../compute/implementation/GalleryInner.java | 91 ++ .../compute/implementation/GallerysInner.java | 661 ++++++++++++ 29 files changed, 5238 insertions(+) create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AggregatedReplicationState.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Disallowed.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryArtifactPublishingProfileBase.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryArtifactSource.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryDataDiskImage.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryDiskImage.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryIdentifier.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageIdentifier.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageVersionPublishingProfile.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageVersionStorageProfile.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryOSDiskImage.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HostCaching.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImagePurchasePlan.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ManagedArtifact.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RecommendedMachineConfiguration.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RegionalReplicationStatus.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationState.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationStatus.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationStatusTypes.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceRange.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleriesInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageListInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionListInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionsInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImagesInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryInner.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GallerysInner.java diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AggregatedReplicationState.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AggregatedReplicationState.java new file mode 100644 index 00000000000..c2238ed133f --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AggregatedReplicationState.java @@ -0,0 +1,59 @@ +/** + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AggregatedReplicationState. + */ +public enum AggregatedReplicationState { + /** Enum value Unknown. */ + UNKNOWN("Unknown"), + + /** Enum value InProgress. */ + IN_PROGRESS("InProgress"), + + /** Enum value Completed. */ + COMPLETED("Completed"), + + /** Enum value Failed. */ + FAILED("Failed"); + + /** The actual serialized value for a AggregatedReplicationState instance. */ + private String value; + + AggregatedReplicationState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AggregatedReplicationState instance. + * + * @param value the serialized value to parse. + * @return the parsed AggregatedReplicationState object, or null if unable to parse. + */ + @JsonCreator + public static AggregatedReplicationState fromString(String value) { + AggregatedReplicationState[] items = AggregatedReplicationState.values(); + for (AggregatedReplicationState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Disallowed.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Disallowed.java new file mode 100644 index 00000000000..bb457789156 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Disallowed.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 java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the disallowed disk types. + */ +public class Disallowed { + /** + * A list of disk types. + */ + @JsonProperty(value = "diskTypes") + private List diskTypes; + + /** + * Get the diskTypes value. + * + * @return the diskTypes value + */ + public List diskTypes() { + return this.diskTypes; + } + + /** + * Set the diskTypes value. + * + * @param diskTypes the diskTypes value to set + * @return the Disallowed object itself. + */ + public Disallowed withDiskTypes(List diskTypes) { + this.diskTypes = diskTypes; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryArtifactPublishingProfileBase.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryArtifactPublishingProfileBase.java new file mode 100644 index 00000000000..b26fa33af52 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryArtifactPublishingProfileBase.java @@ -0,0 +1,70 @@ +/** + * 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; + +/** + * Describes the basic gallery artifact publishing profile. + */ +public class GalleryArtifactPublishingProfileBase { + /** + * The regions where the artifact is going to be published. + */ + @JsonProperty(value = "regions") + private List regions; + + /** + * The source property. + */ + @JsonProperty(value = "source") + private GalleryArtifactSource source; + + /** + * Get the regions value. + * + * @return the regions value + */ + public List regions() { + return this.regions; + } + + /** + * Set the regions value. + * + * @param regions the regions value to set + * @return the GalleryArtifactPublishingProfileBase object itself. + */ + public GalleryArtifactPublishingProfileBase withRegions(List regions) { + this.regions = regions; + return this; + } + + /** + * Get the source value. + * + * @return the source value + */ + public GalleryArtifactSource source() { + return this.source; + } + + /** + * Set the source value. + * + * @param source the source value to set + * @return the GalleryArtifactPublishingProfileBase object itself. + */ + public GalleryArtifactPublishingProfileBase withSource(GalleryArtifactSource source) { + this.source = source; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryArtifactSource.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryArtifactSource.java new file mode 100644 index 00000000000..90c90ea5647 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryArtifactSource.java @@ -0,0 +1,43 @@ +/** + * 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 source of the gallery artifact. + */ +public class GalleryArtifactSource { + /** + * The managedImage property. + */ + @JsonProperty(value = "managedImage") + private ManagedArtifact managedImage; + + /** + * Get the managedImage value. + * + * @return the managedImage value + */ + public ManagedArtifact managedImage() { + return this.managedImage; + } + + /** + * Set the managedImage value. + * + * @param managedImage the managedImage value to set + * @return the GalleryArtifactSource object itself. + */ + public GalleryArtifactSource withManagedImage(ManagedArtifact managedImage) { + this.managedImage = managedImage; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryDataDiskImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryDataDiskImage.java new file mode 100644 index 00000000000..86d3aac024c --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryDataDiskImage.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; + +/** + * This is the data disk image. + */ +public class GalleryDataDiskImage extends GalleryDiskImage { + /** + * Specifies the logical unit number of the data disk. This value is used + * to identify data disks within the VM and therefore must be unique for + * each data disk attached to a VM. + */ + @JsonProperty(value = "lun") + private Integer lun; + + /** + * Get the lun value. + * + * @return the lun value + */ + public Integer lun() { + return this.lun; + } + + /** + * Set the lun value. + * + * @param lun the lun value to set + * @return the GalleryDataDiskImage object itself. + */ + public GalleryDataDiskImage withLun(Integer lun) { + this.lun = lun; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryDiskImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryDiskImage.java new file mode 100644 index 00000000000..2c93f4cb064 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryDiskImage.java @@ -0,0 +1,70 @@ +/** + * 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; + +/** + * This is the disk image base class. + */ +public class GalleryDiskImage { + /** + * It indicates the size of the VHD to create. + */ + @JsonProperty(value = "sizedInGB") + private Integer sizedInGB; + + /** + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. + */ + @JsonProperty(value = "hostCaching") + private HostCaching hostCaching; + + /** + * Get the sizedInGB value. + * + * @return the sizedInGB value + */ + public Integer sizedInGB() { + return this.sizedInGB; + } + + /** + * Set the sizedInGB value. + * + * @param sizedInGB the sizedInGB value to set + * @return the GalleryDiskImage object itself. + */ + public GalleryDiskImage withSizedInGB(Integer sizedInGB) { + this.sizedInGB = sizedInGB; + return this; + } + + /** + * Get the hostCaching value. + * + * @return the hostCaching value + */ + public HostCaching hostCaching() { + return this.hostCaching; + } + + /** + * Set the hostCaching value. + * + * @param hostCaching the hostCaching value to set + * @return the GalleryDiskImage object itself. + */ + public GalleryDiskImage withHostCaching(HostCaching hostCaching) { + this.hostCaching = hostCaching; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryIdentifier.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryIdentifier.java new file mode 100644 index 00000000000..5eadb7c8a7b --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryIdentifier.java @@ -0,0 +1,32 @@ +/** + * 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 GalleryIdentifier model. + */ +public class GalleryIdentifier { + /** + * The unique name of the gallery. + */ + @JsonProperty(value = "uniqueName", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueName; + + /** + * Get the uniqueName value. + * + * @return the uniqueName value + */ + public String uniqueName() { + return this.uniqueName; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageIdentifier.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageIdentifier.java new file mode 100644 index 00000000000..f3e6f5e87ad --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageIdentifier.java @@ -0,0 +1,95 @@ +/** + * 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; + +/** + * This is the gallery image identifier. + */ +public class GalleryImageIdentifier { + /** + * The gallery image publisher name. + */ + @JsonProperty(value = "publisher") + private String publisher; + + /** + * The gallery image offer name. + */ + @JsonProperty(value = "offer") + private String offer; + + /** + * The gallery image sku name. + */ + @JsonProperty(value = "sku") + private String sku; + + /** + * 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 GalleryImageIdentifier object itself. + */ + public GalleryImageIdentifier withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get the offer value. + * + * @return the offer value + */ + public String offer() { + return this.offer; + } + + /** + * Set the offer value. + * + * @param offer the offer value to set + * @return the GalleryImageIdentifier object itself. + */ + public GalleryImageIdentifier withOffer(String offer) { + this.offer = offer; + return this; + } + + /** + * Get the sku value. + * + * @return the sku value + */ + public String sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the GalleryImageIdentifier object itself. + */ + public GalleryImageIdentifier withSku(String sku) { + this.sku = sku; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageVersionPublishingProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageVersionPublishingProfile.java new file mode 100644 index 00000000000..bbdfd9575d2 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageVersionPublishingProfile.java @@ -0,0 +1,86 @@ +/** + * 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 org.joda.time.LocalDate; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The publishing profile of a gallery image version. + */ +public class GalleryImageVersionPublishingProfile extends GalleryArtifactPublishingProfileBase { + /** + * The flag means that if it is set to true, people deploying VMs with + * 'latest' as version will not use this version. + */ + @JsonProperty(value = "excludeFromLatest") + private Boolean excludeFromLatest; + + /** + * The time when the gallery image version is published. + */ + @JsonProperty(value = "publishedDate", access = JsonProperty.Access.WRITE_ONLY) + private LocalDate publishedDate; + + /** + * The end of life date of the gallery image version. + */ + @JsonProperty(value = "endOfLifeDate") + private LocalDate endOfLifeDate; + + /** + * Get the excludeFromLatest value. + * + * @return the excludeFromLatest value + */ + public Boolean excludeFromLatest() { + return this.excludeFromLatest; + } + + /** + * Set the excludeFromLatest value. + * + * @param excludeFromLatest the excludeFromLatest value to set + * @return the GalleryImageVersionPublishingProfile object itself. + */ + public GalleryImageVersionPublishingProfile withExcludeFromLatest(Boolean excludeFromLatest) { + this.excludeFromLatest = excludeFromLatest; + return this; + } + + /** + * Get the publishedDate value. + * + * @return the publishedDate value + */ + public LocalDate publishedDate() { + return this.publishedDate; + } + + /** + * Get the endOfLifeDate value. + * + * @return the endOfLifeDate value + */ + public LocalDate endOfLifeDate() { + return this.endOfLifeDate; + } + + /** + * Set the endOfLifeDate value. + * + * @param endOfLifeDate the endOfLifeDate value to set + * @return the GalleryImageVersionPublishingProfile object itself. + */ + public GalleryImageVersionPublishingProfile withEndOfLifeDate(LocalDate endOfLifeDate) { + this.endOfLifeDate = endOfLifeDate; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageVersionStorageProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageVersionStorageProfile.java new file mode 100644 index 00000000000..219a798c135 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageVersionStorageProfile.java @@ -0,0 +1,70 @@ +/** + * 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; + +/** + * This is the storage profile of a gallery image version. + */ +public class GalleryImageVersionStorageProfile { + /** + * The osDiskImage property. + */ + @JsonProperty(value = "osDiskImage") + private GalleryOSDiskImage osDiskImage; + + /** + * A list of data disk images. + */ + @JsonProperty(value = "dataDiskImages") + private List dataDiskImages; + + /** + * Get the osDiskImage value. + * + * @return the osDiskImage value + */ + public GalleryOSDiskImage osDiskImage() { + return this.osDiskImage; + } + + /** + * Set the osDiskImage value. + * + * @param osDiskImage the osDiskImage value to set + * @return the GalleryImageVersionStorageProfile object itself. + */ + public GalleryImageVersionStorageProfile withOsDiskImage(GalleryOSDiskImage osDiskImage) { + this.osDiskImage = osDiskImage; + return this; + } + + /** + * Get the dataDiskImages value. + * + * @return the dataDiskImages value + */ + public List dataDiskImages() { + return this.dataDiskImages; + } + + /** + * Set the dataDiskImages value. + * + * @param dataDiskImages the dataDiskImages value to set + * @return the GalleryImageVersionStorageProfile object itself. + */ + public GalleryImageVersionStorageProfile withDataDiskImages(List dataDiskImages) { + this.dataDiskImages = dataDiskImages; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryOSDiskImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryOSDiskImage.java new file mode 100644 index 00000000000..4e2950fb80e --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryOSDiskImage.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; + + +/** + * This is the OS disk image. + */ +public class GalleryOSDiskImage extends GalleryDiskImage { +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HostCaching.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HostCaching.java new file mode 100644 index 00000000000..50498ff106f --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HostCaching.java @@ -0,0 +1,56 @@ +/** + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for HostCaching. + */ +public enum HostCaching { + /** Enum value None. */ + NONE("None"), + + /** Enum value ReadOnly. */ + READ_ONLY("ReadOnly"), + + /** Enum value ReadWrite. */ + READ_WRITE("ReadWrite"); + + /** The actual serialized value for a HostCaching instance. */ + private String value; + + HostCaching(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a HostCaching instance. + * + * @param value the serialized value to parse. + * @return the parsed HostCaching object, or null if unable to parse. + */ + @JsonCreator + public static HostCaching fromString(String value) { + HostCaching[] items = HostCaching.values(); + for (HostCaching item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImagePurchasePlan.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImagePurchasePlan.java new file mode 100644 index 00000000000..d61b7bd047c --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImagePurchasePlan.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; + +/** + * Describes the gallery image purchase plan. This is used by marketplace + * images. + */ +public class ImagePurchasePlan { + /** + * The plan ID. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The publisher ID. + */ + @JsonProperty(value = "publisher") + private String publisher; + + /** + * The product ID. + */ + @JsonProperty(value = "product") + private String product; + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the ImagePurchasePlan object itself. + */ + public ImagePurchasePlan withName(String name) { + this.name = name; + 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 ImagePurchasePlan object itself. + */ + public ImagePurchasePlan withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get the product value. + * + * @return the product value + */ + public String product() { + return this.product; + } + + /** + * Set the product value. + * + * @param product the product value to set + * @return the ImagePurchasePlan object itself. + */ + public ImagePurchasePlan withProduct(String product) { + this.product = product; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ManagedArtifact.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ManagedArtifact.java new file mode 100644 index 00000000000..9fdc871e233 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ManagedArtifact.java @@ -0,0 +1,43 @@ +/** + * 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 managed artifact. + */ +public class ManagedArtifact { + /** + * The managed artifact id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the id value. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the id value. + * + * @param id the id value to set + * @return the ManagedArtifact object itself. + */ + public ManagedArtifact withId(String id) { + this.id = id; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RecommendedMachineConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RecommendedMachineConfiguration.java new file mode 100644 index 00000000000..19258d74d9b --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RecommendedMachineConfiguration.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; + +/** + * Describes the recommended machine configuration. + */ +public class RecommendedMachineConfiguration { + /** + * The vCPUs property. + */ + @JsonProperty(value = "vCPUs") + private ResourceRange vCPUs; + + /** + * The memory property. + */ + @JsonProperty(value = "memory") + private ResourceRange memory; + + /** + * Get the vCPUs value. + * + * @return the vCPUs value + */ + public ResourceRange vCPUs() { + return this.vCPUs; + } + + /** + * Set the vCPUs value. + * + * @param vCPUs the vCPUs value to set + * @return the RecommendedMachineConfiguration object itself. + */ + public RecommendedMachineConfiguration withVCPUs(ResourceRange vCPUs) { + this.vCPUs = vCPUs; + return this; + } + + /** + * Get the memory value. + * + * @return the memory value + */ + public ResourceRange memory() { + return this.memory; + } + + /** + * Set the memory value. + * + * @param memory the memory value to set + * @return the RecommendedMachineConfiguration object itself. + */ + public RecommendedMachineConfiguration withMemory(ResourceRange memory) { + this.memory = memory; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RegionalReplicationStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RegionalReplicationStatus.java new file mode 100644 index 00000000000..0651f072b9a --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RegionalReplicationStatus.java @@ -0,0 +1,122 @@ +/** + * 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; + +/** + * This is the regional replication status. + */ +public class RegionalReplicationStatus { + /** + * The region where the gallery image version is published to. + */ + @JsonProperty(value = "region") + private String region; + + /** + * This is the regional replication state. Possible values include: + * 'Unknown', 'Replicating', 'Completed', 'Failed'. + */ + @JsonProperty(value = "state") + private ReplicationState state; + + /** + * The details of the replication status. + */ + @JsonProperty(value = "details") + private String details; + + /** + * It indicates progress of the replication job. + */ + @JsonProperty(value = "progress") + private Integer progress; + + /** + * Get the region value. + * + * @return the region value + */ + public String region() { + return this.region; + } + + /** + * Set the region value. + * + * @param region the region value to set + * @return the RegionalReplicationStatus object itself. + */ + public RegionalReplicationStatus withRegion(String region) { + this.region = region; + return this; + } + + /** + * Get the state value. + * + * @return the state value + */ + public ReplicationState state() { + return this.state; + } + + /** + * Set the state value. + * + * @param state the state value to set + * @return the RegionalReplicationStatus object itself. + */ + public RegionalReplicationStatus withState(ReplicationState state) { + this.state = state; + return this; + } + + /** + * Get the details value. + * + * @return the details value + */ + public String details() { + return this.details; + } + + /** + * Set the details value. + * + * @param details the details value to set + * @return the RegionalReplicationStatus object itself. + */ + public RegionalReplicationStatus withDetails(String details) { + this.details = details; + return this; + } + + /** + * Get the progress value. + * + * @return the progress value + */ + public Integer progress() { + return this.progress; + } + + /** + * Set the progress value. + * + * @param progress the progress value to set + * @return the RegionalReplicationStatus object itself. + */ + public RegionalReplicationStatus withProgress(Integer progress) { + this.progress = progress; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationState.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationState.java new file mode 100644 index 00000000000..849cf4c5f3e --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationState.java @@ -0,0 +1,59 @@ +/** + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ReplicationState. + */ +public enum ReplicationState { + /** Enum value Unknown. */ + UNKNOWN("Unknown"), + + /** Enum value Replicating. */ + REPLICATING("Replicating"), + + /** Enum value Completed. */ + COMPLETED("Completed"), + + /** Enum value Failed. */ + FAILED("Failed"); + + /** The actual serialized value for a ReplicationState instance. */ + private String value; + + ReplicationState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ReplicationState instance. + * + * @param value the serialized value to parse. + * @return the parsed ReplicationState object, or null if unable to parse. + */ + @JsonCreator + public static ReplicationState fromString(String value) { + ReplicationState[] items = ReplicationState.values(); + for (ReplicationState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationStatus.java new file mode 100644 index 00000000000..501723d6ff5 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationStatus.java @@ -0,0 +1,72 @@ +/** + * 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; + +/** + * This is the replication status of the gallery image version. + */ +public class ReplicationStatus { + /** + * This is the aggregated replication status based on the regional + * replication status. Possible values include: 'Unknown', 'InProgress', + * 'Completed', 'Failed'. + */ + @JsonProperty(value = "aggregatedState") + private AggregatedReplicationState aggregatedState; + + /** + * This is a summary of replication status for each region. + */ + @JsonProperty(value = "summary") + private List summary; + + /** + * Get the aggregatedState value. + * + * @return the aggregatedState value + */ + public AggregatedReplicationState aggregatedState() { + return this.aggregatedState; + } + + /** + * Set the aggregatedState value. + * + * @param aggregatedState the aggregatedState value to set + * @return the ReplicationStatus object itself. + */ + public ReplicationStatus withAggregatedState(AggregatedReplicationState aggregatedState) { + this.aggregatedState = aggregatedState; + return this; + } + + /** + * Get the summary value. + * + * @return the summary value + */ + public List summary() { + return this.summary; + } + + /** + * Set the summary value. + * + * @param summary the summary value to set + * @return the ReplicationStatus object itself. + */ + public ReplicationStatus withSummary(List summary) { + this.summary = summary; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationStatusTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationStatusTypes.java new file mode 100644 index 00000000000..8a910c86736 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationStatusTypes.java @@ -0,0 +1,50 @@ +/** + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ReplicationStatusTypes. + */ +public enum ReplicationStatusTypes { + /** Enum value ReplicationStatus. */ + REPLICATION_STATUS("ReplicationStatus"); + + /** The actual serialized value for a ReplicationStatusTypes instance. */ + private String value; + + ReplicationStatusTypes(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ReplicationStatusTypes instance. + * + * @param value the serialized value to parse. + * @return the parsed ReplicationStatusTypes object, or null if unable to parse. + */ + @JsonCreator + public static ReplicationStatusTypes fromString(String value) { + ReplicationStatusTypes[] items = ReplicationStatusTypes.values(); + for (ReplicationStatusTypes item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceRange.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceRange.java new file mode 100644 index 00000000000..7651b9b06b4 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceRange.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; + +/** + * Describes the resource range. + */ +public class ResourceRange { + /** + * The minimum number of the resource. + */ + @JsonProperty(value = "min") + private Integer min; + + /** + * The maximum number of the resource. + */ + @JsonProperty(value = "max") + private Integer max; + + /** + * Get the min value. + * + * @return the min value + */ + public Integer min() { + return this.min; + } + + /** + * Set the min value. + * + * @param min the min value to set + * @return the ResourceRange object itself. + */ + public ResourceRange withMin(Integer min) { + this.min = min; + return this; + } + + /** + * Get the max value. + * + * @return the max value + */ + public Integer max() { + return this.max; + } + + /** + * Set the max value. + * + * @param max the max value to set + * @return the ResourceRange object itself. + */ + public ResourceRange withMax(Integer max) { + this.max = max; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleriesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleriesInner.java new file mode 100644 index 00000000000..450da91330d --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleriesInner.java @@ -0,0 +1,950 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Galleries. + */ +public class GalleriesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private GalleriesService service; + /** The service client containing this operation class. */ + private ComputeManagementClientImpl client; + + /** + * Initializes an instance of GalleriesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public GalleriesInner(Retrofit retrofit, ComputeManagementClientImpl client) { + this.service = retrofit.create(GalleriesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Galleries to be + * used by Retrofit to perform actually REST calls. + */ + interface GalleriesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Galleries createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Query("api-version") String apiVersion, @Body GalleryInner gallery, @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.Galleries beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Query("api-version") String apiVersion, @Body GalleryInner gallery, @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.Galleries getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @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.Galleries delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @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.Galleries beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @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.Galleries listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @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.Galleries list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries") + Observable> list(@Path("subscriptionId") String subscriptionId, @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.Galleries listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @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.Galleries listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param gallery Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryInner object if successful. + */ + public GalleryInner createOrUpdate(String resourceGroupName, String galleryName, GalleryInner gallery) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, gallery).toBlocking().last().body(); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param gallery Parameters supplied to the create or update gallery operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner gallery, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, gallery), serviceCallback); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param gallery Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner gallery) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, gallery).map(new Func1, GalleryInner>() { + @Override + public GalleryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param gallery Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, GalleryInner gallery) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (gallery == null) { + throw new IllegalArgumentException("Parameter gallery is required and cannot be null."); + } + Validator.validate(gallery); + final String apiVersion = "2018-06-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, gallery, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param gallery Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryInner object if successful. + */ + public GalleryInner beginCreateOrUpdate(String resourceGroupName, String galleryName, GalleryInner gallery) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, gallery).toBlocking().single().body(); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param gallery Parameters supplied to the create or update gallery operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner gallery, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, gallery), serviceCallback); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param gallery Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner gallery) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, gallery).map(new Func1, GalleryInner>() { + @Override + public GalleryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param gallery Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, GalleryInner gallery) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (gallery == null) { + throw new IllegalArgumentException("Parameter gallery is required and cannot be null."); + } + Validator.validate(gallery); + final String apiVersion = "2018-06-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, gallery, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves information about a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryInner object if successful. + */ + public GalleryInner getByResourceGroup(String resourceGroupName, String galleryName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, galleryName).toBlocking().single().body(); + } + + /** + * Retrieves information about a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String galleryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, galleryName), serviceCallback); + } + + /** + * Retrieves information about a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String galleryName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, galleryName).map(new Func1, GalleryInner>() { + @Override + public GalleryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves information about a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String galleryName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner delete(String resourceGroupName, String galleryName) { + return deleteWithServiceResponseAsync(resourceGroupName, galleryName).toBlocking().last().body(); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String galleryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, galleryName), serviceCallback); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String galleryName) { + return deleteWithServiceResponseAsync(resourceGroupName, galleryName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String galleryName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginDelete(String resourceGroupName, String galleryName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName).toBlocking().single().body(); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String galleryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName), serviceCallback); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginDeleteAsync(String resourceGroupName, String galleryName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String galleryName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List galleries under a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GalleryInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List galleries under a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List galleries under a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List galleries under a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List galleries under a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GalleryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List galleries under a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GalleryInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List galleries under a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List galleries under a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List galleries under a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List galleries under a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GalleryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List galleries under a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GalleryInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List galleries under a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List galleries under a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List galleries under a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List galleries under a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GalleryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List galleries under a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GalleryInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List galleries under a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List galleries under a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List galleries under a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List galleries under a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GalleryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageInner.java new file mode 100644 index 00000000000..4777b319852 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageInner.java @@ -0,0 +1,336 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.OperatingSystemTypes; +import com.microsoft.azure.management.compute.OperatingSystemStateTypes; +import org.joda.time.LocalDate; +import com.microsoft.azure.management.compute.GalleryImageIdentifier; +import com.microsoft.azure.management.compute.RecommendedMachineConfiguration; +import com.microsoft.azure.management.compute.Disallowed; +import com.microsoft.azure.management.compute.ImagePurchasePlan; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Specifies information about the gallery image that you want to create or + * update. + */ +@JsonFlatten +public class GalleryImageInner extends Resource { + /** + * The description of this gallery image resource. + */ + @JsonProperty(value = "properties.description") + private String description; + + /** + * The Eula agreement for the gallery image. + */ + @JsonProperty(value = "properties.eula") + private String eula; + + /** + * The privacy statement uri. + */ + @JsonProperty(value = "properties.privacyStatementUri") + private String privacyStatementUri; + + /** + * The release note uri. + */ + @JsonProperty(value = "properties.releaseNoteUri") + private String releaseNoteUri; + + /** + * This property allows you to specify the type of the OS that is included + * in the disk if creating a VM from user-image or a specialized VHD. + * <br><br> Possible values are: <br><br> + * **Windows** <br><br> **Linux**. Possible values include: + * 'Windows', 'Linux'. + */ + @JsonProperty(value = "properties.osType") + private OperatingSystemTypes osType; + + /** + * The OS State. Possible values include: 'Generalized', 'Specialized'. + */ + @JsonProperty(value = "properties.osState") + private OperatingSystemStateTypes osState; + + /** + * The end of life of this gallery image. + */ + @JsonProperty(value = "properties.endOfLifeDate") + private LocalDate endOfLifeDate; + + /** + * The identifier property. + */ + @JsonProperty(value = "properties.identifier") + private GalleryImageIdentifier identifier; + + /** + * The recommended property. + */ + @JsonProperty(value = "properties.recommended") + private RecommendedMachineConfiguration recommended; + + /** + * The disallowed property. + */ + @JsonProperty(value = "properties.disallowed") + private Disallowed disallowed; + + /** + * The purchasePlan property. + */ + @JsonProperty(value = "properties.purchasePlan") + private ImagePurchasePlan purchasePlan; + + /** + * The current state of the gallery image. + * The provisioning state, which only appears in the response. Possible + * values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + * 'Deleting', 'Migrating'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description value. + * + * @param description the description value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the eula value. + * + * @return the eula value + */ + public String eula() { + return this.eula; + } + + /** + * Set the eula value. + * + * @param eula the eula value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withEula(String eula) { + this.eula = eula; + return this; + } + + /** + * Get the privacyStatementUri value. + * + * @return the privacyStatementUri value + */ + public String privacyStatementUri() { + return this.privacyStatementUri; + } + + /** + * Set the privacyStatementUri value. + * + * @param privacyStatementUri the privacyStatementUri value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withPrivacyStatementUri(String privacyStatementUri) { + this.privacyStatementUri = privacyStatementUri; + return this; + } + + /** + * Get the releaseNoteUri value. + * + * @return the releaseNoteUri value + */ + public String releaseNoteUri() { + return this.releaseNoteUri; + } + + /** + * Set the releaseNoteUri value. + * + * @param releaseNoteUri the releaseNoteUri value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withReleaseNoteUri(String releaseNoteUri) { + this.releaseNoteUri = releaseNoteUri; + return this; + } + + /** + * 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 GalleryImageInner object itself. + */ + public GalleryImageInner withOsType(OperatingSystemTypes osType) { + this.osType = osType; + return this; + } + + /** + * Get the osState value. + * + * @return the osState value + */ + public OperatingSystemStateTypes osState() { + return this.osState; + } + + /** + * Set the osState value. + * + * @param osState the osState value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withOsState(OperatingSystemStateTypes osState) { + this.osState = osState; + return this; + } + + /** + * Get the endOfLifeDate value. + * + * @return the endOfLifeDate value + */ + public LocalDate endOfLifeDate() { + return this.endOfLifeDate; + } + + /** + * Set the endOfLifeDate value. + * + * @param endOfLifeDate the endOfLifeDate value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withEndOfLifeDate(LocalDate endOfLifeDate) { + this.endOfLifeDate = endOfLifeDate; + return this; + } + + /** + * Get the identifier value. + * + * @return the identifier value + */ + public GalleryImageIdentifier identifier() { + return this.identifier; + } + + /** + * Set the identifier value. + * + * @param identifier the identifier value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withIdentifier(GalleryImageIdentifier identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get the recommended value. + * + * @return the recommended value + */ + public RecommendedMachineConfiguration recommended() { + return this.recommended; + } + + /** + * Set the recommended value. + * + * @param recommended the recommended value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withRecommended(RecommendedMachineConfiguration recommended) { + this.recommended = recommended; + return this; + } + + /** + * Get the disallowed value. + * + * @return the disallowed value + */ + public Disallowed disallowed() { + return this.disallowed; + } + + /** + * Set the disallowed value. + * + * @param disallowed the disallowed value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withDisallowed(Disallowed disallowed) { + this.disallowed = disallowed; + return this; + } + + /** + * Get the purchasePlan value. + * + * @return the purchasePlan value + */ + public ImagePurchasePlan purchasePlan() { + return this.purchasePlan; + } + + /** + * Set the purchasePlan value. + * + * @param purchasePlan the purchasePlan value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withPurchasePlan(ImagePurchasePlan purchasePlan) { + this.purchasePlan = purchasePlan; + 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/implementation/GalleryImageListInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageListInner.java new file mode 100644 index 00000000000..bc333c54257 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageListInner.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The List Gallery Images operation response. + */ +public class GalleryImageListInner { + /** + * A list of gallery images. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /** + * The uri to fetch the next page of gallery images. Call ListNext() with + * this to fetch the next page of gallery images. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value value. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the GalleryImageListInner object itself. + */ + public GalleryImageListInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink value. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink value. + * + * @param nextLink the nextLink value to set + * @return the GalleryImageListInner object itself. + */ + public GalleryImageListInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionInner.java new file mode 100644 index 00000000000..ec8f3d824a3 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionInner.java @@ -0,0 +1,120 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.GalleryImageVersionPublishingProfile; +import com.microsoft.azure.management.compute.GalleryImageVersionStorageProfile; +import com.microsoft.azure.management.compute.ReplicationStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Specifies information about the gallery image version that you want to + * create or update. + */ +@JsonFlatten +public class GalleryImageVersionInner extends Resource { + /** + * The publishingProfile property. + */ + @JsonProperty(value = "properties.publishingProfile") + private GalleryImageVersionPublishingProfile publishingProfile; + + /** + * The current state of the gallery image version. + * The provisioning state, which only appears in the response. Possible + * values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + * 'Deleting', 'Migrating'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * The storageProfile property. + */ + @JsonProperty(value = "properties.storageProfile") + private GalleryImageVersionStorageProfile storageProfile; + + /** + * The replicationStatus property. + */ + @JsonProperty(value = "properties.replicationStatus") + private ReplicationStatus replicationStatus; + + /** + * Get the publishingProfile value. + * + * @return the publishingProfile value + */ + public GalleryImageVersionPublishingProfile publishingProfile() { + return this.publishingProfile; + } + + /** + * Set the publishingProfile value. + * + * @param publishingProfile the publishingProfile value to set + * @return the GalleryImageVersionInner object itself. + */ + public GalleryImageVersionInner withPublishingProfile(GalleryImageVersionPublishingProfile publishingProfile) { + this.publishingProfile = publishingProfile; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the storageProfile value. + * + * @return the storageProfile value + */ + public GalleryImageVersionStorageProfile storageProfile() { + return this.storageProfile; + } + + /** + * Set the storageProfile value. + * + * @param storageProfile the storageProfile value to set + * @return the GalleryImageVersionInner object itself. + */ + public GalleryImageVersionInner withStorageProfile(GalleryImageVersionStorageProfile storageProfile) { + this.storageProfile = storageProfile; + return this; + } + + /** + * Get the replicationStatus value. + * + * @return the replicationStatus value + */ + public ReplicationStatus replicationStatus() { + return this.replicationStatus; + } + + /** + * Set the replicationStatus value. + * + * @param replicationStatus the replicationStatus value to set + * @return the GalleryImageVersionInner object itself. + */ + public GalleryImageVersionInner withReplicationStatus(ReplicationStatus replicationStatus) { + this.replicationStatus = replicationStatus; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionListInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionListInner.java new file mode 100644 index 00000000000..fe50ccb2c8f --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionListInner.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The List Gallery Image version operation response. + */ +public class GalleryImageVersionListInner { + /** + * A list of gallery image versions. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /** + * The uri to fetch the next page of gallery image versions. Call + * ListNext() with this to fetch the next page of gallery image versions. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value value. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the GalleryImageVersionListInner object itself. + */ + public GalleryImageVersionListInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink value. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink value. + * + * @param nextLink the nextLink value to set + * @return the GalleryImageVersionListInner object itself. + */ + public GalleryImageVersionListInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionsInner.java new file mode 100644 index 00000000000..54917d60910 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionsInner.java @@ -0,0 +1,906 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.compute.ReplicationStatusTypes; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in GalleryImageVersions. + */ +public class GalleryImageVersionsInner { + /** The Retrofit service to perform REST calls. */ + private GalleryImageVersionsService service; + /** The service client containing this operation class. */ + private ComputeManagementClientImpl client; + + /** + * Initializes an instance of GalleryImageVersionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public GalleryImageVersionsInner(Retrofit retrofit, ComputeManagementClientImpl client) { + this.service = retrofit.create(GalleryImageVersionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for GalleryImageVersions to be + * used by Retrofit to perform actually REST calls. + */ + interface GalleryImageVersionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImageVersions createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Path("galleryImageVersionName") String galleryImageVersionName, @Query("api-version") String apiVersion, @Body GalleryImageVersionInner galleryImageVersion, @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.GalleryImageVersions beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Path("galleryImageVersionName") String galleryImageVersionName, @Query("api-version") String apiVersion, @Body GalleryImageVersionInner galleryImageVersion, @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.GalleryImageVersions get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Path("galleryImageVersionName") String galleryImageVersionName, @Query("$expand") ReplicationStatusTypes expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImageVersions delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Path("galleryImageVersionName") String galleryImageVersionName, @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.GalleryImageVersions beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Path("galleryImageVersionName") String galleryImageVersionName, @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.GalleryImageVersions listGalleryImageVersionsByGalleryImage" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions") + Observable> listGalleryImageVersionsByGalleryImage(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @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.GalleryImageVersions listGalleryImageVersionsByGalleryImageNext" }) + @GET + Observable> listGalleryImageVersionsByGalleryImageNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryImageVersionInner object if successful. + */ + public GalleryImageVersionInner createOrUpdate(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, GalleryImageVersionInner galleryImageVersion) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion).toBlocking().last().body(); + } + + /** + * Create or update a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, GalleryImageVersionInner galleryImageVersion, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion), serviceCallback); + } + + /** + * Create or update a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, GalleryImageVersionInner galleryImageVersion) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion).map(new Func1, GalleryImageVersionInner>() { + @Override + public GalleryImageVersionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, GalleryImageVersionInner galleryImageVersion) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + if (galleryImageVersionName == null) { + throw new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null."); + } + if (galleryImageVersion == null) { + throw new IllegalArgumentException("Parameter galleryImageVersion is required and cannot be null."); + } + Validator.validate(galleryImageVersion); + final String apiVersion = "2018-06-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, apiVersion, galleryImageVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryImageVersionInner object if successful. + */ + public GalleryImageVersionInner beginCreateOrUpdate(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, GalleryImageVersionInner galleryImageVersion) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion).toBlocking().single().body(); + } + + /** + * Create or update a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, GalleryImageVersionInner galleryImageVersion, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion), serviceCallback); + } + + /** + * Create or update a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageVersionInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, GalleryImageVersionInner galleryImageVersion) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion).map(new Func1, GalleryImageVersionInner>() { + @Override + public GalleryImageVersionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageVersionInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, GalleryImageVersionInner galleryImageVersion) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + if (galleryImageVersionName == null) { + throw new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null."); + } + if (galleryImageVersion == null) { + throw new IllegalArgumentException("Parameter galleryImageVersion is required and cannot be null."); + } + Validator.validate(galleryImageVersion); + final String apiVersion = "2018-06-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, apiVersion, galleryImageVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves information about a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryImageVersionInner object if successful. + */ + public GalleryImageVersionInner get(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + return getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName).toBlocking().single().body(); + } + + /** + * Retrieves information about a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName), serviceCallback); + } + + /** + * Retrieves information about a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageVersionInner object + */ + public Observable getAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + return getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName).map(new Func1, GalleryImageVersionInner>() { + @Override + public GalleryImageVersionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves information about a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageVersionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + if (galleryImageVersionName == null) { + throw new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + final ReplicationStatusTypes expand = null; + return service.get(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves information about a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param expand The expand expression to apply on the operation. Possible values include: 'ReplicationStatus' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryImageVersionInner object if successful. + */ + public GalleryImageVersionInner get(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, ReplicationStatusTypes expand) { + return getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, expand).toBlocking().single().body(); + } + + /** + * Retrieves information about a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param expand The expand expression to apply on the operation. Possible values include: 'ReplicationStatus' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, ReplicationStatusTypes expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, expand), serviceCallback); + } + + /** + * Retrieves information about a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param expand The expand expression to apply on the operation. Possible values include: 'ReplicationStatus' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageVersionInner object + */ + public Observable getAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, ReplicationStatusTypes expand) { + return getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, expand).map(new Func1, GalleryImageVersionInner>() { + @Override + public GalleryImageVersionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves information about a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param expand The expand expression to apply on the operation. Possible values include: 'ReplicationStatus' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageVersionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, ReplicationStatusTypes expand) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + if (galleryImageVersionName == null) { + throw new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.get(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner delete(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + return deleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName).toBlocking().last().body(); + } + + /** + * Delete a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName), serviceCallback); + } + + /** + * Delete a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + return deleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + if (galleryImageVersionName == null) { + throw new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginDelete(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName).toBlocking().single().body(); + } + + /** + * Delete a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName), serviceCallback); + } + + /** + * Delete a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginDeleteAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + if (galleryImageVersionName == null) { + throw new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List gallery image versions under a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GalleryImageVersionInner> object if successful. + */ + public PagedList listGalleryImageVersionsByGalleryImage(final String resourceGroupName, final String galleryName, final String galleryImageName) { + ServiceResponse> response = listGalleryImageVersionsByGalleryImageSinglePageAsync(resourceGroupName, galleryName, galleryImageName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGalleryImageVersionsByGalleryImageNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List gallery image versions under a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listGalleryImageVersionsByGalleryImageAsync(final String resourceGroupName, final String galleryName, final String galleryImageName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGalleryImageVersionsByGalleryImageSinglePageAsync(resourceGroupName, galleryName, galleryImageName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGalleryImageVersionsByGalleryImageNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List gallery image versions under a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryImageVersionInner> object + */ + public Observable> listGalleryImageVersionsByGalleryImageAsync(final String resourceGroupName, final String galleryName, final String galleryImageName) { + return listGalleryImageVersionsByGalleryImageWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List gallery image versions under a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryImageVersionInner> object + */ + public Observable>> listGalleryImageVersionsByGalleryImageWithServiceResponseAsync(final String resourceGroupName, final String galleryName, final String galleryImageName) { + return listGalleryImageVersionsByGalleryImageSinglePageAsync(resourceGroupName, galleryName, galleryImageName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listGalleryImageVersionsByGalleryImageNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List gallery image versions under a gallery image. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param galleryName The name of the gallery. + ServiceResponse> * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GalleryImageVersionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGalleryImageVersionsByGalleryImageSinglePageAsync(final String resourceGroupName, final String galleryName, final String galleryImageName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.listGalleryImageVersionsByGalleryImage(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGalleryImageVersionsByGalleryImageDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGalleryImageVersionsByGalleryImageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List gallery image versions under a gallery image. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GalleryImageVersionInner> object if successful. + */ + public PagedList listGalleryImageVersionsByGalleryImageNext(final String nextPageLink) { + ServiceResponse> response = listGalleryImageVersionsByGalleryImageNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGalleryImageVersionsByGalleryImageNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List gallery image versions under a gallery image. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listGalleryImageVersionsByGalleryImageNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGalleryImageVersionsByGalleryImageNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGalleryImageVersionsByGalleryImageNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List gallery image versions under a gallery image. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryImageVersionInner> object + */ + public Observable> listGalleryImageVersionsByGalleryImageNextAsync(final String nextPageLink) { + return listGalleryImageVersionsByGalleryImageNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List gallery image versions under a gallery image. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryImageVersionInner> object + */ + public Observable>> listGalleryImageVersionsByGalleryImageNextWithServiceResponseAsync(final String nextPageLink) { + return listGalleryImageVersionsByGalleryImageNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listGalleryImageVersionsByGalleryImageNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List gallery image versions under a gallery image. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GalleryImageVersionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGalleryImageVersionsByGalleryImageNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listGalleryImageVersionsByGalleryImageNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGalleryImageVersionsByGalleryImageNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGalleryImageVersionsByGalleryImageNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImagesInner.java new file mode 100644 index 00000000000..3215171dd98 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImagesInner.java @@ -0,0 +1,766 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in GalleryImages. + */ +public class GalleryImagesInner { + /** The Retrofit service to perform REST calls. */ + private GalleryImagesService service; + /** The service client containing this operation class. */ + private ComputeManagementClientImpl client; + + /** + * Initializes an instance of GalleryImagesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public GalleryImagesInner(Retrofit retrofit, ComputeManagementClientImpl client) { + this.service = retrofit.create(GalleryImagesService.class); + this.client = client; + } + + /** + * The interface defining all the services for GalleryImages to be + * used by Retrofit to perform actually REST calls. + */ + interface GalleryImagesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImages createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Query("api-version") String apiVersion, @Body GalleryImageInner galleryImage, @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.GalleryImages beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Query("api-version") String apiVersion, @Body GalleryImageInner galleryImage, @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.GalleryImages get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @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.GalleryImages delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @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.GalleryImages beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @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.GalleryImages listGalleryImagesByGallery" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images") + Observable> listGalleryImagesByGallery(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @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.GalleryImages listGalleryImagesByGalleryNext" }) + @GET + Observable> listGalleryImagesByGalleryNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryImageInner object if successful. + */ + public GalleryImageInner createOrUpdate(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).toBlocking().last().body(); + } + + /** + * Create or update a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage), serviceCallback); + } + + /** + * Create or update a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).map(new Func1, GalleryImageInner>() { + @Override + public GalleryImageInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + if (galleryImage == null) { + throw new IllegalArgumentException("Parameter galleryImage is required and cannot be null."); + } + Validator.validate(galleryImage); + final String apiVersion = "2018-06-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, galleryImage, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryImageInner object if successful. + */ + public GalleryImageInner beginCreateOrUpdate(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).toBlocking().single().body(); + } + + /** + * Create or update a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage), serviceCallback); + } + + /** + * Create or update a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).map(new Func1, GalleryImageInner>() { + @Override + public GalleryImageInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + if (galleryImage == null) { + throw new IllegalArgumentException("Parameter galleryImage is required and cannot be null."); + } + Validator.validate(galleryImage); + final String apiVersion = "2018-06-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, galleryImage, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves information about a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryImageInner object if successful. + */ + public GalleryImageInner get(String resourceGroupName, String galleryName, String galleryImageName) { + return getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).toBlocking().single().body(); + } + + /** + * Retrieves information about a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String galleryName, String galleryImageName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName), serviceCallback); + } + + /** + * Retrieves information about a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageInner object + */ + public Observable getAsync(String resourceGroupName, String galleryName, String galleryImageName) { + return getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).map(new Func1, GalleryImageInner>() { + @Override + public GalleryImageInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves information about a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.get(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner delete(String resourceGroupName, String galleryName, String galleryImageName) { + return deleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).toBlocking().last().body(); + } + + /** + * Delete a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String galleryName, String galleryImageName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName), serviceCallback); + } + + /** + * Delete a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String galleryName, String galleryImageName) { + return deleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginDelete(String resourceGroupName, String galleryName, String galleryImageName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).toBlocking().single().body(); + } + + /** + * Delete a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String galleryName, String galleryImageName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName), serviceCallback); + } + + /** + * Delete a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginDeleteAsync(String resourceGroupName, String galleryName, String galleryImageName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List gallery images under a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GalleryImageInner> object if successful. + */ + public PagedList listGalleryImagesByGallery(final String resourceGroupName, final String galleryName) { + ServiceResponse> response = listGalleryImagesByGallerySinglePageAsync(resourceGroupName, galleryName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGalleryImagesByGalleryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List gallery images under a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listGalleryImagesByGalleryAsync(final String resourceGroupName, final String galleryName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGalleryImagesByGallerySinglePageAsync(resourceGroupName, galleryName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGalleryImagesByGalleryNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List gallery images under a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryImageInner> object + */ + public Observable> listGalleryImagesByGalleryAsync(final String resourceGroupName, final String galleryName) { + return listGalleryImagesByGalleryWithServiceResponseAsync(resourceGroupName, galleryName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List gallery images under a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryImageInner> object + */ + public Observable>> listGalleryImagesByGalleryWithServiceResponseAsync(final String resourceGroupName, final String galleryName) { + return listGalleryImagesByGallerySinglePageAsync(resourceGroupName, galleryName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listGalleryImagesByGalleryNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List gallery images under a gallery. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GalleryImageInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGalleryImagesByGallerySinglePageAsync(final String resourceGroupName, final String galleryName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.listGalleryImagesByGallery(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGalleryImagesByGalleryDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGalleryImagesByGalleryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List gallery images under a gallery. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GalleryImageInner> object if successful. + */ + public PagedList listGalleryImagesByGalleryNext(final String nextPageLink) { + ServiceResponse> response = listGalleryImagesByGalleryNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGalleryImagesByGalleryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List gallery images under a gallery. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listGalleryImagesByGalleryNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGalleryImagesByGalleryNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGalleryImagesByGalleryNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List gallery images under a gallery. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryImageInner> object + */ + public Observable> listGalleryImagesByGalleryNextAsync(final String nextPageLink) { + return listGalleryImagesByGalleryNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List gallery images under a gallery. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryImageInner> object + */ + public Observable>> listGalleryImagesByGalleryNextWithServiceResponseAsync(final String nextPageLink) { + return listGalleryImagesByGalleryNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listGalleryImagesByGalleryNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List gallery images under a gallery. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GalleryImageInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGalleryImagesByGalleryNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listGalleryImagesByGalleryNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGalleryImagesByGalleryNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGalleryImagesByGalleryNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryInner.java new file mode 100644 index 00000000000..5f8447b3066 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryInner.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.GalleryIdentifier; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Specifies information about the gallery that you want to create or update. + */ +@JsonFlatten +public class GalleryInner extends Resource { + /** + * The description of this gallery resource. + */ + @JsonProperty(value = "properties.description") + private String description; + + /** + * The identifier property. + */ + @JsonProperty(value = "properties.identifier") + private GalleryIdentifier identifier; + + /** + * The current state of the gallery. + * The provisioning state, which only appears in the response. Possible + * values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + * 'Deleting', 'Migrating'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description value. + * + * @param description the description value to set + * @return the GalleryInner object itself. + */ + public GalleryInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the identifier value. + * + * @return the identifier value + */ + public GalleryIdentifier identifier() { + return this.identifier; + } + + /** + * Set the identifier value. + * + * @param identifier the identifier value to set + * @return the GalleryInner object itself. + */ + public GalleryInner withIdentifier(GalleryIdentifier identifier) { + this.identifier = identifier; + 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/implementation/GallerysInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GallerysInner.java new file mode 100644 index 00000000000..1a202640638 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GallerysInner.java @@ -0,0 +1,661 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Gallerys. + */ +public class GallerysInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private GallerysService service; + /** The service client containing this operation class. */ + private ComputeManagementClientImpl client; + + /** + * Initializes an instance of GallerysInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public GallerysInner(Retrofit retrofit, ComputeManagementClientImpl client) { + this.service = retrofit.create(GallerysService.class); + this.client = client; + } + + /** + * The interface defining all the services for Gallerys to be + * used by Retrofit to perform actually REST calls. + */ + interface GallerysService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Gallerys createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Query("api-version") String apiVersion, @Body GalleryInner parameters, @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.Gallerys beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Query("api-version") String apiVersion, @Body GalleryInner parameters, @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.Gallerys getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @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.Gallerys delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @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.Gallerys beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @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.Gallerys listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @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.Gallerys list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param parameters Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryInner object if successful. + */ + public GalleryInner createOrUpdate(String resourceGroupName, String galleryName, GalleryInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, parameters).toBlocking().last().body(); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param parameters Parameters supplied to the create or update gallery operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, parameters), serviceCallback); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param parameters Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, parameters).map(new Func1, GalleryInner>() { + @Override + public GalleryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param parameters Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, GalleryInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-06-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param parameters Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryInner object if successful. + */ + public GalleryInner beginCreateOrUpdate(String resourceGroupName, String galleryName, GalleryInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, parameters).toBlocking().single().body(); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param parameters Parameters supplied to the create or update gallery operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, parameters), serviceCallback); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param parameters Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, parameters).map(new Func1, GalleryInner>() { + @Override + public GalleryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param parameters Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, GalleryInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-06-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves information about a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryInner object if successful. + */ + public GalleryInner getByResourceGroup(String resourceGroupName, String galleryName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, galleryName).toBlocking().single().body(); + } + + /** + * Retrieves information about a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String galleryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, galleryName), serviceCallback); + } + + /** + * Retrieves information about a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String galleryName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, galleryName).map(new Func1, GalleryInner>() { + @Override + public GalleryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves information about a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String galleryName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String galleryName) { + deleteWithServiceResponseAsync(resourceGroupName, galleryName).toBlocking().last().body(); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String galleryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, galleryName), serviceCallback); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String galleryName) { + return deleteWithServiceResponseAsync(resourceGroupName, galleryName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String galleryName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String galleryName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName).toBlocking().single().body(); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String galleryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName), serviceCallback); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String galleryName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String galleryName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List galleries under a resource group. + * + * @param resourceGroupName The name of the resource group. + * @return the PagedList object if successful. + */ + public PagedList listByResourceGroup(String resourceGroupName) { + PageImpl page = new PageImpl<>(); + page.setItems(listByResourceGroupWithServiceResponseAsync(resourceGroupName).toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * List galleries under a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(String resourceGroupName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByResourceGroupWithServiceResponseAsync(resourceGroupName), serviceCallback); + } + + /** + * List galleries under a resource group. + * + * @param resourceGroupName The name of the resource group. + * @return the observable to the List<GalleryInner> object + */ + public Observable> listByResourceGroupAsync(String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl page = new PageImpl<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * List galleries under a resource group. + * + * @param resourceGroupName The name of the resource group. + * @return the observable to the List<GalleryInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(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); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List galleries under a subscription. + * + * @return the PagedList object if successful. + */ + public PagedList list() { + PageImpl page = new PageImpl<>(); + page.setItems(listWithServiceResponseAsync().toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * List galleries under a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * List galleries under a subscription. + * + * @return the observable to the List<GalleryInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl page = new PageImpl<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * List galleries under a subscription. + * + * @return the observable to the List<GalleryInner> object + */ + public Observable>> listWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(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); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} From 8d2121d5cf7c8beb793c01305ce1d7fbcdc1903c Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 31 May 2018 08:52:43 -0700 Subject: [PATCH 15/15] Generated from 4abedb1c096796557fdd029401f3d317f99c7f61 (#210) removing resourceUpdate, adding contents to disk and snapshot --- .../compute/AdditionalUnattendContent.java | 16 ++--- .../compute/ApiEntityReference.java | 4 +- .../azure/management/compute/ApiError.java | 20 +++--- .../management/compute/ApiErrorBase.java | 12 ++-- .../compute/AutoOSUpgradePolicy.java | 4 +- .../compute/AvailabilitySetUpdate.java | 18 ++--- .../management/compute/BootDiagnostics.java | 8 +-- .../compute/BootDiagnosticsInstanceView.java | 8 +-- .../ContainerServiceAgentPoolProfile.java | 18 ++--- .../ContainerServiceCustomProfile.java | 4 +- .../ContainerServiceDiagnosticsProfile.java | 4 +- .../compute/ContainerServiceLinuxProfile.java | 8 +-- .../ContainerServiceMasterProfile.java | 10 +-- .../ContainerServiceOrchestratorProfile.java | 4 +- ...ntainerServiceServicePrincipalProfile.java | 8 +-- .../ContainerServiceSshConfiguration.java | 4 +- .../compute/ContainerServiceSshPublicKey.java | 4 +- .../ContainerServiceVMDiagnostics.java | 6 +- .../ContainerServiceWindowsProfile.java | 8 +-- .../management/compute/CreationData.java | 20 +++--- .../azure/management/compute/DataDisk.java | 36 +++++----- .../management/compute/DataDiskImage.java | 2 +- .../compute/DiagnosticsProfile.java | 4 +- .../compute/DiskEncryptionSettings.java | 12 ++-- .../management/compute/DiskInstanceView.java | 12 ++-- .../azure/management/compute/DiskSku.java | 6 +- .../azure/management/compute/DiskUpdate.java | 67 +++++++++++++++++-- .../compute/EncryptionSettings.java | 12 ++-- .../management/compute/GrantAccessData.java | 8 +-- .../management/compute/HardwareProfile.java | 4 +- .../management/compute/ImageDataDisk.java | 28 ++++---- .../compute/ImageDiskReference.java | 8 +-- .../azure/management/compute/ImageOSDisk.java | 32 ++++----- .../compute/ImageStorageProfile.java | 12 ++-- .../azure/management/compute/ImageUpdate.java | 10 +-- .../azure/management/compute/InnerError.java | 8 +-- .../compute/KeyVaultAndKeyReference.java | 8 +-- .../compute/KeyVaultAndSecretReference.java | 8 +-- .../compute/KeyVaultKeyReference.java | 8 +-- .../compute/KeyVaultSecretReference.java | 8 +-- .../compute/LinuxConfiguration.java | 8 +-- .../compute/LogAnalyticsInputBase.java | 24 +++---- .../compute/LogAnalyticsOutput.java | 2 +- .../compute/MaintenanceRedeployStatus.java | 28 ++++---- .../management/compute/NetworkProfile.java | 4 +- .../azure/management/compute/OSDisk.java | 40 +++++------ .../azure/management/compute/OSDiskImage.java | 4 +- .../azure/management/compute/OSProfile.java | 28 ++++---- .../azure/management/compute/Plan.java | 16 ++--- .../management/compute/PurchasePlan.java | 12 ++-- .../compute/RequestRateByIntervalInput.java | 4 +- .../compute/ResourceSkuCapabilities.java | 4 +- .../compute/ResourceSkuCapacity.java | 8 +-- .../management/compute/ResourceSkuCosts.java | 6 +- .../compute/ResourceSkuLocationInfo.java | 4 +- .../compute/ResourceSkuRestrictionInfo.java | 4 +- .../compute/ResourceSkuRestrictions.java | 8 +-- .../compute/RollbackStatusInfo.java | 6 +- .../compute/RollingUpgradePolicy.java | 16 ++--- .../compute/RollingUpgradeProgressInfo.java | 8 +-- .../compute/RollingUpgradeRunningStatus.java | 8 +-- .../management/compute/RunCommandInput.java | 12 ++-- .../compute/RunCommandInputParameter.java | 8 +-- .../RunCommandParameterDefinition.java | 16 ++--- .../management/compute/RunCommandResult.java | 4 +- .../azure/management/compute/Sku.java | 12 ++-- .../azure/management/compute/SnapshotSku.java | 6 +- .../management/compute/SnapshotUpdate.java | 67 +++++++++++++++++-- .../azure/management/compute/SourceVault.java | 4 +- .../management/compute/SshConfiguration.java | 4 +- .../management/compute/SshPublicKey.java | 8 +-- .../management/compute/StorageProfile.java | 12 ++-- .../compute/SubResourceReadOnly.java | 2 +- .../management/compute/UpdateResource.java | 4 +- ...erationHistoricalStatusInfoProperties.java | 12 ++-- .../UpgradeOperationHistoryStatus.java | 6 +- .../management/compute/UpgradePolicy.java | 16 ++--- .../azure/management/compute/UsageName.java | 8 +-- .../management/compute/VaultCertificate.java | 8 +-- .../management/compute/VaultSecretGroup.java | 8 +-- .../management/compute/VirtualHardDisk.java | 4 +- .../VirtualMachineAgentInstanceView.java | 12 ++-- .../VirtualMachineCaptureParameters.java | 12 ++-- ...alMachineExtensionHandlerInstanceView.java | 12 ++-- .../VirtualMachineExtensionInstanceView.java | 20 +++--- .../VirtualMachineExtensionUpdate.java | 28 ++++---- .../compute/VirtualMachineHealthStatus.java | 2 +- .../compute/VirtualMachineIdentity.java | 12 ++-- .../VirtualMachineScaleSetDataDisk.java | 28 ++++---- ...irtualMachineScaleSetExtensionProfile.java | 4 +- .../VirtualMachineScaleSetIdentity.java | 12 ++-- ...neScaleSetInstanceViewStatusesSummary.java | 2 +- ...lMachineScaleSetManagedDiskParameters.java | 4 +- ...aleSetNetworkConfigurationDnsSettings.java | 4 +- .../VirtualMachineScaleSetNetworkProfile.java | 8 +-- .../compute/VirtualMachineScaleSetOSDisk.java | 32 ++++----- .../VirtualMachineScaleSetOSProfile.java | 28 ++++---- ...eScaleSetPublicIPAddressConfiguration.java | 12 ++-- ...blicIPAddressConfigurationDnsSettings.java | 4 +- .../VirtualMachineScaleSetSkuCapacity.java | 8 +-- .../VirtualMachineScaleSetStorageProfile.java | 12 ++-- .../compute/VirtualMachineScaleSetUpdate.java | 28 ++++---- ...alMachineScaleSetUpdateNetworkProfile.java | 4 +- .../VirtualMachineScaleSetUpdateOSDisk.java | 20 +++--- ...VirtualMachineScaleSetUpdateOSProfile.java | 16 ++--- ...SetUpdatePublicIPAddressConfiguration.java | 12 ++-- ...alMachineScaleSetUpdateStorageProfile.java | 12 ++-- ...VirtualMachineScaleSetUpdateVMProfile.java | 24 +++---- ...ualMachineScaleSetVMExtensionsSummary.java | 4 +- .../VirtualMachineScaleSetVMInstanceIDs.java | 4 +- ...lMachineScaleSetVMInstanceRequiredIDs.java | 4 +- .../VirtualMachineScaleSetVMProfile.java | 32 ++++----- .../VirtualMachineStatusCodeCount.java | 4 +- .../compute/VirtualMachineUpdate.java | 46 ++++++------- .../compute/WinRMConfiguration.java | 4 +- .../management/compute/WinRMListener.java | 8 +-- .../compute/WindowsConfiguration.java | 20 +++--- .../implementation/AccessUriInner.java | 2 +- .../implementation/AvailabilitySetInner.java | 18 ++--- .../ComputeOperationValueInner.java | 12 ++-- .../implementation/ContainerServiceInner.java | 34 +++++----- .../compute/implementation/DiskInner.java | 26 +++---- .../compute/implementation/ImageInner.java | 10 +-- .../implementation/ImageReferenceInner.java | 16 ++--- .../InstanceViewStatusInner.java | 20 +++--- .../LogAnalyticsOperationResultInner.java | 2 +- .../ManagedDiskParametersInner.java | 4 +- .../NetworkInterfaceReferenceInner.java | 4 +- .../RecoveryWalkResponseInner.java | 4 +- .../implementation/ResourceSkuInner.java | 26 +++---- .../RollingUpgradeStatusInfoInner.java | 8 +-- .../RunCommandDocumentBaseInner.java | 20 +++--- .../RunCommandDocumentInner.java | 8 +-- .../compute/implementation/SnapshotInner.java | 22 +++--- ...adeOperationHistoricalStatusInfoInner.java | 6 +- .../compute/implementation/UsageInner.java | 19 +++--- .../VirtualMachineCaptureResultInner.java | 8 +-- .../VirtualMachineExtensionImageInner.java | 20 +++--- .../VirtualMachineExtensionInner.java | 34 +++++----- ...rtualMachineExtensionsListResultInner.java | 4 +- .../VirtualMachineImageResourceInner.java | 12 ++-- .../implementation/VirtualMachineInner.java | 48 ++++++------- .../VirtualMachineInstanceViewInner.java | 48 ++++++------- .../VirtualMachineScaleSetExtensionInner.java | 34 +++++----- ...alMachineScaleSetIPConfigurationInner.java | 32 ++++----- .../VirtualMachineScaleSetInner.java | 44 ++++++------ ...rtualMachineScaleSetInstanceViewInner.java | 8 +-- ...hineScaleSetNetworkConfigurationInner.java | 28 ++++---- .../VirtualMachineScaleSetSkuInner.java | 6 +- ...ineScaleSetUpdateIPConfigurationInner.java | 32 ++++----- ...aleSetUpdateNetworkConfigurationInner.java | 28 ++++---- .../VirtualMachineScaleSetVMInner.java | 46 ++++++------- ...ualMachineScaleSetVMInstanceViewInner.java | 42 ++++++------ .../VirtualMachineSizeInner.java | 24 +++---- 154 files changed, 1155 insertions(+), 1046 deletions(-) diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AdditionalUnattendContent.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AdditionalUnattendContent.java index dbbc84f0a5f..0f6476f6245 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AdditionalUnattendContent.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AdditionalUnattendContent.java @@ -49,7 +49,7 @@ public class AdditionalUnattendContent { private String content; /** - * Get the passName value. + * Get the pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'OobeSystem'. * * @return the passName value */ @@ -58,7 +58,7 @@ public PassNames passName() { } /** - * Set the passName value. + * Set the pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'OobeSystem'. * * @param passName the passName value to set * @return the AdditionalUnattendContent object itself. @@ -69,7 +69,7 @@ public AdditionalUnattendContent withPassName(PassNames passName) { } /** - * Get the componentName value. + * Get the component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'Microsoft-Windows-Shell-Setup'. * * @return the componentName value */ @@ -78,7 +78,7 @@ public ComponentNames componentName() { } /** - * Set the componentName value. + * Set the component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'Microsoft-Windows-Shell-Setup'. * * @param componentName the componentName value to set * @return the AdditionalUnattendContent object itself. @@ -89,7 +89,7 @@ public AdditionalUnattendContent withComponentName(ComponentNames componentName) } /** - * Get the settingName value. + * Get specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: 'AutoLogon', 'FirstLogonCommands'. * * @return the settingName value */ @@ -98,7 +98,7 @@ public SettingNames settingName() { } /** - * Set the settingName value. + * Set specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: 'AutoLogon', 'FirstLogonCommands'. * * @param settingName the settingName value to set * @return the AdditionalUnattendContent object itself. @@ -109,7 +109,7 @@ public AdditionalUnattendContent withSettingName(SettingNames settingName) { } /** - * Get the content value. + * Get specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted. * * @return the content value */ @@ -118,7 +118,7 @@ public String content() { } /** - * Set the content value. + * Set specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted. * * @param content the content value to set * @return the AdditionalUnattendContent object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiEntityReference.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiEntityReference.java index 7a6af6b2503..d7581221f61 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiEntityReference.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiEntityReference.java @@ -22,7 +22,7 @@ public class ApiEntityReference { private String id; /** - * Get the id value. + * Get the ARM resource id in the form of /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/... * * @return the id value */ @@ -31,7 +31,7 @@ public String id() { } /** - * Set the id value. + * Set the ARM resource id in the form of /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/... * * @param id the id value to set * @return the ApiEntityReference object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiError.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiError.java index 82e3f36b349..12ad6bc97db 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiError.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiError.java @@ -46,7 +46,7 @@ public class ApiError { private String message; /** - * Get the details value. + * Get the Api error details. * * @return the details value */ @@ -55,7 +55,7 @@ public List details() { } /** - * Set the details value. + * Set the Api error details. * * @param details the details value to set * @return the ApiError object itself. @@ -66,7 +66,7 @@ public ApiError withDetails(List details) { } /** - * Get the innererror value. + * Get the Api inner error. * * @return the innererror value */ @@ -75,7 +75,7 @@ public InnerError innererror() { } /** - * Set the innererror value. + * Set the Api inner error. * * @param innererror the innererror value to set * @return the ApiError object itself. @@ -86,7 +86,7 @@ public ApiError withInnererror(InnerError innererror) { } /** - * Get the code value. + * Get the error code. * * @return the code value */ @@ -95,7 +95,7 @@ public String code() { } /** - * Set the code value. + * Set the error code. * * @param code the code value to set * @return the ApiError object itself. @@ -106,7 +106,7 @@ public ApiError withCode(String code) { } /** - * Get the target value. + * Get the target of the particular error. * * @return the target value */ @@ -115,7 +115,7 @@ public String target() { } /** - * Set the target value. + * Set the target of the particular error. * * @param target the target value to set * @return the ApiError object itself. @@ -126,7 +126,7 @@ public ApiError withTarget(String target) { } /** - * Get the message value. + * Get the error message. * * @return the message value */ @@ -135,7 +135,7 @@ public String message() { } /** - * Set the message value. + * Set the error message. * * @param message the message value to set * @return the ApiError object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiErrorBase.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiErrorBase.java index f520179483a..73254f94935 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiErrorBase.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiErrorBase.java @@ -33,7 +33,7 @@ public class ApiErrorBase { private String message; /** - * Get the code value. + * Get the error code. * * @return the code value */ @@ -42,7 +42,7 @@ public String code() { } /** - * Set the code value. + * Set the error code. * * @param code the code value to set * @return the ApiErrorBase object itself. @@ -53,7 +53,7 @@ public ApiErrorBase withCode(String code) { } /** - * Get the target value. + * Get the target of the particular error. * * @return the target value */ @@ -62,7 +62,7 @@ public String target() { } /** - * Set the target value. + * Set the target of the particular error. * * @param target the target value to set * @return the ApiErrorBase object itself. @@ -73,7 +73,7 @@ public ApiErrorBase withTarget(String target) { } /** - * Get the message value. + * Get the error message. * * @return the message value */ @@ -82,7 +82,7 @@ public String message() { } /** - * Set the message value. + * Set the error message. * * @param message the message value to set * @return the ApiErrorBase object itself. 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 index 743fc374447..0c36c172fec 100644 --- 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 @@ -22,7 +22,7 @@ public class AutoOSUpgradePolicy { private Boolean disableAutoRollback; /** - * Get the disableAutoRollback value. + * Get whether OS image rollback feature should be disabled. Default value is false. * * @return the disableAutoRollback value */ @@ -31,7 +31,7 @@ public Boolean disableAutoRollback() { } /** - * Set the disableAutoRollback value. + * Set whether OS image rollback feature should be disabled. Default value is false. * * @param disableAutoRollback the disableAutoRollback value to set * @return the AutoOSUpgradePolicy object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java index b4af193fcfa..e35f5da6f36 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java @@ -51,7 +51,7 @@ public class AvailabilitySetUpdate extends UpdateResource { private Sku sku; /** - * Get the platformUpdateDomainCount value. + * Get update Domain count. * * @return the platformUpdateDomainCount value */ @@ -60,7 +60,7 @@ public Integer platformUpdateDomainCount() { } /** - * Set the platformUpdateDomainCount value. + * Set update Domain count. * * @param platformUpdateDomainCount the platformUpdateDomainCount value to set * @return the AvailabilitySetUpdate object itself. @@ -71,7 +71,7 @@ public AvailabilitySetUpdate withPlatformUpdateDomainCount(Integer platformUpdat } /** - * Get the platformFaultDomainCount value. + * Get fault Domain count. * * @return the platformFaultDomainCount value */ @@ -80,7 +80,7 @@ public Integer platformFaultDomainCount() { } /** - * Set the platformFaultDomainCount value. + * Set fault Domain count. * * @param platformFaultDomainCount the platformFaultDomainCount value to set * @return the AvailabilitySetUpdate object itself. @@ -91,7 +91,7 @@ public AvailabilitySetUpdate withPlatformFaultDomainCount(Integer platformFaultD } /** - * Get the virtualMachines value. + * Get a list of references to all virtual machines in the availability set. * * @return the virtualMachines value */ @@ -100,7 +100,7 @@ public List virtualMachines() { } /** - * Set the virtualMachines value. + * Set a list of references to all virtual machines in the availability set. * * @param virtualMachines the virtualMachines value to set * @return the AvailabilitySetUpdate object itself. @@ -111,7 +111,7 @@ public AvailabilitySetUpdate withVirtualMachines(List virtualMachin } /** - * Get the statuses value. + * Get the resource status information. * * @return the statuses value */ @@ -120,7 +120,7 @@ public List statuses() { } /** - * Get the sku value. + * Get sku of the availability set. * * @return the sku value */ @@ -129,7 +129,7 @@ public Sku sku() { } /** - * Set the sku value. + * Set sku of the availability set. * * @param sku the sku value to set * @return the AvailabilitySetUpdate object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/BootDiagnostics.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/BootDiagnostics.java index 4d3e342dc44..95d7748f131 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/BootDiagnostics.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/BootDiagnostics.java @@ -32,7 +32,7 @@ public class BootDiagnostics { private String storageUri; /** - * Get the enabled value. + * Get whether boot diagnostics should be enabled on the Virtual Machine. * * @return the enabled value */ @@ -41,7 +41,7 @@ public Boolean enabled() { } /** - * Set the enabled value. + * Set whether boot diagnostics should be enabled on the Virtual Machine. * * @param enabled the enabled value to set * @return the BootDiagnostics object itself. @@ -52,7 +52,7 @@ public BootDiagnostics withEnabled(Boolean enabled) { } /** - * Get the storageUri value. + * Get uri of the storage account to use for placing the console output and screenshot. * * @return the storageUri value */ @@ -61,7 +61,7 @@ public String storageUri() { } /** - * Set the storageUri value. + * Set uri of the storage account to use for placing the console output and screenshot. * * @param storageUri the storageUri value to set * @return the BootDiagnostics object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/BootDiagnosticsInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/BootDiagnosticsInstanceView.java index 12b4a8832d1..fa33fe4a610 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/BootDiagnosticsInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/BootDiagnosticsInstanceView.java @@ -27,7 +27,7 @@ public class BootDiagnosticsInstanceView { private String serialConsoleLogBlobUri; /** - * Get the consoleScreenshotBlobUri value. + * Get the console screenshot blob URI. * * @return the consoleScreenshotBlobUri value */ @@ -36,7 +36,7 @@ public String consoleScreenshotBlobUri() { } /** - * Set the consoleScreenshotBlobUri value. + * Set the console screenshot blob URI. * * @param consoleScreenshotBlobUri the consoleScreenshotBlobUri value to set * @return the BootDiagnosticsInstanceView object itself. @@ -47,7 +47,7 @@ public BootDiagnosticsInstanceView withConsoleScreenshotBlobUri(String consoleSc } /** - * Get the serialConsoleLogBlobUri value. + * Get the Linux serial console log blob Uri. * * @return the serialConsoleLogBlobUri value */ @@ -56,7 +56,7 @@ public String serialConsoleLogBlobUri() { } /** - * Set the serialConsoleLogBlobUri value. + * Set the Linux serial console log blob Uri. * * @param serialConsoleLogBlobUri the serialConsoleLogBlobUri value to set * @return the BootDiagnosticsInstanceView object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceAgentPoolProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceAgentPoolProfile.java index 3ed5dcb12d2..3fd253ab495 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceAgentPoolProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceAgentPoolProfile.java @@ -59,7 +59,7 @@ public class ContainerServiceAgentPoolProfile { private String fqdn; /** - * Get the name value. + * Get unique name of the agent pool profile in the context of the subscription and resource group. * * @return the name value */ @@ -68,7 +68,7 @@ public String name() { } /** - * Set the name value. + * Set unique name of the agent pool profile in the context of the subscription and resource group. * * @param name the name value to set * @return the ContainerServiceAgentPoolProfile object itself. @@ -79,7 +79,7 @@ public ContainerServiceAgentPoolProfile withName(String name) { } /** - * Get the count value. + * Get number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. * * @return the count value */ @@ -88,7 +88,7 @@ public int count() { } /** - * Set the count value. + * Set number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. * * @param count the count value to set * @return the ContainerServiceAgentPoolProfile object itself. @@ -99,7 +99,7 @@ public ContainerServiceAgentPoolProfile withCount(int count) { } /** - * Get the vmSize value. + * Get size of agent VMs. Possible values include: 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5'. * * @return the vmSize value */ @@ -108,7 +108,7 @@ public ContainerServiceVMSizeTypes vmSize() { } /** - * Set the vmSize value. + * Set size of agent VMs. Possible values include: 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5'. * * @param vmSize the vmSize value to set * @return the ContainerServiceAgentPoolProfile object itself. @@ -119,7 +119,7 @@ public ContainerServiceAgentPoolProfile withVmSize(ContainerServiceVMSizeTypes v } /** - * Get the dnsPrefix value. + * Get dNS prefix to be used to create the FQDN for the agent pool. * * @return the dnsPrefix value */ @@ -128,7 +128,7 @@ public String dnsPrefix() { } /** - * Set the dnsPrefix value. + * Set dNS prefix to be used to create the FQDN for the agent pool. * * @param dnsPrefix the dnsPrefix value to set * @return the ContainerServiceAgentPoolProfile object itself. @@ -139,7 +139,7 @@ public ContainerServiceAgentPoolProfile withDnsPrefix(String dnsPrefix) { } /** - * Get the fqdn value. + * Get fDQN for the agent pool. * * @return the fqdn value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceCustomProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceCustomProfile.java index 6293f6d1853..6877eac1553 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceCustomProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceCustomProfile.java @@ -21,7 +21,7 @@ public class ContainerServiceCustomProfile { private String orchestrator; /** - * Get the orchestrator value. + * Get the name of the custom orchestrator to use. * * @return the orchestrator value */ @@ -30,7 +30,7 @@ public String orchestrator() { } /** - * Set the orchestrator value. + * Set the name of the custom orchestrator to use. * * @param orchestrator the orchestrator value to set * @return the ContainerServiceCustomProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceDiagnosticsProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceDiagnosticsProfile.java index 5b978c124ab..a63f5d665ed 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceDiagnosticsProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceDiagnosticsProfile.java @@ -21,7 +21,7 @@ public class ContainerServiceDiagnosticsProfile { private ContainerServiceVMDiagnostics vmDiagnostics; /** - * Get the vmDiagnostics value. + * Get profile for the container service VM diagnostic agent. * * @return the vmDiagnostics value */ @@ -30,7 +30,7 @@ public ContainerServiceVMDiagnostics vmDiagnostics() { } /** - * Set the vmDiagnostics value. + * Set profile for the container service VM diagnostic agent. * * @param vmDiagnostics the vmDiagnostics value to set * @return the ContainerServiceDiagnosticsProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceLinuxProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceLinuxProfile.java index 5d3e07099aa..ee397080c55 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceLinuxProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceLinuxProfile.java @@ -27,7 +27,7 @@ public class ContainerServiceLinuxProfile { private ContainerServiceSshConfiguration ssh; /** - * Get the adminUsername value. + * Get the administrator username to use for Linux VMs. * * @return the adminUsername value */ @@ -36,7 +36,7 @@ public String adminUsername() { } /** - * Set the adminUsername value. + * Set the administrator username to use for Linux VMs. * * @param adminUsername the adminUsername value to set * @return the ContainerServiceLinuxProfile object itself. @@ -47,7 +47,7 @@ public ContainerServiceLinuxProfile withAdminUsername(String adminUsername) { } /** - * Get the ssh value. + * Get the ssh key configuration for Linux VMs. * * @return the ssh value */ @@ -56,7 +56,7 @@ public ContainerServiceSshConfiguration ssh() { } /** - * Set the ssh value. + * Set the ssh key configuration for Linux VMs. * * @param ssh the ssh value to set * @return the ContainerServiceLinuxProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceMasterProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceMasterProfile.java index 23f1b81dd61..685838f6444 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceMasterProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceMasterProfile.java @@ -34,7 +34,7 @@ public class ContainerServiceMasterProfile { private String fqdn; /** - * Get the count value. + * Get number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. * * @return the count value */ @@ -43,7 +43,7 @@ public Integer count() { } /** - * Set the count value. + * Set number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. * * @param count the count value to set * @return the ContainerServiceMasterProfile object itself. @@ -54,7 +54,7 @@ public ContainerServiceMasterProfile withCount(Integer count) { } /** - * Get the dnsPrefix value. + * Get dNS prefix to be used to create the FQDN for master. * * @return the dnsPrefix value */ @@ -63,7 +63,7 @@ public String dnsPrefix() { } /** - * Set the dnsPrefix value. + * Set dNS prefix to be used to create the FQDN for master. * * @param dnsPrefix the dnsPrefix value to set * @return the ContainerServiceMasterProfile object itself. @@ -74,7 +74,7 @@ public ContainerServiceMasterProfile withDnsPrefix(String dnsPrefix) { } /** - * Get the fqdn value. + * Get fDQN for the master. * * @return the fqdn value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceOrchestratorProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceOrchestratorProfile.java index 60b0548b243..b5c70178cad 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceOrchestratorProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceOrchestratorProfile.java @@ -23,7 +23,7 @@ public class ContainerServiceOrchestratorProfile { private ContainerServiceOrchestratorTypes orchestratorType; /** - * Get the orchestratorType value. + * Get the orchestrator to use to manage container service cluster resources. Valid values are Swarm, DCOS, and Custom. Possible values include: 'Swarm', 'DCOS', 'Custom', 'Kubernetes'. * * @return the orchestratorType value */ @@ -32,7 +32,7 @@ public ContainerServiceOrchestratorTypes orchestratorType() { } /** - * Set the orchestratorType value. + * Set the orchestrator to use to manage container service cluster resources. Valid values are Swarm, DCOS, and Custom. Possible values include: 'Swarm', 'DCOS', 'Custom', 'Kubernetes'. * * @param orchestratorType the orchestratorType value to set * @return the ContainerServiceOrchestratorProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceServicePrincipalProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceServicePrincipalProfile.java index 42b61092668..7b3d14f3fa3 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceServicePrincipalProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceServicePrincipalProfile.java @@ -28,7 +28,7 @@ public class ContainerServiceServicePrincipalProfile { private String secret; /** - * Get the clientId value. + * Get the ID for the service principal. * * @return the clientId value */ @@ -37,7 +37,7 @@ public String clientId() { } /** - * Set the clientId value. + * Set the ID for the service principal. * * @param clientId the clientId value to set * @return the ContainerServiceServicePrincipalProfile object itself. @@ -48,7 +48,7 @@ public ContainerServiceServicePrincipalProfile withClientId(String clientId) { } /** - * Get the secret value. + * Get the secret password associated with the service principal. * * @return the secret value */ @@ -57,7 +57,7 @@ public String secret() { } /** - * Set the secret value. + * Set the secret password associated with the service principal. * * @param secret the secret value to set * @return the ContainerServiceServicePrincipalProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceSshConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceSshConfiguration.java index d566d7b4c3c..2933a41a0d4 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceSshConfiguration.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceSshConfiguration.java @@ -22,7 +22,7 @@ public class ContainerServiceSshConfiguration { private List publicKeys; /** - * Get the publicKeys value. + * Get the list of SSH public keys used to authenticate with Linux-based VMs. * * @return the publicKeys value */ @@ -31,7 +31,7 @@ public List publicKeys() { } /** - * Set the publicKeys value. + * Set the list of SSH public keys used to authenticate with Linux-based VMs. * * @param publicKeys the publicKeys value to set * @return the ContainerServiceSshConfiguration object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceSshPublicKey.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceSshPublicKey.java index a7b769a92ee..509e54d174b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceSshPublicKey.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceSshPublicKey.java @@ -22,7 +22,7 @@ public class ContainerServiceSshPublicKey { private String keyData; /** - * Get the keyData value. + * Get certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. * * @return the keyData value */ @@ -31,7 +31,7 @@ public String keyData() { } /** - * Set the keyData value. + * Set certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. * * @param keyData the keyData value to set * @return the ContainerServiceSshPublicKey object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceVMDiagnostics.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceVMDiagnostics.java index c035c63fe9f..e9918152ab0 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceVMDiagnostics.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceVMDiagnostics.java @@ -27,7 +27,7 @@ public class ContainerServiceVMDiagnostics { private String storageUri; /** - * Get the enabled value. + * Get whether the VM diagnostic agent is provisioned on the VM. * * @return the enabled value */ @@ -36,7 +36,7 @@ public boolean enabled() { } /** - * Set the enabled value. + * Set whether the VM diagnostic agent is provisioned on the VM. * * @param enabled the enabled value to set * @return the ContainerServiceVMDiagnostics object itself. @@ -47,7 +47,7 @@ public ContainerServiceVMDiagnostics withEnabled(boolean enabled) { } /** - * Get the storageUri value. + * Get the URI of the storage account where diagnostics are stored. * * @return the storageUri value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceWindowsProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceWindowsProfile.java index 70adffeb299..4dd14e8202c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceWindowsProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceWindowsProfile.java @@ -27,7 +27,7 @@ public class ContainerServiceWindowsProfile { private String adminPassword; /** - * Get the adminUsername value. + * Get the administrator username to use for Windows VMs. * * @return the adminUsername value */ @@ -36,7 +36,7 @@ public String adminUsername() { } /** - * Set the adminUsername value. + * Set the administrator username to use for Windows VMs. * * @param adminUsername the adminUsername value to set * @return the ContainerServiceWindowsProfile object itself. @@ -47,7 +47,7 @@ public ContainerServiceWindowsProfile withAdminUsername(String adminUsername) { } /** - * Get the adminPassword value. + * Get the administrator password to use for Windows VMs. * * @return the adminPassword value */ @@ -56,7 +56,7 @@ public String adminPassword() { } /** - * Set the adminPassword value. + * Set the administrator password to use for Windows VMs. * * @param adminPassword the adminPassword value to set * @return the ContainerServiceWindowsProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java index 3a4a97be686..5121c009502 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java @@ -51,7 +51,7 @@ public class CreationData { private String sourceResourceId; /** - * Get the createOption value. + * Get this enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore'. * * @return the createOption value */ @@ -60,7 +60,7 @@ public DiskCreateOption createOption() { } /** - * Set the createOption value. + * Set this enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore'. * * @param createOption the createOption value to set * @return the CreationData object itself. @@ -71,7 +71,7 @@ public CreationData withCreateOption(DiskCreateOption createOption) { } /** - * Get the storageAccountId value. + * Get if createOption is Import, the Azure Resource Manager identifier of the storage account containing the blob to import as a disk. Required only if the blob is in a different subscription. * * @return the storageAccountId value */ @@ -80,7 +80,7 @@ public String storageAccountId() { } /** - * Set the storageAccountId value. + * Set if createOption is Import, the Azure Resource Manager identifier of the storage account containing the blob to import as a disk. Required only if the blob is in a different subscription. * * @param storageAccountId the storageAccountId value to set * @return the CreationData object itself. @@ -91,7 +91,7 @@ public CreationData withStorageAccountId(String storageAccountId) { } /** - * Get the imageReference value. + * Get disk source information. * * @return the imageReference value */ @@ -100,7 +100,7 @@ public ImageDiskReference imageReference() { } /** - * Set the imageReference value. + * Set disk source information. * * @param imageReference the imageReference value to set * @return the CreationData object itself. @@ -111,7 +111,7 @@ public CreationData withImageReference(ImageDiskReference imageReference) { } /** - * Get the sourceUri value. + * Get if createOption is Import, this is the URI of a blob to be imported into a managed disk. * * @return the sourceUri value */ @@ -120,7 +120,7 @@ public String sourceUri() { } /** - * Set the sourceUri value. + * Set if createOption is Import, this is the URI of a blob to be imported into a managed disk. * * @param sourceUri the sourceUri value to set * @return the CreationData object itself. @@ -131,7 +131,7 @@ public CreationData withSourceUri(String sourceUri) { } /** - * Get the sourceResourceId value. + * Get if createOption is Copy, this is the ARM id of the source snapshot or disk. * * @return the sourceResourceId value */ @@ -140,7 +140,7 @@ public String sourceResourceId() { } /** - * Set the sourceResourceId value. + * Set if createOption is Copy, this is the ARM id of the source snapshot or disk. * * @param sourceResourceId the sourceResourceId value to set * @return the CreationData object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java index f937855d07f..7ee25bc720c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java @@ -89,7 +89,7 @@ public class DataDisk { private ManagedDiskParametersInner managedDisk; /** - * Get the lun value. + * Get specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. * * @return the lun value */ @@ -98,7 +98,7 @@ public int lun() { } /** - * Set the lun value. + * Set specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. * * @param lun the lun value to set * @return the DataDisk object itself. @@ -109,7 +109,7 @@ public DataDisk withLun(int lun) { } /** - * Get the name value. + * Get the disk name. * * @return the name value */ @@ -118,7 +118,7 @@ public String name() { } /** - * Set the name value. + * Set the disk name. * * @param name the name value to set * @return the DataDisk object itself. @@ -129,7 +129,7 @@ public DataDisk withName(String name) { } /** - * Get the vhd value. + * Get the virtual hard disk. * * @return the vhd value */ @@ -138,7 +138,7 @@ public VirtualHardDisk vhd() { } /** - * Set the vhd value. + * Set the virtual hard disk. * * @param vhd the vhd value to set * @return the DataDisk object itself. @@ -149,7 +149,7 @@ public DataDisk withVhd(VirtualHardDisk vhd) { } /** - * Get the image value. + * Get the source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. * * @return the image value */ @@ -158,7 +158,7 @@ public VirtualHardDisk image() { } /** - * Set the image value. + * Set the source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. * * @param image the image value to set * @return the DataDisk object itself. @@ -169,7 +169,7 @@ public DataDisk withImage(VirtualHardDisk image) { } /** - * Get the caching value. + * Get specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @return the caching value */ @@ -178,7 +178,7 @@ public CachingTypes caching() { } /** - * Set the caching value. + * Set specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @param caching the caching value to set * @return the DataDisk object itself. @@ -189,7 +189,7 @@ public DataDisk withCaching(CachingTypes caching) { } /** - * Get the writeAcceleratorEnabled value. + * Get specifies whether writeAccelerator should be enabled or disabled on the disk. * * @return the writeAcceleratorEnabled value */ @@ -198,7 +198,7 @@ public Boolean writeAcceleratorEnabled() { } /** - * Set the writeAcceleratorEnabled value. + * Set specifies whether writeAccelerator should be enabled or disabled on the disk. * * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set * @return the DataDisk object itself. @@ -209,7 +209,7 @@ public DataDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) { } /** - * Get the createOption value. + * Get specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'. * * @return the createOption value */ @@ -218,7 +218,7 @@ public DiskCreateOptionTypes createOption() { } /** - * Set the createOption value. + * Set specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'. * * @param createOption the createOption value to set * @return the DataDisk object itself. @@ -229,7 +229,7 @@ public DataDisk withCreateOption(DiskCreateOptionTypes createOption) { } /** - * Get the diskSizeGB value. + * Get specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @return the diskSizeGB value */ @@ -238,7 +238,7 @@ public Integer diskSizeGB() { } /** - * Set the diskSizeGB value. + * Set specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @param diskSizeGB the diskSizeGB value to set * @return the DataDisk object itself. @@ -249,7 +249,7 @@ public DataDisk withDiskSizeGB(Integer diskSizeGB) { } /** - * Get the managedDisk value. + * Get the managed disk parameters. * * @return the managedDisk value */ @@ -258,7 +258,7 @@ public ManagedDiskParametersInner managedDisk() { } /** - * Set the managedDisk value. + * Set the managed disk parameters. * * @param managedDisk the managedDisk value to set * @return the DataDisk object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDiskImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDiskImage.java index ed8c3f25a4f..c641de8eb86 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDiskImage.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDiskImage.java @@ -23,7 +23,7 @@ public class DataDiskImage { private Integer lun; /** - * Get the lun value. + * Get specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. * * @return the lun value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiagnosticsProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiagnosticsProfile.java index 30eb09b9f7d..e8695724c71 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiagnosticsProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiagnosticsProfile.java @@ -27,7 +27,7 @@ public class DiagnosticsProfile { private BootDiagnostics bootDiagnostics; /** - * Get the bootDiagnostics value. + * Get boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> For Linux Virtual Machines, you can easily view the output of your console log. <br><br> For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor. * * @return the bootDiagnostics value */ @@ -36,7 +36,7 @@ public BootDiagnostics bootDiagnostics() { } /** - * Set the bootDiagnostics value. + * Set boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> For Linux Virtual Machines, you can easily view the output of your console log. <br><br> For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor. * * @param bootDiagnostics the bootDiagnostics value to set * @return the DiagnosticsProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskEncryptionSettings.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskEncryptionSettings.java index 53d96f8141a..569191f7b87 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskEncryptionSettings.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskEncryptionSettings.java @@ -35,7 +35,7 @@ public class DiskEncryptionSettings { private Boolean enabled; /** - * Get the diskEncryptionKey value. + * Get specifies the location of the disk encryption key, which is a Key Vault Secret. * * @return the diskEncryptionKey value */ @@ -44,7 +44,7 @@ public KeyVaultSecretReference diskEncryptionKey() { } /** - * Set the diskEncryptionKey value. + * Set specifies the location of the disk encryption key, which is a Key Vault Secret. * * @param diskEncryptionKey the diskEncryptionKey value to set * @return the DiskEncryptionSettings object itself. @@ -55,7 +55,7 @@ public DiskEncryptionSettings withDiskEncryptionKey(KeyVaultSecretReference disk } /** - * Get the keyEncryptionKey value. + * Get specifies the location of the key encryption key in Key Vault. * * @return the keyEncryptionKey value */ @@ -64,7 +64,7 @@ public KeyVaultKeyReference keyEncryptionKey() { } /** - * Set the keyEncryptionKey value. + * Set specifies the location of the key encryption key in Key Vault. * * @param keyEncryptionKey the keyEncryptionKey value to set * @return the DiskEncryptionSettings object itself. @@ -75,7 +75,7 @@ public DiskEncryptionSettings withKeyEncryptionKey(KeyVaultKeyReference keyEncry } /** - * Get the enabled value. + * Get specifies whether disk encryption should be enabled on the virtual machine. * * @return the enabled value */ @@ -84,7 +84,7 @@ public Boolean enabled() { } /** - * Set the enabled value. + * Set specifies whether disk encryption should be enabled on the virtual machine. * * @param enabled the enabled value to set * @return the DiskEncryptionSettings object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskInstanceView.java index 1034d96e779..fe5b498d24c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskInstanceView.java @@ -36,7 +36,7 @@ public class DiskInstanceView { private List statuses; /** - * Get the name value. + * Get the disk name. * * @return the name value */ @@ -45,7 +45,7 @@ public String name() { } /** - * Set the name value. + * Set the disk name. * * @param name the name value to set * @return the DiskInstanceView object itself. @@ -56,7 +56,7 @@ public DiskInstanceView withName(String name) { } /** - * Get the encryptionSettings value. + * Get specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15. * * @return the encryptionSettings value */ @@ -65,7 +65,7 @@ public List encryptionSettings() { } /** - * Set the encryptionSettings value. + * Set specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15. * * @param encryptionSettings the encryptionSettings value to set * @return the DiskInstanceView object itself. @@ -76,7 +76,7 @@ public DiskInstanceView withEncryptionSettings(List encr } /** - * Get the statuses value. + * Get the resource status information. * * @return the statuses value */ @@ -85,7 +85,7 @@ public List statuses() { } /** - * Set the statuses value. + * Set the resource status information. * * @param statuses the statuses value to set * @return the DiskInstanceView object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java index b42552ed482..cfe673b3a02 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java @@ -27,7 +27,7 @@ public class DiskSku { private String tier; /** - * Get the name value. + * Get the sku name. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @return the name value */ @@ -36,7 +36,7 @@ public StorageAccountTypes name() { } /** - * Set the name value. + * Set the sku name. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @param name the name value to set * @return the DiskSku object itself. @@ -47,7 +47,7 @@ public DiskSku withName(StorageAccountTypes name) { } /** - * Get the tier value. + * Get the sku tier. * * @return the tier value */ 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 index 30e45b30e8e..3ce17e168ed 100644 --- 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 @@ -8,6 +8,7 @@ package com.microsoft.azure.management.compute; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; @@ -15,7 +16,7 @@ * Disk update resource. */ @JsonFlatten -public class DiskUpdate extends ResourceUpdate { +public class DiskUpdate { /** * the Operating System type. Possible values include: 'Windows', 'Linux'. */ @@ -39,7 +40,19 @@ public class DiskUpdate extends ResourceUpdate { private EncryptionSettings encryptionSettings; /** - * Get the osType value. + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The sku property. + */ + @JsonProperty(value = "sku") + private DiskSku sku; + + /** + * Get the Operating System type. Possible values include: 'Windows', 'Linux'. * * @return the osType value */ @@ -48,7 +61,7 @@ public OperatingSystemTypes osType() { } /** - * Set the osType value. + * Set the Operating System type. Possible values include: 'Windows', 'Linux'. * * @param osType the osType value to set * @return the DiskUpdate object itself. @@ -59,7 +72,7 @@ public DiskUpdate withOsType(OperatingSystemTypes osType) { } /** - * Get the diskSizeGB value. + * Get 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. * * @return the diskSizeGB value */ @@ -68,7 +81,7 @@ public Integer diskSizeGB() { } /** - * Set the diskSizeGB value. + * Set 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. * * @param diskSizeGB the diskSizeGB value to set * @return the DiskUpdate object itself. @@ -79,7 +92,7 @@ public DiskUpdate withDiskSizeGB(Integer diskSizeGB) { } /** - * Get the encryptionSettings value. + * Get encryption settings for disk or snapshot. * * @return the encryptionSettings value */ @@ -88,7 +101,7 @@ public EncryptionSettings encryptionSettings() { } /** - * Set the encryptionSettings value. + * Set encryption settings for disk or snapshot. * * @param encryptionSettings the encryptionSettings value to set * @return the DiskUpdate object itself. @@ -98,4 +111,44 @@ public DiskUpdate withEncryptionSettings(EncryptionSettings encryptionSettings) return this; } + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the DiskUpdate object itself. + */ + public DiskUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the sku value. + * + * @return the sku value + */ + public DiskSku sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the DiskUpdate object itself. + */ + public DiskUpdate withSku(DiskSku sku) { + this.sku = sku; + return this; + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/EncryptionSettings.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/EncryptionSettings.java index ba38f0a6bd6..513d02f9e6d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/EncryptionSettings.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/EncryptionSettings.java @@ -37,7 +37,7 @@ public class EncryptionSettings { private KeyVaultAndKeyReference keyEncryptionKey; /** - * Get the enabled value. + * Get set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged. * * @return the enabled value */ @@ -46,7 +46,7 @@ public Boolean enabled() { } /** - * Set the enabled value. + * Set set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged. * * @param enabled the enabled value to set * @return the EncryptionSettings object itself. @@ -57,7 +57,7 @@ public EncryptionSettings withEnabled(Boolean enabled) { } /** - * Get the diskEncryptionKey value. + * Get key Vault Secret Url and vault id of the disk encryption key. * * @return the diskEncryptionKey value */ @@ -66,7 +66,7 @@ public KeyVaultAndSecretReference diskEncryptionKey() { } /** - * Set the diskEncryptionKey value. + * Set key Vault Secret Url and vault id of the disk encryption key. * * @param diskEncryptionKey the diskEncryptionKey value to set * @return the EncryptionSettings object itself. @@ -77,7 +77,7 @@ public EncryptionSettings withDiskEncryptionKey(KeyVaultAndSecretReference diskE } /** - * Get the keyEncryptionKey value. + * Get key Vault Key Url and vault id of the key encryption key. * * @return the keyEncryptionKey value */ @@ -86,7 +86,7 @@ public KeyVaultAndKeyReference keyEncryptionKey() { } /** - * Set the keyEncryptionKey value. + * Set key Vault Key Url and vault id of the key encryption key. * * @param keyEncryptionKey the keyEncryptionKey value to set * @return the EncryptionSettings object itself. 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 index f5dcfd5bcdf..6d91f25b9fe 100644 --- 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 @@ -27,7 +27,7 @@ public class GrantAccessData { private int durationInSeconds; /** - * Get the access value. + * Get possible values include: 'None', 'Read'. * * @return the access value */ @@ -36,7 +36,7 @@ public AccessLevel access() { } /** - * Set the access value. + * Set possible values include: 'None', 'Read'. * * @param access the access value to set * @return the GrantAccessData object itself. @@ -47,7 +47,7 @@ public GrantAccessData withAccess(AccessLevel access) { } /** - * Get the durationInSeconds value. + * Get time duration in seconds until the SAS access expires. * * @return the durationInSeconds value */ @@ -56,7 +56,7 @@ public int durationInSeconds() { } /** - * Set the durationInSeconds value. + * Set time duration in seconds until the SAS access expires. * * @param durationInSeconds the durationInSeconds value to set * @return the GrantAccessData object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java index b0a9219106e..893814739da 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java @@ -79,7 +79,7 @@ public class HardwareProfile { private VirtualMachineSizeTypes vmSize; /** - * Get the vmSize value. + * Get specifies the size of the virtual machine. For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> The available VM sizes depend on region and availability set. For a list of available sizes use these APIs: <br><br> [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) <br><br> [List all available virtual machine sizes in a region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) <br><br> [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', 'Standard_NV12', 'Standard_NV24'. * * @return the vmSize value */ @@ -88,7 +88,7 @@ public VirtualMachineSizeTypes vmSize() { } /** - * Set the vmSize value. + * Set specifies the size of the virtual machine. For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> The available VM sizes depend on region and availability set. For a list of available sizes use these APIs: <br><br> [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) <br><br> [List all available virtual machine sizes in a region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) <br><br> [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', 'Standard_NV12', 'Standard_NV24'. * * @param vmSize the vmSize value to set * @return the HardwareProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageDataDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageDataDisk.java index 2aec5e55152..594e7f1259d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageDataDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageDataDisk.java @@ -68,7 +68,7 @@ public class ImageDataDisk { private StorageAccountTypes storageAccountType; /** - * Get the lun value. + * Get specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. * * @return the lun value */ @@ -77,7 +77,7 @@ public int lun() { } /** - * Set the lun value. + * Set specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. * * @param lun the lun value to set * @return the ImageDataDisk object itself. @@ -88,7 +88,7 @@ public ImageDataDisk withLun(int lun) { } /** - * Get the snapshot value. + * Get the snapshot. * * @return the snapshot value */ @@ -97,7 +97,7 @@ public SubResource snapshot() { } /** - * Set the snapshot value. + * Set the snapshot. * * @param snapshot the snapshot value to set * @return the ImageDataDisk object itself. @@ -108,7 +108,7 @@ public ImageDataDisk withSnapshot(SubResource snapshot) { } /** - * Get the managedDisk value. + * Get the managedDisk. * * @return the managedDisk value */ @@ -117,7 +117,7 @@ public SubResource managedDisk() { } /** - * Set the managedDisk value. + * Set the managedDisk. * * @param managedDisk the managedDisk value to set * @return the ImageDataDisk object itself. @@ -128,7 +128,7 @@ public ImageDataDisk withManagedDisk(SubResource managedDisk) { } /** - * Get the blobUri value. + * Get the Virtual Hard Disk. * * @return the blobUri value */ @@ -137,7 +137,7 @@ public String blobUri() { } /** - * Set the blobUri value. + * Set the Virtual Hard Disk. * * @param blobUri the blobUri value to set * @return the ImageDataDisk object itself. @@ -148,7 +148,7 @@ public ImageDataDisk withBlobUri(String blobUri) { } /** - * Get the caching value. + * Get specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @return the caching value */ @@ -157,7 +157,7 @@ public CachingTypes caching() { } /** - * Set the caching value. + * Set specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @param caching the caching value to set * @return the ImageDataDisk object itself. @@ -168,7 +168,7 @@ public ImageDataDisk withCaching(CachingTypes caching) { } /** - * Get the diskSizeGB value. + * Get specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @return the diskSizeGB value */ @@ -177,7 +177,7 @@ public Integer diskSizeGB() { } /** - * Set the diskSizeGB value. + * Set specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @param diskSizeGB the diskSizeGB value to set * @return the ImageDataDisk object itself. @@ -188,7 +188,7 @@ public ImageDataDisk withDiskSizeGB(Integer diskSizeGB) { } /** - * Get the storageAccountType value. + * Get specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @return the storageAccountType value */ @@ -197,7 +197,7 @@ public StorageAccountTypes storageAccountType() { } /** - * Set the storageAccountType value. + * Set specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @param storageAccountType the storageAccountType value to set * @return the ImageDataDisk object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageDiskReference.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageDiskReference.java index c1a048e8a69..22a3269bb74 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageDiskReference.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageDiskReference.java @@ -30,7 +30,7 @@ public class ImageDiskReference { private Integer lun; /** - * Get the id value. + * Get a relative uri containing either a Platform Imgage Repository or user image reference. * * @return the id value */ @@ -39,7 +39,7 @@ public String id() { } /** - * Set the id value. + * Set a relative uri containing either a Platform Imgage Repository or user image reference. * * @param id the id value to set * @return the ImageDiskReference object itself. @@ -50,7 +50,7 @@ public ImageDiskReference withId(String id) { } /** - * Get the lun value. + * Get if the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null. * * @return the lun value */ @@ -59,7 +59,7 @@ public Integer lun() { } /** - * Set the lun value. + * Set if the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null. * * @param lun the lun value to set * @return the ImageDiskReference object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageOSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageOSDisk.java index 03a1c0c59d8..896653c6fb7 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageOSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageOSDisk.java @@ -76,7 +76,7 @@ public class ImageOSDisk { private StorageAccountTypes storageAccountType; /** - * Get the osType value. + * Get this property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'. * * @return the osType value */ @@ -85,7 +85,7 @@ public OperatingSystemTypes osType() { } /** - * Set the osType value. + * Set this property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'. * * @param osType the osType value to set * @return the ImageOSDisk object itself. @@ -96,7 +96,7 @@ public ImageOSDisk withOsType(OperatingSystemTypes osType) { } /** - * Get the osState value. + * Get the OS State. Possible values include: 'Generalized', 'Specialized'. * * @return the osState value */ @@ -105,7 +105,7 @@ public OperatingSystemStateTypes osState() { } /** - * Set the osState value. + * Set the OS State. Possible values include: 'Generalized', 'Specialized'. * * @param osState the osState value to set * @return the ImageOSDisk object itself. @@ -116,7 +116,7 @@ public ImageOSDisk withOsState(OperatingSystemStateTypes osState) { } /** - * Get the snapshot value. + * Get the snapshot. * * @return the snapshot value */ @@ -125,7 +125,7 @@ public SubResource snapshot() { } /** - * Set the snapshot value. + * Set the snapshot. * * @param snapshot the snapshot value to set * @return the ImageOSDisk object itself. @@ -136,7 +136,7 @@ public ImageOSDisk withSnapshot(SubResource snapshot) { } /** - * Get the managedDisk value. + * Get the managedDisk. * * @return the managedDisk value */ @@ -145,7 +145,7 @@ public SubResource managedDisk() { } /** - * Set the managedDisk value. + * Set the managedDisk. * * @param managedDisk the managedDisk value to set * @return the ImageOSDisk object itself. @@ -156,7 +156,7 @@ public ImageOSDisk withManagedDisk(SubResource managedDisk) { } /** - * Get the blobUri value. + * Get the Virtual Hard Disk. * * @return the blobUri value */ @@ -165,7 +165,7 @@ public String blobUri() { } /** - * Set the blobUri value. + * Set the Virtual Hard Disk. * * @param blobUri the blobUri value to set * @return the ImageOSDisk object itself. @@ -176,7 +176,7 @@ public ImageOSDisk withBlobUri(String blobUri) { } /** - * Get the caching value. + * Get specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @return the caching value */ @@ -185,7 +185,7 @@ public CachingTypes caching() { } /** - * Set the caching value. + * Set specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @param caching the caching value to set * @return the ImageOSDisk object itself. @@ -196,7 +196,7 @@ public ImageOSDisk withCaching(CachingTypes caching) { } /** - * Get the diskSizeGB value. + * Get specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @return the diskSizeGB value */ @@ -205,7 +205,7 @@ public Integer diskSizeGB() { } /** - * Set the diskSizeGB value. + * Set specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @param diskSizeGB the diskSizeGB value to set * @return the ImageOSDisk object itself. @@ -216,7 +216,7 @@ public ImageOSDisk withDiskSizeGB(Integer diskSizeGB) { } /** - * Get the storageAccountType value. + * Get specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @return the storageAccountType value */ @@ -225,7 +225,7 @@ public StorageAccountTypes storageAccountType() { } /** - * Set the storageAccountType value. + * Set specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @param storageAccountType the storageAccountType value to set * @return the ImageOSDisk object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java index d3e87946e78..b6633cb7a84 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java @@ -42,7 +42,7 @@ public class ImageStorageProfile { private Boolean zoneResilient; /** - * Get the osDisk value. + * Get specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @return the osDisk value */ @@ -51,7 +51,7 @@ public ImageOSDisk osDisk() { } /** - * Set the osDisk value. + * Set specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @param osDisk the osDisk value to set * @return the ImageStorageProfile object itself. @@ -62,7 +62,7 @@ public ImageStorageProfile withOsDisk(ImageOSDisk osDisk) { } /** - * Get the dataDisks value. + * Get specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @return the dataDisks value */ @@ -71,7 +71,7 @@ public List dataDisks() { } /** - * Set the dataDisks value. + * Set specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @param dataDisks the dataDisks value to set * @return the ImageStorageProfile object itself. @@ -82,7 +82,7 @@ public ImageStorageProfile withDataDisks(List dataDisks) { } /** - * Get the zoneResilient value. + * Get specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS). * * @return the zoneResilient value */ @@ -91,7 +91,7 @@ public Boolean zoneResilient() { } /** - * Set the zoneResilient value. + * Set specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS). * * @param zoneResilient the zoneResilient value to set * @return the ImageStorageProfile object itself. 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 index 193fd75045d..f260a655c52 100644 --- 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 @@ -36,7 +36,7 @@ public class ImageUpdate extends UpdateResource { private String provisioningState; /** - * Get the sourceVirtualMachine value. + * Get the source virtual machine from which Image is created. * * @return the sourceVirtualMachine value */ @@ -45,7 +45,7 @@ public SubResource sourceVirtualMachine() { } /** - * Set the sourceVirtualMachine value. + * Set the source virtual machine from which Image is created. * * @param sourceVirtualMachine the sourceVirtualMachine value to set * @return the ImageUpdate object itself. @@ -56,7 +56,7 @@ public ImageUpdate withSourceVirtualMachine(SubResource sourceVirtualMachine) { } /** - * Get the storageProfile value. + * Get specifies the storage settings for the virtual machine disks. * * @return the storageProfile value */ @@ -65,7 +65,7 @@ public ImageStorageProfile storageProfile() { } /** - * Set the storageProfile value. + * Set specifies the storage settings for the virtual machine disks. * * @param storageProfile the storageProfile value to set * @return the ImageUpdate object itself. @@ -76,7 +76,7 @@ public ImageUpdate withStorageProfile(ImageStorageProfile storageProfile) { } /** - * Get the provisioningState value. + * Get the provisioning state. * * @return the provisioningState value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/InnerError.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/InnerError.java index 87179759633..2c5a8559298 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/InnerError.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/InnerError.java @@ -27,7 +27,7 @@ public class InnerError { private String errordetail; /** - * Get the exceptiontype value. + * Get the exception type. * * @return the exceptiontype value */ @@ -36,7 +36,7 @@ public String exceptiontype() { } /** - * Set the exceptiontype value. + * Set the exception type. * * @param exceptiontype the exceptiontype value to set * @return the InnerError object itself. @@ -47,7 +47,7 @@ public InnerError withExceptiontype(String exceptiontype) { } /** - * Get the errordetail value. + * Get the internal error message or exception dump. * * @return the errordetail value */ @@ -56,7 +56,7 @@ public String errordetail() { } /** - * Set the errordetail value. + * Set the internal error message or exception dump. * * @param errordetail the errordetail value to set * @return the InnerError object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultAndKeyReference.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultAndKeyReference.java index 8554ddff181..f7fc290061e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultAndKeyReference.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultAndKeyReference.java @@ -28,7 +28,7 @@ public class KeyVaultAndKeyReference { private String keyUrl; /** - * Get the sourceVault value. + * Get resource id of the KeyVault containing the key or secret. * * @return the sourceVault value */ @@ -37,7 +37,7 @@ public SourceVault sourceVault() { } /** - * Set the sourceVault value. + * Set resource id of the KeyVault containing the key or secret. * * @param sourceVault the sourceVault value to set * @return the KeyVaultAndKeyReference object itself. @@ -48,7 +48,7 @@ public KeyVaultAndKeyReference withSourceVault(SourceVault sourceVault) { } /** - * Get the keyUrl value. + * Get url pointing to a key or secret in KeyVault. * * @return the keyUrl value */ @@ -57,7 +57,7 @@ public String keyUrl() { } /** - * Set the keyUrl value. + * Set url pointing to a key or secret in KeyVault. * * @param keyUrl the keyUrl value to set * @return the KeyVaultAndKeyReference object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultAndSecretReference.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultAndSecretReference.java index f7fcde0d42b..d6d701820e8 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultAndSecretReference.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultAndSecretReference.java @@ -27,7 +27,7 @@ public class KeyVaultAndSecretReference { private String secretUrl; /** - * Get the sourceVault value. + * Get resource id of the KeyVault containing the key or secret. * * @return the sourceVault value */ @@ -36,7 +36,7 @@ public SourceVault sourceVault() { } /** - * Set the sourceVault value. + * Set resource id of the KeyVault containing the key or secret. * * @param sourceVault the sourceVault value to set * @return the KeyVaultAndSecretReference object itself. @@ -47,7 +47,7 @@ public KeyVaultAndSecretReference withSourceVault(SourceVault sourceVault) { } /** - * Get the secretUrl value. + * Get url pointing to a key or secret in KeyVault. * * @return the secretUrl value */ @@ -56,7 +56,7 @@ public String secretUrl() { } /** - * Set the secretUrl value. + * Set url pointing to a key or secret in KeyVault. * * @param secretUrl the secretUrl value to set * @return the KeyVaultAndSecretReference object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultKeyReference.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultKeyReference.java index bcc6c3e78a0..59a4e5a5bb0 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultKeyReference.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultKeyReference.java @@ -28,7 +28,7 @@ public class KeyVaultKeyReference { private SubResource sourceVault; /** - * Get the keyUrl value. + * Get the URL referencing a key encryption key in Key Vault. * * @return the keyUrl value */ @@ -37,7 +37,7 @@ public String keyUrl() { } /** - * Set the keyUrl value. + * Set the URL referencing a key encryption key in Key Vault. * * @param keyUrl the keyUrl value to set * @return the KeyVaultKeyReference object itself. @@ -48,7 +48,7 @@ public KeyVaultKeyReference withKeyUrl(String keyUrl) { } /** - * Get the sourceVault value. + * Get the relative URL of the Key Vault containing the key. * * @return the sourceVault value */ @@ -57,7 +57,7 @@ public SubResource sourceVault() { } /** - * Set the sourceVault value. + * Set the relative URL of the Key Vault containing the key. * * @param sourceVault the sourceVault value to set * @return the KeyVaultKeyReference object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultSecretReference.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultSecretReference.java index be661cc5788..a53f65c6f13 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultSecretReference.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultSecretReference.java @@ -28,7 +28,7 @@ public class KeyVaultSecretReference { private SubResource sourceVault; /** - * Get the secretUrl value. + * Get the URL referencing a secret in a Key Vault. * * @return the secretUrl value */ @@ -37,7 +37,7 @@ public String secretUrl() { } /** - * Set the secretUrl value. + * Set the URL referencing a secret in a Key Vault. * * @param secretUrl the secretUrl value to set * @return the KeyVaultSecretReference object itself. @@ -48,7 +48,7 @@ public KeyVaultSecretReference withSecretUrl(String secretUrl) { } /** - * Get the sourceVault value. + * Get the relative URL of the Key Vault containing the secret. * * @return the sourceVault value */ @@ -57,7 +57,7 @@ public SubResource sourceVault() { } /** - * Set the sourceVault value. + * Set the relative URL of the Key Vault containing the secret. * * @param sourceVault the sourceVault value to set * @return the KeyVaultSecretReference object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LinuxConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LinuxConfiguration.java index 4437d203c44..573fc526e57 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LinuxConfiguration.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LinuxConfiguration.java @@ -33,7 +33,7 @@ public class LinuxConfiguration { private SshConfiguration ssh; /** - * Get the disablePasswordAuthentication value. + * Get specifies whether password authentication should be disabled. * * @return the disablePasswordAuthentication value */ @@ -42,7 +42,7 @@ public Boolean disablePasswordAuthentication() { } /** - * Set the disablePasswordAuthentication value. + * Set specifies whether password authentication should be disabled. * * @param disablePasswordAuthentication the disablePasswordAuthentication value to set * @return the LinuxConfiguration object itself. @@ -53,7 +53,7 @@ public LinuxConfiguration withDisablePasswordAuthentication(Boolean disablePassw } /** - * Get the ssh value. + * Get specifies the ssh key configuration for a Linux OS. * * @return the ssh value */ @@ -62,7 +62,7 @@ public SshConfiguration ssh() { } /** - * Set the ssh value. + * Set specifies the ssh key configuration for a Linux OS. * * @param ssh the ssh value to set * @return the LinuxConfiguration object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsInputBase.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsInputBase.java index ea7bb1f06a3..c30c957ead2 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsInputBase.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsInputBase.java @@ -53,7 +53,7 @@ public class LogAnalyticsInputBase { private Boolean groupByResourceName; /** - * Get the blobContainerSasUri value. + * Get sAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. * * @return the blobContainerSasUri value */ @@ -62,7 +62,7 @@ public String blobContainerSasUri() { } /** - * Set the blobContainerSasUri value. + * Set sAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. * * @param blobContainerSasUri the blobContainerSasUri value to set * @return the LogAnalyticsInputBase object itself. @@ -73,7 +73,7 @@ public LogAnalyticsInputBase withBlobContainerSasUri(String blobContainerSasUri) } /** - * Get the fromTime value. + * Get from time of the query. * * @return the fromTime value */ @@ -82,7 +82,7 @@ public DateTime fromTime() { } /** - * Set the fromTime value. + * Set from time of the query. * * @param fromTime the fromTime value to set * @return the LogAnalyticsInputBase object itself. @@ -93,7 +93,7 @@ public LogAnalyticsInputBase withFromTime(DateTime fromTime) { } /** - * Get the toTime value. + * Get to time of the query. * * @return the toTime value */ @@ -102,7 +102,7 @@ public DateTime toTime() { } /** - * Set the toTime value. + * Set to time of the query. * * @param toTime the toTime value to set * @return the LogAnalyticsInputBase object itself. @@ -113,7 +113,7 @@ public LogAnalyticsInputBase withToTime(DateTime toTime) { } /** - * Get the groupByThrottlePolicy value. + * Get group query result by Throttle Policy applied. * * @return the groupByThrottlePolicy value */ @@ -122,7 +122,7 @@ public Boolean groupByThrottlePolicy() { } /** - * Set the groupByThrottlePolicy value. + * Set group query result by Throttle Policy applied. * * @param groupByThrottlePolicy the groupByThrottlePolicy value to set * @return the LogAnalyticsInputBase object itself. @@ -133,7 +133,7 @@ public LogAnalyticsInputBase withGroupByThrottlePolicy(Boolean groupByThrottlePo } /** - * Get the groupByOperationName value. + * Get group query result by by Operation Name. * * @return the groupByOperationName value */ @@ -142,7 +142,7 @@ public Boolean groupByOperationName() { } /** - * Set the groupByOperationName value. + * Set group query result by by Operation Name. * * @param groupByOperationName the groupByOperationName value to set * @return the LogAnalyticsInputBase object itself. @@ -153,7 +153,7 @@ public LogAnalyticsInputBase withGroupByOperationName(Boolean groupByOperationNa } /** - * Get the groupByResourceName value. + * Get group query result by Resource Name. * * @return the groupByResourceName value */ @@ -162,7 +162,7 @@ public Boolean groupByResourceName() { } /** - * Set the groupByResourceName value. + * Set group query result by Resource Name. * * @param groupByResourceName the groupByResourceName value to set * @return the LogAnalyticsInputBase object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsOutput.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsOutput.java index e7cc3767cd5..dc310a855cb 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsOutput.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsOutput.java @@ -21,7 +21,7 @@ public class LogAnalyticsOutput { private String output; /** - * Get the output value. + * Get output file Uri path to blob container. * * @return the output value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/MaintenanceRedeployStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/MaintenanceRedeployStatus.java index 291b72fa5df..33444244cb2 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/MaintenanceRedeployStatus.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/MaintenanceRedeployStatus.java @@ -59,7 +59,7 @@ public class MaintenanceRedeployStatus { private String lastOperationMessage; /** - * Get the isCustomerInitiatedMaintenanceAllowed value. + * Get true, if customer is allowed to perform Maintenance. * * @return the isCustomerInitiatedMaintenanceAllowed value */ @@ -68,7 +68,7 @@ public Boolean isCustomerInitiatedMaintenanceAllowed() { } /** - * Set the isCustomerInitiatedMaintenanceAllowed value. + * Set true, if customer is allowed to perform Maintenance. * * @param isCustomerInitiatedMaintenanceAllowed the isCustomerInitiatedMaintenanceAllowed value to set * @return the MaintenanceRedeployStatus object itself. @@ -79,7 +79,7 @@ public MaintenanceRedeployStatus withIsCustomerInitiatedMaintenanceAllowed(Boole } /** - * Get the preMaintenanceWindowStartTime value. + * Get start Time for the Pre Maintenance Window. * * @return the preMaintenanceWindowStartTime value */ @@ -88,7 +88,7 @@ public DateTime preMaintenanceWindowStartTime() { } /** - * Set the preMaintenanceWindowStartTime value. + * Set start Time for the Pre Maintenance Window. * * @param preMaintenanceWindowStartTime the preMaintenanceWindowStartTime value to set * @return the MaintenanceRedeployStatus object itself. @@ -99,7 +99,7 @@ public MaintenanceRedeployStatus withPreMaintenanceWindowStartTime(DateTime preM } /** - * Get the preMaintenanceWindowEndTime value. + * Get end Time for the Pre Maintenance Window. * * @return the preMaintenanceWindowEndTime value */ @@ -108,7 +108,7 @@ public DateTime preMaintenanceWindowEndTime() { } /** - * Set the preMaintenanceWindowEndTime value. + * Set end Time for the Pre Maintenance Window. * * @param preMaintenanceWindowEndTime the preMaintenanceWindowEndTime value to set * @return the MaintenanceRedeployStatus object itself. @@ -119,7 +119,7 @@ public MaintenanceRedeployStatus withPreMaintenanceWindowEndTime(DateTime preMai } /** - * Get the maintenanceWindowStartTime value. + * Get start Time for the Maintenance Window. * * @return the maintenanceWindowStartTime value */ @@ -128,7 +128,7 @@ public DateTime maintenanceWindowStartTime() { } /** - * Set the maintenanceWindowStartTime value. + * Set start Time for the Maintenance Window. * * @param maintenanceWindowStartTime the maintenanceWindowStartTime value to set * @return the MaintenanceRedeployStatus object itself. @@ -139,7 +139,7 @@ public MaintenanceRedeployStatus withMaintenanceWindowStartTime(DateTime mainten } /** - * Get the maintenanceWindowEndTime value. + * Get end Time for the Maintenance Window. * * @return the maintenanceWindowEndTime value */ @@ -148,7 +148,7 @@ public DateTime maintenanceWindowEndTime() { } /** - * Set the maintenanceWindowEndTime value. + * Set end Time for the Maintenance Window. * * @param maintenanceWindowEndTime the maintenanceWindowEndTime value to set * @return the MaintenanceRedeployStatus object itself. @@ -159,7 +159,7 @@ public MaintenanceRedeployStatus withMaintenanceWindowEndTime(DateTime maintenan } /** - * Get the lastOperationResultCode value. + * Get the Last Maintenance Operation Result Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', 'MaintenanceCompleted'. * * @return the lastOperationResultCode value */ @@ -168,7 +168,7 @@ public MaintenanceOperationResultCodeTypes lastOperationResultCode() { } /** - * Set the lastOperationResultCode value. + * Set the Last Maintenance Operation Result Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', 'MaintenanceCompleted'. * * @param lastOperationResultCode the lastOperationResultCode value to set * @return the MaintenanceRedeployStatus object itself. @@ -179,7 +179,7 @@ public MaintenanceRedeployStatus withLastOperationResultCode(MaintenanceOperatio } /** - * Get the lastOperationMessage value. + * Get message returned for the last Maintenance Operation. * * @return the lastOperationMessage value */ @@ -188,7 +188,7 @@ public String lastOperationMessage() { } /** - * Set the lastOperationMessage value. + * Set message returned for the last Maintenance Operation. * * @param lastOperationMessage the lastOperationMessage value to set * @return the MaintenanceRedeployStatus object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/NetworkProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/NetworkProfile.java index a5bfdfb1fd4..46fe6e7dcad 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/NetworkProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/NetworkProfile.java @@ -24,7 +24,7 @@ public class NetworkProfile { private List networkInterfaces; /** - * Get the networkInterfaces value. + * Get specifies the list of resource Ids for the network interfaces associated with the virtual machine. * * @return the networkInterfaces value */ @@ -33,7 +33,7 @@ public List networkInterfaces() { } /** - * Set the networkInterfaces value. + * Set specifies the list of resource Ids for the network interfaces associated with the virtual machine. * * @param networkInterfaces the networkInterfaces value to set * @return the NetworkProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java index 0f6da66a142..a98771e5087 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java @@ -101,7 +101,7 @@ public class OSDisk { private ManagedDiskParametersInner managedDisk; /** - * Get the osType value. + * Get this property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'. * * @return the osType value */ @@ -110,7 +110,7 @@ public OperatingSystemTypes osType() { } /** - * Set the osType value. + * Set this property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'. * * @param osType the osType value to set * @return the OSDisk object itself. @@ -121,7 +121,7 @@ public OSDisk withOsType(OperatingSystemTypes osType) { } /** - * Get the encryptionSettings value. + * Get specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15. * * @return the encryptionSettings value */ @@ -130,7 +130,7 @@ public DiskEncryptionSettings encryptionSettings() { } /** - * Set the encryptionSettings value. + * Set specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15. * * @param encryptionSettings the encryptionSettings value to set * @return the OSDisk object itself. @@ -141,7 +141,7 @@ public OSDisk withEncryptionSettings(DiskEncryptionSettings encryptionSettings) } /** - * Get the name value. + * Get the disk name. * * @return the name value */ @@ -150,7 +150,7 @@ public String name() { } /** - * Set the name value. + * Set the disk name. * * @param name the name value to set * @return the OSDisk object itself. @@ -161,7 +161,7 @@ public OSDisk withName(String name) { } /** - * Get the vhd value. + * Get the virtual hard disk. * * @return the vhd value */ @@ -170,7 +170,7 @@ public VirtualHardDisk vhd() { } /** - * Set the vhd value. + * Set the virtual hard disk. * * @param vhd the vhd value to set * @return the OSDisk object itself. @@ -181,7 +181,7 @@ public OSDisk withVhd(VirtualHardDisk vhd) { } /** - * Get the image value. + * Get the source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. * * @return the image value */ @@ -190,7 +190,7 @@ public VirtualHardDisk image() { } /** - * Set the image value. + * Set the source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. * * @param image the image value to set * @return the OSDisk object itself. @@ -201,7 +201,7 @@ public OSDisk withImage(VirtualHardDisk image) { } /** - * Get the caching value. + * Get specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @return the caching value */ @@ -210,7 +210,7 @@ public CachingTypes caching() { } /** - * Set the caching value. + * Set specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @param caching the caching value to set * @return the OSDisk object itself. @@ -221,7 +221,7 @@ public OSDisk withCaching(CachingTypes caching) { } /** - * Get the writeAcceleratorEnabled value. + * Get specifies whether writeAccelerator should be enabled or disabled on the disk. * * @return the writeAcceleratorEnabled value */ @@ -230,7 +230,7 @@ public Boolean writeAcceleratorEnabled() { } /** - * Set the writeAcceleratorEnabled value. + * Set specifies whether writeAccelerator should be enabled or disabled on the disk. * * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set * @return the OSDisk object itself. @@ -241,7 +241,7 @@ public OSDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) { } /** - * Get the createOption value. + * Get specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'. * * @return the createOption value */ @@ -250,7 +250,7 @@ public DiskCreateOptionTypes createOption() { } /** - * Set the createOption value. + * Set specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'. * * @param createOption the createOption value to set * @return the OSDisk object itself. @@ -261,7 +261,7 @@ public OSDisk withCreateOption(DiskCreateOptionTypes createOption) { } /** - * Get the diskSizeGB value. + * Get specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @return the diskSizeGB value */ @@ -270,7 +270,7 @@ public Integer diskSizeGB() { } /** - * Set the diskSizeGB value. + * Set specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @param diskSizeGB the diskSizeGB value to set * @return the OSDisk object itself. @@ -281,7 +281,7 @@ public OSDisk withDiskSizeGB(Integer diskSizeGB) { } /** - * Get the managedDisk value. + * Get the managed disk parameters. * * @return the managedDisk value */ @@ -290,7 +290,7 @@ public ManagedDiskParametersInner managedDisk() { } /** - * Set the managedDisk value. + * Set the managed disk parameters. * * @param managedDisk the managedDisk value to set * @return the OSDisk object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDiskImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDiskImage.java index 32ccef8a67b..e3eda63bd4f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDiskImage.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDiskImage.java @@ -22,7 +22,7 @@ public class OSDiskImage { private OperatingSystemTypes operatingSystem; /** - * Get the operatingSystem value. + * Get the operating system of the osDiskImage. Possible values include: 'Windows', 'Linux'. * * @return the operatingSystem value */ @@ -31,7 +31,7 @@ public OperatingSystemTypes operatingSystem() { } /** - * Set the operatingSystem value. + * Set the operating system of the osDiskImage. Possible values include: 'Windows', 'Linux'. * * @param operatingSystem the operatingSystem value to set * @return the OSDiskImage object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSProfile.java index 969df52f231..a646516eec1 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSProfile.java @@ -106,7 +106,7 @@ public class OSProfile { private List secrets; /** - * Get the computerName value. + * Get specifies the host OS name of the virtual machine. <br><br> **Max-length (Windows):** 15 characters <br><br> **Max-length (Linux):** 64 characters. <br><br> For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). * * @return the computerName value */ @@ -115,7 +115,7 @@ public String computerName() { } /** - * Set the computerName value. + * Set specifies the host OS name of the virtual machine. <br><br> **Max-length (Windows):** 15 characters <br><br> **Max-length (Linux):** 64 characters. <br><br> For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). * * @param computerName the computerName value to set * @return the OSProfile object itself. @@ -126,7 +126,7 @@ public OSProfile withComputerName(String computerName) { } /** - * Get the adminUsername value. + * Get specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @return the adminUsername value */ @@ -135,7 +135,7 @@ public String adminUsername() { } /** - * Set the adminUsername value. + * Set specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @param adminUsername the adminUsername value to set * @return the OSProfile object itself. @@ -146,7 +146,7 @@ public OSProfile withAdminUsername(String adminUsername) { } /** - * Get the adminPassword value. + * Get specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password). * * @return the adminPassword value */ @@ -155,7 +155,7 @@ public String adminPassword() { } /** - * Set the adminPassword value. + * Set specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password). * * @param adminPassword the adminPassword value to set * @return the OSProfile object itself. @@ -166,7 +166,7 @@ public OSProfile withAdminPassword(String adminPassword) { } /** - * Get the customData value. + * Get specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @return the customData value */ @@ -175,7 +175,7 @@ public String customData() { } /** - * Set the customData value. + * Set specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @param customData the customData value to set * @return the OSProfile object itself. @@ -186,7 +186,7 @@ public OSProfile withCustomData(String customData) { } /** - * Get the windowsConfiguration value. + * Get specifies Windows operating system settings on the virtual machine. * * @return the windowsConfiguration value */ @@ -195,7 +195,7 @@ public WindowsConfiguration windowsConfiguration() { } /** - * Set the windowsConfiguration value. + * Set specifies Windows operating system settings on the virtual machine. * * @param windowsConfiguration the windowsConfiguration value to set * @return the OSProfile object itself. @@ -206,7 +206,7 @@ public OSProfile withWindowsConfiguration(WindowsConfiguration windowsConfigurat } /** - * Get the linuxConfiguration value. + * Get specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @return the linuxConfiguration value */ @@ -215,7 +215,7 @@ public LinuxConfiguration linuxConfiguration() { } /** - * Set the linuxConfiguration value. + * Set specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @param linuxConfiguration the linuxConfiguration value to set * @return the OSProfile object itself. @@ -226,7 +226,7 @@ public OSProfile withLinuxConfiguration(LinuxConfiguration linuxConfiguration) { } /** - * Get the secrets value. + * Get specifies set of certificates that should be installed onto the virtual machine. * * @return the secrets value */ @@ -235,7 +235,7 @@ public List secrets() { } /** - * Set the secrets value. + * Set specifies set of certificates that should be installed onto the virtual machine. * * @param secrets the secrets value to set * @return the OSProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Plan.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Plan.java index 1397ea0974f..0f235f78fa6 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Plan.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Plan.java @@ -45,7 +45,7 @@ public class Plan { private String promotionCode; /** - * Get the name value. + * Get the plan ID. * * @return the name value */ @@ -54,7 +54,7 @@ public String name() { } /** - * Set the name value. + * Set the plan ID. * * @param name the name value to set * @return the Plan object itself. @@ -65,7 +65,7 @@ public Plan withName(String name) { } /** - * Get the publisher value. + * Get the publisher ID. * * @return the publisher value */ @@ -74,7 +74,7 @@ public String publisher() { } /** - * Set the publisher value. + * Set the publisher ID. * * @param publisher the publisher value to set * @return the Plan object itself. @@ -85,7 +85,7 @@ public Plan withPublisher(String publisher) { } /** - * Get the product value. + * Get specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. * * @return the product value */ @@ -94,7 +94,7 @@ public String product() { } /** - * Set the product value. + * Set specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. * * @param product the product value to set * @return the Plan object itself. @@ -105,7 +105,7 @@ public Plan withProduct(String product) { } /** - * Get the promotionCode value. + * Get the promotion code. * * @return the promotionCode value */ @@ -114,7 +114,7 @@ public String promotionCode() { } /** - * Set the promotionCode value. + * Set the promotion code. * * @param promotionCode the promotionCode value to set * @return the Plan object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/PurchasePlan.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/PurchasePlan.java index 13989d2720f..e5558f86665 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/PurchasePlan.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/PurchasePlan.java @@ -35,7 +35,7 @@ public class PurchasePlan { private String product; /** - * Get the publisher value. + * Get the publisher ID. * * @return the publisher value */ @@ -44,7 +44,7 @@ public String publisher() { } /** - * Set the publisher value. + * Set the publisher ID. * * @param publisher the publisher value to set * @return the PurchasePlan object itself. @@ -55,7 +55,7 @@ public PurchasePlan withPublisher(String publisher) { } /** - * Get the name value. + * Get the plan ID. * * @return the name value */ @@ -64,7 +64,7 @@ public String name() { } /** - * Set the name value. + * Set the plan ID. * * @param name the name value to set * @return the PurchasePlan object itself. @@ -75,7 +75,7 @@ public PurchasePlan withName(String name) { } /** - * Get the product value. + * Get specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. * * @return the product value */ @@ -84,7 +84,7 @@ public String product() { } /** - * Set the product value. + * Set specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. * * @param product the product value to set * @return the PurchasePlan object itself. 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 index 10c52ed3898..c890083b299 100644 --- 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 @@ -23,7 +23,7 @@ public class RequestRateByIntervalInput extends LogAnalyticsInputBase { private IntervalInMins intervalLength; /** - * Get the intervalLength value. + * Get interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins'. * * @return the intervalLength value */ @@ -32,7 +32,7 @@ public IntervalInMins intervalLength() { } /** - * Set the intervalLength value. + * Set interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins'. * * @param intervalLength the intervalLength value to set * @return the RequestRateByIntervalInput object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCapabilities.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCapabilities.java index f075babef4e..ba0b34afd36 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCapabilities.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCapabilities.java @@ -27,7 +27,7 @@ public class ResourceSkuCapabilities { private String value; /** - * Get the name value. + * Get an invariant to describe the feature. * * @return the name value */ @@ -36,7 +36,7 @@ public String name() { } /** - * Get the value value. + * Get an invariant if the feature is measured by quantity. * * @return the value value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCapacity.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCapacity.java index 49d2ac70cbf..7fb16cafbbd 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCapacity.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCapacity.java @@ -40,7 +40,7 @@ public class ResourceSkuCapacity { private ResourceSkuCapacityScaleType scaleType; /** - * Get the minimum value. + * Get the minimum capacity. * * @return the minimum value */ @@ -49,7 +49,7 @@ public Long minimum() { } /** - * Get the maximum value. + * Get the maximum capacity that can be set. * * @return the maximum value */ @@ -58,7 +58,7 @@ public Long maximum() { } /** - * Get the defaultProperty value. + * Get the default capacity. * * @return the defaultProperty value */ @@ -67,7 +67,7 @@ public Long defaultProperty() { } /** - * Get the scaleType value. + * Get the scale type applicable to the sku. Possible values include: 'Automatic', 'Manual', 'None'. * * @return the scaleType value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCosts.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCosts.java index 496b2876e43..6e04c044516 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCosts.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCosts.java @@ -33,7 +33,7 @@ public class ResourceSkuCosts { private String extendedUnit; /** - * Get the meterID value. + * Get used for querying price from commerce. * * @return the meterID value */ @@ -42,7 +42,7 @@ public String meterID() { } /** - * Get the quantity value. + * Get the multiplier is needed to extend the base metered cost. * * @return the quantity value */ @@ -51,7 +51,7 @@ public Long quantity() { } /** - * Get the extendedUnit value. + * Get an invariant to show the extended unit. * * @return the extendedUnit value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuLocationInfo.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuLocationInfo.java index f858bb77738..d47f6ff9d7e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuLocationInfo.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuLocationInfo.java @@ -28,7 +28,7 @@ public class ResourceSkuLocationInfo { private List zones; /** - * Get the location value. + * Get location of the SKU. * * @return the location value */ @@ -37,7 +37,7 @@ public String location() { } /** - * Get the zones value. + * Get list of availability zones where the SKU is supported. * * @return the zones value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictionInfo.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictionInfo.java index 3e80e2e5d9d..ec57f0f2ee3 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictionInfo.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictionInfo.java @@ -28,7 +28,7 @@ public class ResourceSkuRestrictionInfo { private List zones; /** - * Get the locations value. + * Get locations where the SKU is restricted. * * @return the locations value */ @@ -37,7 +37,7 @@ public List locations() { } /** - * Get the zones value. + * Get list of availability zones where the SKU is restricted. * * @return the zones value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictions.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictions.java index 428fcbdf411..f128f1f407c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictions.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictions.java @@ -42,7 +42,7 @@ public class ResourceSkuRestrictions { private ResourceSkuRestrictionsReasonCode reasonCode; /** - * Get the type value. + * Get the type of restrictions. Possible values include: 'Location', 'Zone'. * * @return the type value */ @@ -51,7 +51,7 @@ public ResourceSkuRestrictionsType type() { } /** - * Get the values value. + * Get the value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. * * @return the values value */ @@ -60,7 +60,7 @@ public List values() { } /** - * Get the restrictionInfo value. + * Get the information about the restriction where the SKU cannot be used. * * @return the restrictionInfo value */ @@ -69,7 +69,7 @@ public ResourceSkuRestrictionInfo restrictionInfo() { } /** - * Get the reasonCode value. + * Get the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription'. * * @return the reasonCode value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollbackStatusInfo.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollbackStatusInfo.java index 5f2a1bbcba9..41ab79c76ce 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollbackStatusInfo.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollbackStatusInfo.java @@ -34,7 +34,7 @@ public class RollbackStatusInfo { private ApiError rollbackError; /** - * Get the successfullyRolledbackInstanceCount value. + * Get the number of instances which have been successfully rolled back. * * @return the successfullyRolledbackInstanceCount value */ @@ -43,7 +43,7 @@ public Integer successfullyRolledbackInstanceCount() { } /** - * Get the failedRolledbackInstanceCount value. + * Get the number of instances which failed to rollback. * * @return the failedRolledbackInstanceCount value */ @@ -52,7 +52,7 @@ public Integer failedRolledbackInstanceCount() { } /** - * Get the rollbackError value. + * Get error Details if OS rollback failed. * * @return the rollbackError value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradePolicy.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradePolicy.java index 1b11eb5fc54..3d66d15d05d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradePolicy.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradePolicy.java @@ -53,7 +53,7 @@ public class RollingUpgradePolicy { private String pauseTimeBetweenBatches; /** - * Get the maxBatchInstancePercent value. + * Get the maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%. * * @return the maxBatchInstancePercent value */ @@ -62,7 +62,7 @@ public Integer maxBatchInstancePercent() { } /** - * Set the maxBatchInstancePercent value. + * Set the maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%. * * @param maxBatchInstancePercent the maxBatchInstancePercent value to set * @return the RollingUpgradePolicy object itself. @@ -73,7 +73,7 @@ public RollingUpgradePolicy withMaxBatchInstancePercent(Integer maxBatchInstance } /** - * Get the maxUnhealthyInstancePercent value. + * Get the maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%. * * @return the maxUnhealthyInstancePercent value */ @@ -82,7 +82,7 @@ public Integer maxUnhealthyInstancePercent() { } /** - * Set the maxUnhealthyInstancePercent value. + * Set the maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%. * * @param maxUnhealthyInstancePercent the maxUnhealthyInstancePercent value to set * @return the RollingUpgradePolicy object itself. @@ -93,7 +93,7 @@ public RollingUpgradePolicy withMaxUnhealthyInstancePercent(Integer maxUnhealthy } /** - * Get the maxUnhealthyUpgradedInstancePercent value. + * Get the maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%. * * @return the maxUnhealthyUpgradedInstancePercent value */ @@ -102,7 +102,7 @@ public Integer maxUnhealthyUpgradedInstancePercent() { } /** - * Set the maxUnhealthyUpgradedInstancePercent value. + * Set the maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%. * * @param maxUnhealthyUpgradedInstancePercent the maxUnhealthyUpgradedInstancePercent value to set * @return the RollingUpgradePolicy object itself. @@ -113,7 +113,7 @@ public RollingUpgradePolicy withMaxUnhealthyUpgradedInstancePercent(Integer maxU } /** - * Get the pauseTimeBetweenBatches value. + * Get the wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S). * * @return the pauseTimeBetweenBatches value */ @@ -122,7 +122,7 @@ public String pauseTimeBetweenBatches() { } /** - * Set the pauseTimeBetweenBatches value. + * Set the wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S). * * @param pauseTimeBetweenBatches the pauseTimeBetweenBatches value to set * @return the RollingUpgradePolicy object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradeProgressInfo.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradeProgressInfo.java index 3a789fcd608..fdcfc3ba0cf 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradeProgressInfo.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradeProgressInfo.java @@ -40,7 +40,7 @@ public class RollingUpgradeProgressInfo { private Integer pendingInstanceCount; /** - * Get the successfulInstanceCount value. + * Get the number of instances that have been successfully upgraded. * * @return the successfulInstanceCount value */ @@ -49,7 +49,7 @@ public Integer successfulInstanceCount() { } /** - * Get the failedInstanceCount value. + * Get the number of instances that have failed to be upgraded successfully. * * @return the failedInstanceCount value */ @@ -58,7 +58,7 @@ public Integer failedInstanceCount() { } /** - * Get the inProgressInstanceCount value. + * Get the number of instances that are currently being upgraded. * * @return the inProgressInstanceCount value */ @@ -67,7 +67,7 @@ public Integer inProgressInstanceCount() { } /** - * Get the pendingInstanceCount value. + * Get the number of instances that have not yet begun to be upgraded. * * @return the pendingInstanceCount value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradeRunningStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradeRunningStatus.java index d90c22bf549..1bc1520c9f5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradeRunningStatus.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradeRunningStatus.java @@ -42,7 +42,7 @@ public class RollingUpgradeRunningStatus { private DateTime lastActionTime; /** - * Get the code value. + * Get code indicating the current status of the upgrade. Possible values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted'. * * @return the code value */ @@ -51,7 +51,7 @@ public RollingUpgradeStatusCode code() { } /** - * Get the startTime value. + * Get start time of the upgrade. * * @return the startTime value */ @@ -60,7 +60,7 @@ public DateTime startTime() { } /** - * Get the lastAction value. + * Get the last action performed on the rolling upgrade. Possible values include: 'Start', 'Cancel'. * * @return the lastAction value */ @@ -69,7 +69,7 @@ public RollingUpgradeActionType lastAction() { } /** - * Get the lastActionTime value. + * Get last action time of the upgrade. * * @return the lastActionTime value */ 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 index d3de580f7c8..c527a58613c 100644 --- 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 @@ -35,7 +35,7 @@ public class RunCommandInput { private List parameters; /** - * Get the commandId value. + * Get the run command id. * * @return the commandId value */ @@ -44,7 +44,7 @@ public String commandId() { } /** - * Set the commandId value. + * Set the run command id. * * @param commandId the commandId value to set * @return the RunCommandInput object itself. @@ -55,7 +55,7 @@ public RunCommandInput withCommandId(String commandId) { } /** - * Get the script value. + * Get optional. The script to be executed. When this value is given, the given script will override the default script of the command. * * @return the script value */ @@ -64,7 +64,7 @@ public List script() { } /** - * Set the script value. + * Set optional. The script to be executed. When this value is given, the given script will override the default script of the command. * * @param script the script value to set * @return the RunCommandInput object itself. @@ -75,7 +75,7 @@ public RunCommandInput withScript(List script) { } /** - * Get the parameters value. + * Get the run command parameters. * * @return the parameters value */ @@ -84,7 +84,7 @@ public List parameters() { } /** - * Set the parameters value. + * Set the run command parameters. * * @param parameters the parameters value to set * @return the RunCommandInput object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandInputParameter.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandInputParameter.java index 0ea5db5de6d..12b43520f68 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandInputParameter.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandInputParameter.java @@ -27,7 +27,7 @@ public class RunCommandInputParameter { private String value; /** - * Get the name value. + * Get the run command parameter name. * * @return the name value */ @@ -36,7 +36,7 @@ public String name() { } /** - * Set the name value. + * Set the run command parameter name. * * @param name the name value to set * @return the RunCommandInputParameter object itself. @@ -47,7 +47,7 @@ public RunCommandInputParameter withName(String name) { } /** - * Get the value value. + * Get the run command parameter value. * * @return the value value */ @@ -56,7 +56,7 @@ public String value() { } /** - * Set the value value. + * Set the run command parameter value. * * @param value the value value to set * @return the RunCommandInputParameter object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandParameterDefinition.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandParameterDefinition.java index a984919119c..488723675cb 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandParameterDefinition.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandParameterDefinition.java @@ -39,7 +39,7 @@ public class RunCommandParameterDefinition { private Boolean required; /** - * Get the name value. + * Get the run command parameter name. * * @return the name value */ @@ -48,7 +48,7 @@ public String name() { } /** - * Set the name value. + * Set the run command parameter name. * * @param name the name value to set * @return the RunCommandParameterDefinition object itself. @@ -59,7 +59,7 @@ public RunCommandParameterDefinition withName(String name) { } /** - * Get the type value. + * Get the run command parameter type. * * @return the type value */ @@ -68,7 +68,7 @@ public String type() { } /** - * Set the type value. + * Set the run command parameter type. * * @param type the type value to set * @return the RunCommandParameterDefinition object itself. @@ -79,7 +79,7 @@ public RunCommandParameterDefinition withType(String type) { } /** - * Get the defaultValue value. + * Get the run command parameter default value. * * @return the defaultValue value */ @@ -88,7 +88,7 @@ public String defaultValue() { } /** - * Set the defaultValue value. + * Set the run command parameter default value. * * @param defaultValue the defaultValue value to set * @return the RunCommandParameterDefinition object itself. @@ -99,7 +99,7 @@ public RunCommandParameterDefinition withDefaultValue(String defaultValue) { } /** - * Get the required value. + * Get the run command parameter required. * * @return the required value */ @@ -108,7 +108,7 @@ public Boolean required() { } /** - * Set the required value. + * Set the run command parameter required. * * @param required the required value to set * @return the RunCommandParameterDefinition object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandResult.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandResult.java index 99db5878d7f..4e1b188fa29 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandResult.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandResult.java @@ -23,7 +23,7 @@ public class RunCommandResult { private Object output; /** - * Get the output value. + * Get operation output data (raw JSON). * * @return the output value */ @@ -32,7 +32,7 @@ public Object output() { } /** - * Set the output value. + * Set operation output data (raw JSON). * * @param output the output value to set * @return the RunCommandResult object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Sku.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Sku.java index 248ba652d28..20193f38b01 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Sku.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Sku.java @@ -35,7 +35,7 @@ public class Sku { private Long capacity; /** - * Get the name value. + * Get the sku name. * * @return the name value */ @@ -44,7 +44,7 @@ public String name() { } /** - * Set the name value. + * Set the sku name. * * @param name the name value to set * @return the Sku object itself. @@ -55,7 +55,7 @@ public Sku withName(String name) { } /** - * Get the tier value. + * Get specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**. * * @return the tier value */ @@ -64,7 +64,7 @@ public String tier() { } /** - * Set the tier value. + * Set specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**. * * @param tier the tier value to set * @return the Sku object itself. @@ -75,7 +75,7 @@ public Sku withTier(String tier) { } /** - * Get the capacity value. + * Get specifies the number of virtual machines in the scale set. * * @return the capacity value */ @@ -84,7 +84,7 @@ public Long capacity() { } /** - * Set the capacity value. + * Set specifies the number of virtual machines in the scale set. * * @param capacity the capacity value to set * @return the Sku object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotSku.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotSku.java index 93f0786a195..a4dc674d5d5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotSku.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotSku.java @@ -28,7 +28,7 @@ public class SnapshotSku { private String tier; /** - * Get the name value. + * Get the sku name. Possible values include: 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS'. * * @return the name value */ @@ -37,7 +37,7 @@ public SnapshotStorageAccountTypes name() { } /** - * Set the name value. + * Set the sku name. Possible values include: 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS'. * * @param name the name value to set * @return the SnapshotSku object itself. @@ -48,7 +48,7 @@ public SnapshotSku withName(SnapshotStorageAccountTypes name) { } /** - * Get the tier value. + * Get the sku tier. * * @return the tier value */ 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 index 62109ab3a7d..985d7d24e4a 100644 --- 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 @@ -8,6 +8,7 @@ package com.microsoft.azure.management.compute; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; @@ -15,7 +16,7 @@ * Snapshot update resource. */ @JsonFlatten -public class SnapshotUpdate extends ResourceUpdate { +public class SnapshotUpdate { /** * the Operating System type. Possible values include: 'Windows', 'Linux'. */ @@ -39,7 +40,19 @@ public class SnapshotUpdate extends ResourceUpdate { private EncryptionSettings encryptionSettings; /** - * Get the osType value. + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The sku property. + */ + @JsonProperty(value = "sku") + private SnapshotSku sku; + + /** + * Get the Operating System type. Possible values include: 'Windows', 'Linux'. * * @return the osType value */ @@ -48,7 +61,7 @@ public OperatingSystemTypes osType() { } /** - * Set the osType value. + * Set the Operating System type. Possible values include: 'Windows', 'Linux'. * * @param osType the osType value to set * @return the SnapshotUpdate object itself. @@ -59,7 +72,7 @@ public SnapshotUpdate withOsType(OperatingSystemTypes osType) { } /** - * Get the diskSizeGB value. + * Get 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. * * @return the diskSizeGB value */ @@ -68,7 +81,7 @@ public Integer diskSizeGB() { } /** - * Set the diskSizeGB value. + * Set 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. * * @param diskSizeGB the diskSizeGB value to set * @return the SnapshotUpdate object itself. @@ -79,7 +92,7 @@ public SnapshotUpdate withDiskSizeGB(Integer diskSizeGB) { } /** - * Get the encryptionSettings value. + * Get encryption settings for disk or snapshot. * * @return the encryptionSettings value */ @@ -88,7 +101,7 @@ public EncryptionSettings encryptionSettings() { } /** - * Set the encryptionSettings value. + * Set encryption settings for disk or snapshot. * * @param encryptionSettings the encryptionSettings value to set * @return the SnapshotUpdate object itself. @@ -98,4 +111,44 @@ public SnapshotUpdate withEncryptionSettings(EncryptionSettings encryptionSettin return this; } + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the SnapshotUpdate object itself. + */ + public SnapshotUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the sku value. + * + * @return the sku value + */ + public SnapshotSku sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the SnapshotUpdate object itself. + */ + public SnapshotUpdate withSku(SnapshotSku sku) { + this.sku = sku; + return this; + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SourceVault.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SourceVault.java index 1b47488a9c7..833bdf8916c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SourceVault.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SourceVault.java @@ -22,7 +22,7 @@ public class SourceVault { private String id; /** - * Get the id value. + * Get resource Id. * * @return the id value */ @@ -31,7 +31,7 @@ public String id() { } /** - * Set the id value. + * Set resource Id. * * @param id the id value to set * @return the SourceVault object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SshConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SshConfiguration.java index c760d2688f6..29883925e5d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SshConfiguration.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SshConfiguration.java @@ -22,7 +22,7 @@ public class SshConfiguration { private List publicKeys; /** - * Get the publicKeys value. + * Get the list of SSH public keys used to authenticate with linux based VMs. * * @return the publicKeys value */ @@ -31,7 +31,7 @@ public List publicKeys() { } /** - * Set the publicKeys value. + * Set the list of SSH public keys used to authenticate with linux based VMs. * * @param publicKeys the publicKeys value to set * @return the SshConfiguration object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SshPublicKey.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SshPublicKey.java index 75213f2fbfe..40876d9b0ca 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SshPublicKey.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SshPublicKey.java @@ -34,7 +34,7 @@ public class SshPublicKey { private String keyData; /** - * Get the path value. + * Get specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys. * * @return the path value */ @@ -43,7 +43,7 @@ public String path() { } /** - * Set the path value. + * Set specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys. * * @param path the path value to set * @return the SshPublicKey object itself. @@ -54,7 +54,7 @@ public SshPublicKey withPath(String path) { } /** - * Get the keyData value. + * Get sSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @return the keyData value */ @@ -63,7 +63,7 @@ public String keyData() { } /** - * Set the keyData value. + * Set sSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @param keyData the keyData value to set * @return the SshPublicKey object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageProfile.java index 35b4d56e85a..0d2e1af9533 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageProfile.java @@ -45,7 +45,7 @@ public class StorageProfile { private List dataDisks; /** - * Get the imageReference value. + * Get specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. * * @return the imageReference value */ @@ -54,7 +54,7 @@ public ImageReferenceInner imageReference() { } /** - * Set the imageReference value. + * Set specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. * * @param imageReference the imageReference value to set * @return the StorageProfile object itself. @@ -65,7 +65,7 @@ public StorageProfile withImageReference(ImageReferenceInner imageReference) { } /** - * Get the osDisk value. + * Get specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @return the osDisk value */ @@ -74,7 +74,7 @@ public OSDisk osDisk() { } /** - * Set the osDisk value. + * Set specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @param osDisk the osDisk value to set * @return the StorageProfile object itself. @@ -85,7 +85,7 @@ public StorageProfile withOsDisk(OSDisk osDisk) { } /** - * Get the dataDisks value. + * Get specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @return the dataDisks value */ @@ -94,7 +94,7 @@ public List dataDisks() { } /** - * Set the dataDisks value. + * Set specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @param dataDisks the dataDisks value to set * @return the StorageProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SubResourceReadOnly.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SubResourceReadOnly.java index 6220622f1b2..7e7864bed74 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SubResourceReadOnly.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SubResourceReadOnly.java @@ -21,7 +21,7 @@ public class SubResourceReadOnly { private String id; /** - * Get the id value. + * Get resource Id. * * @return the id value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpdateResource.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpdateResource.java index 17950d877ad..c8a4112c1ef 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpdateResource.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpdateResource.java @@ -22,7 +22,7 @@ public class UpdateResource { private Map tags; /** - * Get the tags value. + * Get resource tags. * * @return the tags value */ @@ -31,7 +31,7 @@ public Map tags() { } /** - * Set the tags value. + * Set resource tags. * * @param tags the tags value to set * @return the UpdateResource object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java index 3803354d9c2..040c5a3fa5d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java @@ -53,7 +53,7 @@ public class UpgradeOperationHistoricalStatusInfoProperties { private RollbackStatusInfo rollbackInfo; /** - * Get the runningStatus value. + * Get information about the overall status of the upgrade operation. * * @return the runningStatus value */ @@ -62,7 +62,7 @@ public UpgradeOperationHistoryStatus runningStatus() { } /** - * Get the progress value. + * Get counts of the VM's in each state. * * @return the progress value */ @@ -71,7 +71,7 @@ public RollingUpgradeProgressInfo progress() { } /** - * Get the error value. + * Get error Details for this upgrade if there are any. * * @return the error value */ @@ -80,7 +80,7 @@ public ApiError error() { } /** - * Get the startedBy value. + * Get invoker of the Upgrade Operation. Possible values include: 'Unknown', 'User', 'Platform'. * * @return the startedBy value */ @@ -89,7 +89,7 @@ public UpgradeOperationInvoker startedBy() { } /** - * Get the targetImageReference value. + * Get image Reference details. * * @return the targetImageReference value */ @@ -98,7 +98,7 @@ public ImageReferenceInner targetImageReference() { } /** - * Get the rollbackInfo value. + * Get information about OS rollback if performed. * * @return the rollbackInfo value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoryStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoryStatus.java index 05246efb3db..e098a2e09c1 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoryStatus.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoryStatus.java @@ -35,7 +35,7 @@ public class UpgradeOperationHistoryStatus { private DateTime endTime; /** - * Get the code value. + * Get code indicating the current status of the upgrade. Possible values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted'. * * @return the code value */ @@ -44,7 +44,7 @@ public UpgradeState code() { } /** - * Get the startTime value. + * Get start time of the upgrade. * * @return the startTime value */ @@ -53,7 +53,7 @@ public DateTime startTime() { } /** - * Get the endTime value. + * Get end time of the upgrade. * * @return the endTime value */ 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 38179448da0..97e16ae4a37 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 @@ -47,7 +47,7 @@ public class UpgradePolicy { private AutoOSUpgradePolicy autoOSUpgradePolicy; /** - * Get the mode value. + * Get specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time. Possible values include: 'Automatic', 'Manual', 'Rolling'. * * @return the mode value */ @@ -56,7 +56,7 @@ public UpgradeMode mode() { } /** - * Set the mode value. + * Set specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time. Possible values include: 'Automatic', 'Manual', 'Rolling'. * * @param mode the mode value to set * @return the UpgradePolicy object itself. @@ -67,7 +67,7 @@ public UpgradePolicy withMode(UpgradeMode mode) { } /** - * Get the rollingUpgradePolicy value. + * Get the configuration parameters used while performing a rolling upgrade. * * @return the rollingUpgradePolicy value */ @@ -76,7 +76,7 @@ public RollingUpgradePolicy rollingUpgradePolicy() { } /** - * Set the rollingUpgradePolicy value. + * Set the configuration parameters used while performing a rolling upgrade. * * @param rollingUpgradePolicy the rollingUpgradePolicy value to set * @return the UpgradePolicy object itself. @@ -87,7 +87,7 @@ public UpgradePolicy withRollingUpgradePolicy(RollingUpgradePolicy rollingUpgrad } /** - * Get the automaticOSUpgrade value. + * Get whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the image becomes available. * * @return the automaticOSUpgrade value */ @@ -96,7 +96,7 @@ public Boolean automaticOSUpgrade() { } /** - * Set the automaticOSUpgrade value. + * Set whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the image becomes available. * * @param automaticOSUpgrade the automaticOSUpgrade value to set * @return the UpgradePolicy object itself. @@ -107,7 +107,7 @@ public UpgradePolicy withAutomaticOSUpgrade(Boolean automaticOSUpgrade) { } /** - * Get the autoOSUpgradePolicy value. + * Get configuration parameters used for performing automatic OS Upgrade. * * @return the autoOSUpgradePolicy value */ @@ -116,7 +116,7 @@ public AutoOSUpgradePolicy autoOSUpgradePolicy() { } /** - * Set the autoOSUpgradePolicy value. + * Set configuration parameters used for performing automatic OS Upgrade. * * @param autoOSUpgradePolicy the autoOSUpgradePolicy value to set * @return the UpgradePolicy object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UsageName.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UsageName.java index e70e4eb272d..b01d4504d84 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UsageName.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UsageName.java @@ -27,7 +27,7 @@ public class UsageName { private String localizedValue; /** - * Get the value value. + * Get the name of the resource. * * @return the value value */ @@ -36,7 +36,7 @@ public String value() { } /** - * Set the value value. + * Set the name of the resource. * * @param value the value value to set * @return the UsageName object itself. @@ -47,7 +47,7 @@ public UsageName withValue(String value) { } /** - * Get the localizedValue value. + * Get the localized name of the resource. * * @return the localizedValue value */ @@ -56,7 +56,7 @@ public String localizedValue() { } /** - * Set the localizedValue value. + * Set the localized name of the resource. * * @param localizedValue the localizedValue value to set * @return the UsageName object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VaultCertificate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VaultCertificate.java index 52ca9c4d4e0..99105b96fbd 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VaultCertificate.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VaultCertificate.java @@ -43,7 +43,7 @@ public class VaultCertificate { private String certificateStore; /** - * Get the certificateUrl value. + * Get this is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>}. * * @return the certificateUrl value */ @@ -52,7 +52,7 @@ public String certificateUrl() { } /** - * Set the certificateUrl value. + * Set this is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>}. * * @param certificateUrl the certificateUrl value to set * @return the VaultCertificate object itself. @@ -63,7 +63,7 @@ public VaultCertificate withCertificateUrl(String certificateUrl) { } /** - * Get the certificateStore value. + * Get for Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbpring>.prv for private key. Both of these files are .pem formatted. * * @return the certificateStore value */ @@ -72,7 +72,7 @@ public String certificateStore() { } /** - * Set the certificateStore value. + * Set for Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbpring>.prv for private key. Both of these files are .pem formatted. * * @param certificateStore the certificateStore value to set * @return the VaultCertificate object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VaultSecretGroup.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VaultSecretGroup.java index ab528694c0a..3f12d7ca2a4 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VaultSecretGroup.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VaultSecretGroup.java @@ -31,7 +31,7 @@ public class VaultSecretGroup { private List vaultCertificates; /** - * Get the sourceVault value. + * Get the relative URL of the Key Vault containing all of the certificates in VaultCertificates. * * @return the sourceVault value */ @@ -40,7 +40,7 @@ public SubResource sourceVault() { } /** - * Set the sourceVault value. + * Set the relative URL of the Key Vault containing all of the certificates in VaultCertificates. * * @param sourceVault the sourceVault value to set * @return the VaultSecretGroup object itself. @@ -51,7 +51,7 @@ public VaultSecretGroup withSourceVault(SubResource sourceVault) { } /** - * Get the vaultCertificates value. + * Get the list of key vault references in SourceVault which contain certificates. * * @return the vaultCertificates value */ @@ -60,7 +60,7 @@ public List vaultCertificates() { } /** - * Set the vaultCertificates value. + * Set the list of key vault references in SourceVault which contain certificates. * * @param vaultCertificates the vaultCertificates value to set * @return the VaultSecretGroup object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualHardDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualHardDisk.java index b4cde002bf2..1f3c6b7d246 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualHardDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualHardDisk.java @@ -21,7 +21,7 @@ public class VirtualHardDisk { private String uri; /** - * Get the uri value. + * Get specifies the virtual hard disk's uri. * * @return the uri value */ @@ -30,7 +30,7 @@ public String uri() { } /** - * Set the uri value. + * Set specifies the virtual hard disk's uri. * * @param uri the uri value to set * @return the VirtualHardDisk object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineAgentInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineAgentInstanceView.java index 452708005d7..56d76d72b40 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineAgentInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineAgentInstanceView.java @@ -35,7 +35,7 @@ public class VirtualMachineAgentInstanceView { private List statuses; /** - * Get the vmAgentVersion value. + * Get the VM Agent full version. * * @return the vmAgentVersion value */ @@ -44,7 +44,7 @@ public String vmAgentVersion() { } /** - * Set the vmAgentVersion value. + * Set the VM Agent full version. * * @param vmAgentVersion the vmAgentVersion value to set * @return the VirtualMachineAgentInstanceView object itself. @@ -55,7 +55,7 @@ public VirtualMachineAgentInstanceView withVmAgentVersion(String vmAgentVersion) } /** - * Get the extensionHandlers value. + * Get the virtual machine extension handler instance view. * * @return the extensionHandlers value */ @@ -64,7 +64,7 @@ public List extensionHandlers() { } /** - * Set the extensionHandlers value. + * Set the virtual machine extension handler instance view. * * @param extensionHandlers the extensionHandlers value to set * @return the VirtualMachineAgentInstanceView object itself. @@ -75,7 +75,7 @@ public VirtualMachineAgentInstanceView withExtensionHandlers(List statuses() { } /** - * Set the statuses value. + * Set the resource status information. * * @param statuses the statuses value to set * @return the VirtualMachineAgentInstanceView object itself. 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 index d42936a017d..c0b8e472a31 100644 --- 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 @@ -34,7 +34,7 @@ public class VirtualMachineCaptureParameters { private boolean overwriteVhds; /** - * Get the vhdPrefix value. + * Get the captured virtual hard disk's name prefix. * * @return the vhdPrefix value */ @@ -43,7 +43,7 @@ public String vhdPrefix() { } /** - * Set the vhdPrefix value. + * Set the captured virtual hard disk's name prefix. * * @param vhdPrefix the vhdPrefix value to set * @return the VirtualMachineCaptureParameters object itself. @@ -54,7 +54,7 @@ public VirtualMachineCaptureParameters withVhdPrefix(String vhdPrefix) { } /** - * Get the destinationContainerName value. + * Get the destination container name. * * @return the destinationContainerName value */ @@ -63,7 +63,7 @@ public String destinationContainerName() { } /** - * Set the destinationContainerName value. + * Set the destination container name. * * @param destinationContainerName the destinationContainerName value to set * @return the VirtualMachineCaptureParameters object itself. @@ -74,7 +74,7 @@ public VirtualMachineCaptureParameters withDestinationContainerName(String desti } /** - * Get the overwriteVhds value. + * Get specifies whether to overwrite the destination virtual hard disk, in case of conflict. * * @return the overwriteVhds value */ @@ -83,7 +83,7 @@ public boolean overwriteVhds() { } /** - * Set the overwriteVhds value. + * Set specifies whether to overwrite the destination virtual hard disk, in case of conflict. * * @param overwriteVhds the overwriteVhds value to set * @return the VirtualMachineCaptureParameters object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionHandlerInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionHandlerInstanceView.java index 8940b5ec06f..022efb9102a 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionHandlerInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionHandlerInstanceView.java @@ -35,7 +35,7 @@ public class VirtualMachineExtensionHandlerInstanceView { private InstanceViewStatusInner status; /** - * Get the type value. + * Get specifies the type of the extension; an example is "CustomScriptExtension". * * @return the type value */ @@ -44,7 +44,7 @@ public String type() { } /** - * Set the type value. + * Set specifies the type of the extension; an example is "CustomScriptExtension". * * @param type the type value to set * @return the VirtualMachineExtensionHandlerInstanceView object itself. @@ -55,7 +55,7 @@ public VirtualMachineExtensionHandlerInstanceView withType(String type) { } /** - * Get the typeHandlerVersion value. + * Get specifies the version of the script handler. * * @return the typeHandlerVersion value */ @@ -64,7 +64,7 @@ public String typeHandlerVersion() { } /** - * Set the typeHandlerVersion value. + * Set specifies the version of the script handler. * * @param typeHandlerVersion the typeHandlerVersion value to set * @return the VirtualMachineExtensionHandlerInstanceView object itself. @@ -75,7 +75,7 @@ public VirtualMachineExtensionHandlerInstanceView withTypeHandlerVersion(String } /** - * Get the status value. + * Get the extension handler status. * * @return the status value */ @@ -84,7 +84,7 @@ public InstanceViewStatusInner status() { } /** - * Set the status value. + * Set the extension handler status. * * @param status the status value to set * @return the VirtualMachineExtensionHandlerInstanceView object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionInstanceView.java index ea26c9a4262..f2d570a6a4c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionInstanceView.java @@ -48,7 +48,7 @@ public class VirtualMachineExtensionInstanceView { private List statuses; /** - * Get the name value. + * Get the virtual machine extension name. * * @return the name value */ @@ -57,7 +57,7 @@ public String name() { } /** - * Set the name value. + * Set the virtual machine extension name. * * @param name the name value to set * @return the VirtualMachineExtensionInstanceView object itself. @@ -68,7 +68,7 @@ public VirtualMachineExtensionInstanceView withName(String name) { } /** - * Get the type value. + * Get specifies the type of the extension; an example is "CustomScriptExtension". * * @return the type value */ @@ -77,7 +77,7 @@ public String type() { } /** - * Set the type value. + * Set specifies the type of the extension; an example is "CustomScriptExtension". * * @param type the type value to set * @return the VirtualMachineExtensionInstanceView object itself. @@ -88,7 +88,7 @@ public VirtualMachineExtensionInstanceView withType(String type) { } /** - * Get the typeHandlerVersion value. + * Get specifies the version of the script handler. * * @return the typeHandlerVersion value */ @@ -97,7 +97,7 @@ public String typeHandlerVersion() { } /** - * Set the typeHandlerVersion value. + * Set specifies the version of the script handler. * * @param typeHandlerVersion the typeHandlerVersion value to set * @return the VirtualMachineExtensionInstanceView object itself. @@ -108,7 +108,7 @@ public VirtualMachineExtensionInstanceView withTypeHandlerVersion(String typeHan } /** - * Get the substatuses value. + * Get the resource status information. * * @return the substatuses value */ @@ -117,7 +117,7 @@ public List substatuses() { } /** - * Set the substatuses value. + * Set the resource status information. * * @param substatuses the substatuses value to set * @return the VirtualMachineExtensionInstanceView object itself. @@ -128,7 +128,7 @@ public VirtualMachineExtensionInstanceView withSubstatuses(List statuses() { } /** - * Set the statuses value. + * Set the resource status information. * * @param statuses the statuses value to set * @return the VirtualMachineExtensionInstanceView object itself. 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 index adadbdb77ba..4b9f6a72cd1 100644 --- 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 @@ -65,7 +65,7 @@ public class VirtualMachineExtensionUpdate extends UpdateResource { private Object protectedSettings; /** - * Get the forceUpdateTag value. + * Get how the extension handler should be forced to update even if the extension configuration has not changed. * * @return the forceUpdateTag value */ @@ -74,7 +74,7 @@ public String forceUpdateTag() { } /** - * Set the forceUpdateTag value. + * Set how the extension handler should be forced to update even if the extension configuration has not changed. * * @param forceUpdateTag the forceUpdateTag value to set * @return the VirtualMachineExtensionUpdate object itself. @@ -85,7 +85,7 @@ public VirtualMachineExtensionUpdate withForceUpdateTag(String forceUpdateTag) { } /** - * Get the publisher value. + * Get the name of the extension handler publisher. * * @return the publisher value */ @@ -94,7 +94,7 @@ public String publisher() { } /** - * Set the publisher value. + * Set the name of the extension handler publisher. * * @param publisher the publisher value to set * @return the VirtualMachineExtensionUpdate object itself. @@ -105,7 +105,7 @@ public VirtualMachineExtensionUpdate withPublisher(String publisher) { } /** - * Get the type value. + * Get specifies the type of the extension; an example is "CustomScriptExtension". * * @return the type value */ @@ -114,7 +114,7 @@ public String type() { } /** - * Set the type value. + * Set specifies the type of the extension; an example is "CustomScriptExtension". * * @param type the type value to set * @return the VirtualMachineExtensionUpdate object itself. @@ -125,7 +125,7 @@ public VirtualMachineExtensionUpdate withType(String type) { } /** - * Get the typeHandlerVersion value. + * Get specifies the version of the script handler. * * @return the typeHandlerVersion value */ @@ -134,7 +134,7 @@ public String typeHandlerVersion() { } /** - * Set the typeHandlerVersion value. + * Set specifies the version of the script handler. * * @param typeHandlerVersion the typeHandlerVersion value to set * @return the VirtualMachineExtensionUpdate object itself. @@ -145,7 +145,7 @@ public VirtualMachineExtensionUpdate withTypeHandlerVersion(String typeHandlerVe } /** - * Get the autoUpgradeMinorVersion value. + * Get 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. * * @return the autoUpgradeMinorVersion value */ @@ -154,7 +154,7 @@ public Boolean autoUpgradeMinorVersion() { } /** - * Set the autoUpgradeMinorVersion value. + * Set 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. * * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set * @return the VirtualMachineExtensionUpdate object itself. @@ -165,7 +165,7 @@ public VirtualMachineExtensionUpdate withAutoUpgradeMinorVersion(Boolean autoUpg } /** - * Get the settings value. + * Get json formatted public settings for the extension. * * @return the settings value */ @@ -174,7 +174,7 @@ public Object settings() { } /** - * Set the settings value. + * Set json formatted public settings for the extension. * * @param settings the settings value to set * @return the VirtualMachineExtensionUpdate object itself. @@ -185,7 +185,7 @@ public VirtualMachineExtensionUpdate withSettings(Object settings) { } /** - * Get the protectedSettings value. + * Get the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. * * @return the protectedSettings value */ @@ -194,7 +194,7 @@ public Object protectedSettings() { } /** - * Set the protectedSettings value. + * Set the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. * * @param protectedSettings the protectedSettings value to set * @return the VirtualMachineExtensionUpdate object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineHealthStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineHealthStatus.java index e98e8986939..174230ee83d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineHealthStatus.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineHealthStatus.java @@ -22,7 +22,7 @@ public class VirtualMachineHealthStatus { private InstanceViewStatusInner status; /** - * Get the status value. + * Get the health status information for the VM. * * @return the status value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineIdentity.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineIdentity.java index 46608449473..201e6a5b06c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineIdentity.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineIdentity.java @@ -49,7 +49,7 @@ public class VirtualMachineIdentity { private List identityIds; /** - * Get the principalId value. + * Get the principal id of virtual machine identity. This property will only be provided for a system assigned identity. * * @return the principalId value */ @@ -58,7 +58,7 @@ public String principalId() { } /** - * Get the tenantId value. + * Get the tenant id associated with the virtual machine. This property will only be provided for a system assigned identity. * * @return the tenantId value */ @@ -67,7 +67,7 @@ public String tenantId() { } /** - * Get the type value. + * Get the type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. * * @return the type value */ @@ -76,7 +76,7 @@ public ResourceIdentityType type() { } /** - * Set the type value. + * Set the type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. * * @param type the type value to set * @return the VirtualMachineIdentity object itself. @@ -87,7 +87,7 @@ public VirtualMachineIdentity withType(ResourceIdentityType type) { } /** - * Get the identityIds value. + * Get the list of user identities associated with the Virtual Machine. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. * * @return the identityIds value */ @@ -96,7 +96,7 @@ public List identityIds() { } /** - * Set the identityIds value. + * Set the list of user identities associated with the Virtual Machine. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. * * @param identityIds the identityIds value to set * @return the VirtualMachineIdentity object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetDataDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetDataDisk.java index a4d5b44bb52..6ec8dde1e6b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetDataDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetDataDisk.java @@ -67,7 +67,7 @@ public class VirtualMachineScaleSetDataDisk { private VirtualMachineScaleSetManagedDiskParameters managedDisk; /** - * Get the name value. + * Get the disk name. * * @return the name value */ @@ -76,7 +76,7 @@ public String name() { } /** - * Set the name value. + * Set the disk name. * * @param name the name value to set * @return the VirtualMachineScaleSetDataDisk object itself. @@ -87,7 +87,7 @@ public VirtualMachineScaleSetDataDisk withName(String name) { } /** - * Get the lun value. + * Get specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. * * @return the lun value */ @@ -96,7 +96,7 @@ public int lun() { } /** - * Set the lun value. + * Set specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. * * @param lun the lun value to set * @return the VirtualMachineScaleSetDataDisk object itself. @@ -107,7 +107,7 @@ public VirtualMachineScaleSetDataDisk withLun(int lun) { } /** - * Get the caching value. + * Get specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @return the caching value */ @@ -116,7 +116,7 @@ public CachingTypes caching() { } /** - * Set the caching value. + * Set specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @param caching the caching value to set * @return the VirtualMachineScaleSetDataDisk object itself. @@ -127,7 +127,7 @@ public VirtualMachineScaleSetDataDisk withCaching(CachingTypes caching) { } /** - * Get the writeAcceleratorEnabled value. + * Get specifies whether writeAccelerator should be enabled or disabled on the disk. * * @return the writeAcceleratorEnabled value */ @@ -136,7 +136,7 @@ public Boolean writeAcceleratorEnabled() { } /** - * Set the writeAcceleratorEnabled value. + * Set specifies whether writeAccelerator should be enabled or disabled on the disk. * * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set * @return the VirtualMachineScaleSetDataDisk object itself. @@ -147,7 +147,7 @@ public VirtualMachineScaleSetDataDisk withWriteAcceleratorEnabled(Boolean writeA } /** - * Get the createOption value. + * Get the create option. Possible values include: 'FromImage', 'Empty', 'Attach'. * * @return the createOption value */ @@ -156,7 +156,7 @@ public DiskCreateOptionTypes createOption() { } /** - * Set the createOption value. + * Set the create option. Possible values include: 'FromImage', 'Empty', 'Attach'. * * @param createOption the createOption value to set * @return the VirtualMachineScaleSetDataDisk object itself. @@ -167,7 +167,7 @@ public VirtualMachineScaleSetDataDisk withCreateOption(DiskCreateOptionTypes cre } /** - * Get the diskSizeGB value. + * Get specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @return the diskSizeGB value */ @@ -176,7 +176,7 @@ public Integer diskSizeGB() { } /** - * Set the diskSizeGB value. + * Set specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @param diskSizeGB the diskSizeGB value to set * @return the VirtualMachineScaleSetDataDisk object itself. @@ -187,7 +187,7 @@ public VirtualMachineScaleSetDataDisk withDiskSizeGB(Integer diskSizeGB) { } /** - * Get the managedDisk value. + * Get the managed disk parameters. * * @return the managedDisk value */ @@ -196,7 +196,7 @@ public VirtualMachineScaleSetManagedDiskParameters managedDisk() { } /** - * Set the managedDisk value. + * Set the managed disk parameters. * * @param managedDisk the managedDisk value to set * @return the VirtualMachineScaleSetDataDisk object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetExtensionProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetExtensionProfile.java index 8eef3206af5..8282c3594ce 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetExtensionProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetExtensionProfile.java @@ -23,7 +23,7 @@ public class VirtualMachineScaleSetExtensionProfile { private List extensions; /** - * Get the extensions value. + * Get the virtual machine scale set child extension resources. * * @return the extensions value */ @@ -32,7 +32,7 @@ public List extensions() { } /** - * Set the extensions value. + * Set the virtual machine scale set child extension resources. * * @param extensions the extensions value to set * @return the VirtualMachineScaleSetExtensionProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetIdentity.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetIdentity.java index 1c058e7416b..9bbb8d29542 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetIdentity.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetIdentity.java @@ -49,7 +49,7 @@ public class VirtualMachineScaleSetIdentity { private List identityIds; /** - * Get the principalId value. + * Get the principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity. * * @return the principalId value */ @@ -58,7 +58,7 @@ public String principalId() { } /** - * Get the tenantId value. + * Get the tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity. * * @return the tenantId value */ @@ -67,7 +67,7 @@ public String tenantId() { } /** - * Get the type value. + * Get the type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. * * @return the type value */ @@ -76,7 +76,7 @@ public ResourceIdentityType type() { } /** - * Set the type value. + * Set the type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. * * @param type the type value to set * @return the VirtualMachineScaleSetIdentity object itself. @@ -87,7 +87,7 @@ public VirtualMachineScaleSetIdentity withType(ResourceIdentityType type) { } /** - * Get the identityIds value. + * Get the list of user identities associated with the virtual machine scale set. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. * * @return the identityIds value */ @@ -96,7 +96,7 @@ public List identityIds() { } /** - * Set the identityIds value. + * Set the list of user identities associated with the virtual machine scale set. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. * * @param identityIds the identityIds value to set * @return the VirtualMachineScaleSetIdentity object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetInstanceViewStatusesSummary.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetInstanceViewStatusesSummary.java index 3277a519652..ca07cc5bf1e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetInstanceViewStatusesSummary.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetInstanceViewStatusesSummary.java @@ -23,7 +23,7 @@ public class VirtualMachineScaleSetInstanceViewStatusesSummary { private List statusesSummary; /** - * Get the statusesSummary value. + * Get the extensions information. * * @return the statusesSummary value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetManagedDiskParameters.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetManagedDiskParameters.java index 5bf72ce6af2..944820d6050 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetManagedDiskParameters.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetManagedDiskParameters.java @@ -23,7 +23,7 @@ public class VirtualMachineScaleSetManagedDiskParameters { private StorageAccountTypes storageAccountType; /** - * Get the storageAccountType value. + * Get specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @return the storageAccountType value */ @@ -32,7 +32,7 @@ public StorageAccountTypes storageAccountType() { } /** - * Set the storageAccountType value. + * Set specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @param storageAccountType the storageAccountType value to set * @return the VirtualMachineScaleSetManagedDiskParameters object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetNetworkConfigurationDnsSettings.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetNetworkConfigurationDnsSettings.java index 3e1f067a16d..2640c7de4be 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetNetworkConfigurationDnsSettings.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetNetworkConfigurationDnsSettings.java @@ -23,7 +23,7 @@ public class VirtualMachineScaleSetNetworkConfigurationDnsSettings { private List dnsServers; /** - * Get the dnsServers value. + * Get list of DNS servers IP addresses. * * @return the dnsServers value */ @@ -32,7 +32,7 @@ public List dnsServers() { } /** - * Set the dnsServers value. + * Set list of DNS servers IP addresses. * * @param dnsServers the dnsServers value to set * @return the VirtualMachineScaleSetNetworkConfigurationDnsSettings object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetNetworkProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetNetworkProfile.java index 605bdde500d..d6c40407609 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetNetworkProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetNetworkProfile.java @@ -32,7 +32,7 @@ public class VirtualMachineScaleSetNetworkProfile { private List networkInterfaceConfigurations; /** - * Get the healthProbe value. + * Get a reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. * * @return the healthProbe value */ @@ -41,7 +41,7 @@ public ApiEntityReference healthProbe() { } /** - * Set the healthProbe value. + * Set a reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. * * @param healthProbe the healthProbe value to set * @return the VirtualMachineScaleSetNetworkProfile object itself. @@ -52,7 +52,7 @@ public VirtualMachineScaleSetNetworkProfile withHealthProbe(ApiEntityReference h } /** - * Get the networkInterfaceConfigurations value. + * Get the list of network configurations. * * @return the networkInterfaceConfigurations value */ @@ -61,7 +61,7 @@ public List networkInterfaceCon } /** - * Set the networkInterfaceConfigurations value. + * Set the list of network configurations. * * @param networkInterfaceConfigurations the networkInterfaceConfigurations value to set * @return the VirtualMachineScaleSetNetworkProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java index 34b6840c803..8671922827d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java @@ -81,7 +81,7 @@ public class VirtualMachineScaleSetOSDisk { private VirtualMachineScaleSetManagedDiskParameters managedDisk; /** - * Get the name value. + * Get the disk name. * * @return the name value */ @@ -90,7 +90,7 @@ public String name() { } /** - * Set the name value. + * Set the disk name. * * @param name the name value to set * @return the VirtualMachineScaleSetOSDisk object itself. @@ -101,7 +101,7 @@ public VirtualMachineScaleSetOSDisk withName(String name) { } /** - * Get the caching value. + * Get specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @return the caching value */ @@ -110,7 +110,7 @@ public CachingTypes caching() { } /** - * Set the caching value. + * Set specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @param caching the caching value to set * @return the VirtualMachineScaleSetOSDisk object itself. @@ -121,7 +121,7 @@ public VirtualMachineScaleSetOSDisk withCaching(CachingTypes caching) { } /** - * Get the writeAcceleratorEnabled value. + * Get specifies whether writeAccelerator should be enabled or disabled on the disk. * * @return the writeAcceleratorEnabled value */ @@ -130,7 +130,7 @@ public Boolean writeAcceleratorEnabled() { } /** - * Set the writeAcceleratorEnabled value. + * Set specifies whether writeAccelerator should be enabled or disabled on the disk. * * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set * @return the VirtualMachineScaleSetOSDisk object itself. @@ -141,7 +141,7 @@ public VirtualMachineScaleSetOSDisk withWriteAcceleratorEnabled(Boolean writeAcc } /** - * Get the createOption value. + * Get specifies how the virtual machines in the scale set should be created.<br><br> The only allowed value is: **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'. * * @return the createOption value */ @@ -150,7 +150,7 @@ public DiskCreateOptionTypes createOption() { } /** - * Set the createOption value. + * Set specifies how the virtual machines in the scale set should be created.<br><br> The only allowed value is: **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'. * * @param createOption the createOption value to set * @return the VirtualMachineScaleSetOSDisk object itself. @@ -161,7 +161,7 @@ public VirtualMachineScaleSetOSDisk withCreateOption(DiskCreateOptionTypes creat } /** - * Get the osType value. + * Get this property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'. * * @return the osType value */ @@ -170,7 +170,7 @@ public OperatingSystemTypes osType() { } /** - * Set the osType value. + * Set this property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'. * * @param osType the osType value to set * @return the VirtualMachineScaleSetOSDisk object itself. @@ -181,7 +181,7 @@ public VirtualMachineScaleSetOSDisk withOsType(OperatingSystemTypes osType) { } /** - * Get the image value. + * Get specifies information about the unmanaged user image to base the scale set on. * * @return the image value */ @@ -190,7 +190,7 @@ public VirtualHardDisk image() { } /** - * Set the image value. + * Set specifies information about the unmanaged user image to base the scale set on. * * @param image the image value to set * @return the VirtualMachineScaleSetOSDisk object itself. @@ -201,7 +201,7 @@ public VirtualMachineScaleSetOSDisk withImage(VirtualHardDisk image) { } /** - * Get the vhdContainers value. + * Get specifies the container urls that are used to store operating system disks for the scale set. * * @return the vhdContainers value */ @@ -210,7 +210,7 @@ public List vhdContainers() { } /** - * Set the vhdContainers value. + * Set specifies the container urls that are used to store operating system disks for the scale set. * * @param vhdContainers the vhdContainers value to set * @return the VirtualMachineScaleSetOSDisk object itself. @@ -221,7 +221,7 @@ public VirtualMachineScaleSetOSDisk withVhdContainers(List vhdContainers } /** - * Get the managedDisk value. + * Get the managed disk parameters. * * @return the managedDisk value */ @@ -230,7 +230,7 @@ public VirtualMachineScaleSetManagedDiskParameters managedDisk() { } /** - * Set the managedDisk value. + * Set the managed disk parameters. * * @param managedDisk the managedDisk value to set * @return the VirtualMachineScaleSetOSDisk object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSProfile.java index 65447a0db40..89534cd297b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSProfile.java @@ -102,7 +102,7 @@ public class VirtualMachineScaleSetOSProfile { private List secrets; /** - * Get the computerNamePrefix value. + * Get specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long. * * @return the computerNamePrefix value */ @@ -111,7 +111,7 @@ public String computerNamePrefix() { } /** - * Set the computerNamePrefix value. + * Set specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long. * * @param computerNamePrefix the computerNamePrefix value to set * @return the VirtualMachineScaleSetOSProfile object itself. @@ -122,7 +122,7 @@ public VirtualMachineScaleSetOSProfile withComputerNamePrefix(String computerNam } /** - * Get the adminUsername value. + * Get specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @return the adminUsername value */ @@ -131,7 +131,7 @@ public String adminUsername() { } /** - * Set the adminUsername value. + * Set specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @param adminUsername the adminUsername value to set * @return the VirtualMachineScaleSetOSProfile object itself. @@ -142,7 +142,7 @@ public VirtualMachineScaleSetOSProfile withAdminUsername(String adminUsername) { } /** - * Get the adminPassword value. + * Get specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password). * * @return the adminPassword value */ @@ -151,7 +151,7 @@ public String adminPassword() { } /** - * Set the adminPassword value. + * Set specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password). * * @param adminPassword the adminPassword value to set * @return the VirtualMachineScaleSetOSProfile object itself. @@ -162,7 +162,7 @@ public VirtualMachineScaleSetOSProfile withAdminPassword(String adminPassword) { } /** - * Get the customData value. + * Get specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @return the customData value */ @@ -171,7 +171,7 @@ public String customData() { } /** - * Set the customData value. + * Set specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @param customData the customData value to set * @return the VirtualMachineScaleSetOSProfile object itself. @@ -182,7 +182,7 @@ public VirtualMachineScaleSetOSProfile withCustomData(String customData) { } /** - * Get the windowsConfiguration value. + * Get specifies Windows operating system settings on the virtual machine. * * @return the windowsConfiguration value */ @@ -191,7 +191,7 @@ public WindowsConfiguration windowsConfiguration() { } /** - * Set the windowsConfiguration value. + * Set specifies Windows operating system settings on the virtual machine. * * @param windowsConfiguration the windowsConfiguration value to set * @return the VirtualMachineScaleSetOSProfile object itself. @@ -202,7 +202,7 @@ public VirtualMachineScaleSetOSProfile withWindowsConfiguration(WindowsConfigura } /** - * Get the linuxConfiguration value. + * Get specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @return the linuxConfiguration value */ @@ -211,7 +211,7 @@ public LinuxConfiguration linuxConfiguration() { } /** - * Set the linuxConfiguration value. + * Set specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @param linuxConfiguration the linuxConfiguration value to set * @return the VirtualMachineScaleSetOSProfile object itself. @@ -222,7 +222,7 @@ public VirtualMachineScaleSetOSProfile withLinuxConfiguration(LinuxConfiguration } /** - * Get the secrets value. + * Get specifies set of certificates that should be installed onto the virtual machines in the scale set. * * @return the secrets value */ @@ -231,7 +231,7 @@ public List secrets() { } /** - * Set the secrets value. + * Set specifies set of certificates that should be installed onto the virtual machines in the scale set. * * @param secrets the secrets value to set * @return the VirtualMachineScaleSetOSProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfiguration.java index 43f88625137..8254df14859 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfiguration.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfiguration.java @@ -36,7 +36,7 @@ public class VirtualMachineScaleSetPublicIPAddressConfiguration { private VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings dnsSettings; /** - * Get the name value. + * Get the publicIP address configuration name. * * @return the name value */ @@ -45,7 +45,7 @@ public String name() { } /** - * Set the name value. + * Set the publicIP address configuration name. * * @param name the name value to set * @return the VirtualMachineScaleSetPublicIPAddressConfiguration object itself. @@ -56,7 +56,7 @@ public VirtualMachineScaleSetPublicIPAddressConfiguration withName(String name) } /** - * Get the idleTimeoutInMinutes value. + * Get the idle timeout of the public IP address. * * @return the idleTimeoutInMinutes value */ @@ -65,7 +65,7 @@ public Integer idleTimeoutInMinutes() { } /** - * Set the idleTimeoutInMinutes value. + * Set the idle timeout of the public IP address. * * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set * @return the VirtualMachineScaleSetPublicIPAddressConfiguration object itself. @@ -76,7 +76,7 @@ public VirtualMachineScaleSetPublicIPAddressConfiguration withIdleTimeoutInMinut } /** - * Get the dnsSettings value. + * Get the dns settings to be applied on the publicIP addresses . * * @return the dnsSettings value */ @@ -85,7 +85,7 @@ public VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings dnsSettings } /** - * Set the dnsSettings value. + * Set the dns settings to be applied on the publicIP addresses . * * @param dnsSettings the dnsSettings value to set * @return the VirtualMachineScaleSetPublicIPAddressConfiguration object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.java index 20785ffacdd..f08b14280c1 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.java @@ -24,7 +24,7 @@ public class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings { private String domainNameLabel; /** - * Get the domainNameLabel value. + * Get the Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources that will be created. * * @return the domainNameLabel value */ @@ -33,7 +33,7 @@ public String domainNameLabel() { } /** - * Set the domainNameLabel value. + * Set the Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources that will be created. * * @param domainNameLabel the domainNameLabel value to set * @return the VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetSkuCapacity.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetSkuCapacity.java index 21418d2c4c4..5c56f3024f5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetSkuCapacity.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetSkuCapacity.java @@ -40,7 +40,7 @@ public class VirtualMachineScaleSetSkuCapacity { private VirtualMachineScaleSetSkuScaleType scaleType; /** - * Get the minimum value. + * Get the minimum capacity. * * @return the minimum value */ @@ -49,7 +49,7 @@ public Long minimum() { } /** - * Get the maximum value. + * Get the maximum capacity that can be set. * * @return the maximum value */ @@ -58,7 +58,7 @@ public Long maximum() { } /** - * Get the defaultCapacity value. + * Get the default capacity. * * @return the defaultCapacity value */ @@ -67,7 +67,7 @@ public Long defaultCapacity() { } /** - * Get the scaleType value. + * Get the scale type applicable to the sku. Possible values include: 'Automatic', 'None'. * * @return the scaleType value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetStorageProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetStorageProfile.java index 70ea86fb48b..692352de817 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetStorageProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetStorageProfile.java @@ -45,7 +45,7 @@ public class VirtualMachineScaleSetStorageProfile { private List dataDisks; /** - * Get the imageReference value. + * Get specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. * * @return the imageReference value */ @@ -54,7 +54,7 @@ public ImageReferenceInner imageReference() { } /** - * Set the imageReference value. + * Set specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. * * @param imageReference the imageReference value to set * @return the VirtualMachineScaleSetStorageProfile object itself. @@ -65,7 +65,7 @@ public VirtualMachineScaleSetStorageProfile withImageReference(ImageReferenceInn } /** - * Get the osDisk value. + * Get specifies information about the operating system disk used by the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @return the osDisk value */ @@ -74,7 +74,7 @@ public VirtualMachineScaleSetOSDisk osDisk() { } /** - * Set the osDisk value. + * Set specifies information about the operating system disk used by the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @param osDisk the osDisk value to set * @return the VirtualMachineScaleSetStorageProfile object itself. @@ -85,7 +85,7 @@ public VirtualMachineScaleSetStorageProfile withOsDisk(VirtualMachineScaleSetOSD } /** - * Get the dataDisks value. + * Get specifies the parameters that are used to add data disks to the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @return the dataDisks value */ @@ -94,7 +94,7 @@ public List dataDisks() { } /** - * Set the dataDisks value. + * Set specifies the parameters that are used to add data disks to the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @param dataDisks the dataDisks value to set * @return the VirtualMachineScaleSetStorageProfile object itself. 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 index dfdc680bb65..883e35c5229 100644 --- 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 @@ -62,7 +62,7 @@ public class VirtualMachineScaleSetUpdate extends UpdateResource { private VirtualMachineScaleSetIdentity identity; /** - * Get the sku value. + * Get the virtual machine scale set sku. * * @return the sku value */ @@ -71,7 +71,7 @@ public Sku sku() { } /** - * Set the sku value. + * Set the virtual machine scale set sku. * * @param sku the sku value to set * @return the VirtualMachineScaleSetUpdate object itself. @@ -82,7 +82,7 @@ public VirtualMachineScaleSetUpdate withSku(Sku sku) { } /** - * Get the plan value. + * Get the purchase plan when deploying a virtual machine scale set from VM Marketplace images. * * @return the plan value */ @@ -91,7 +91,7 @@ public Plan plan() { } /** - * Set the plan value. + * Set the purchase plan when deploying a virtual machine scale set from VM Marketplace images. * * @param plan the plan value to set * @return the VirtualMachineScaleSetUpdate object itself. @@ -102,7 +102,7 @@ public VirtualMachineScaleSetUpdate withPlan(Plan plan) { } /** - * Get the upgradePolicy value. + * Get the upgrade policy. * * @return the upgradePolicy value */ @@ -111,7 +111,7 @@ public UpgradePolicy upgradePolicy() { } /** - * Set the upgradePolicy value. + * Set the upgrade policy. * * @param upgradePolicy the upgradePolicy value to set * @return the VirtualMachineScaleSetUpdate object itself. @@ -122,7 +122,7 @@ public VirtualMachineScaleSetUpdate withUpgradePolicy(UpgradePolicy upgradePolic } /** - * Get the virtualMachineProfile value. + * Get the virtual machine profile. * * @return the virtualMachineProfile value */ @@ -131,7 +131,7 @@ public VirtualMachineScaleSetUpdateVMProfile virtualMachineProfile() { } /** - * Set the virtualMachineProfile value. + * Set the virtual machine profile. * * @param virtualMachineProfile the virtualMachineProfile value to set * @return the VirtualMachineScaleSetUpdate object itself. @@ -142,7 +142,7 @@ public VirtualMachineScaleSetUpdate withVirtualMachineProfile(VirtualMachineScal } /** - * Get the overprovision value. + * Get specifies whether the Virtual Machine Scale Set should be overprovisioned. * * @return the overprovision value */ @@ -151,7 +151,7 @@ public Boolean overprovision() { } /** - * Set the overprovision value. + * Set specifies whether the Virtual Machine Scale Set should be overprovisioned. * * @param overprovision the overprovision value to set * @return the VirtualMachineScaleSetUpdate object itself. @@ -162,7 +162,7 @@ public VirtualMachineScaleSetUpdate withOverprovision(Boolean overprovision) { } /** - * Get the singlePlacementGroup value. + * Get when true this limits the scale set to a single placement group, of max size 100 virtual machines. * * @return the singlePlacementGroup value */ @@ -171,7 +171,7 @@ public Boolean singlePlacementGroup() { } /** - * Set the singlePlacementGroup value. + * Set when true this limits the scale set to a single placement group, of max size 100 virtual machines. * * @param singlePlacementGroup the singlePlacementGroup value to set * @return the VirtualMachineScaleSetUpdate object itself. @@ -182,7 +182,7 @@ public VirtualMachineScaleSetUpdate withSinglePlacementGroup(Boolean singlePlace } /** - * Get the identity value. + * Get the identity of the virtual machine scale set, if configured. * * @return the identity value */ @@ -191,7 +191,7 @@ public VirtualMachineScaleSetIdentity identity() { } /** - * Set the identity value. + * Set the identity of the virtual machine scale set, if configured. * * @param identity the identity value to set * @return the VirtualMachineScaleSetUpdate object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateNetworkProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateNetworkProfile.java index 89c70b933da..52a0588a023 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateNetworkProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateNetworkProfile.java @@ -23,7 +23,7 @@ public class VirtualMachineScaleSetUpdateNetworkProfile { private List networkInterfaceConfigurations; /** - * Get the networkInterfaceConfigurations value. + * Get the list of network configurations. * * @return the networkInterfaceConfigurations value */ @@ -32,7 +32,7 @@ public List networkInterf } /** - * Set the networkInterfaceConfigurations value. + * Set the list of network configurations. * * @param networkInterfaceConfigurations the networkInterfaceConfigurations value to set * @return the VirtualMachineScaleSetUpdateNetworkProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSDisk.java index acbd5463e0b..d7582a3f5f7 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSDisk.java @@ -51,7 +51,7 @@ public class VirtualMachineScaleSetUpdateOSDisk { private VirtualMachineScaleSetManagedDiskParameters managedDisk; /** - * Get the caching value. + * Get the caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @return the caching value */ @@ -60,7 +60,7 @@ public CachingTypes caching() { } /** - * Set the caching value. + * Set the caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @param caching the caching value to set * @return the VirtualMachineScaleSetUpdateOSDisk object itself. @@ -71,7 +71,7 @@ public VirtualMachineScaleSetUpdateOSDisk withCaching(CachingTypes caching) { } /** - * Get the writeAcceleratorEnabled value. + * Get specifies whether writeAccelerator should be enabled or disabled on the disk. * * @return the writeAcceleratorEnabled value */ @@ -80,7 +80,7 @@ public Boolean writeAcceleratorEnabled() { } /** - * Set the writeAcceleratorEnabled value. + * Set specifies whether writeAccelerator should be enabled or disabled on the disk. * * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set * @return the VirtualMachineScaleSetUpdateOSDisk object itself. @@ -91,7 +91,7 @@ public VirtualMachineScaleSetUpdateOSDisk withWriteAcceleratorEnabled(Boolean wr } /** - * Get the image value. + * Get the Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk should not exist. * * @return the image value */ @@ -100,7 +100,7 @@ public VirtualHardDisk image() { } /** - * Set the image value. + * Set the Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk should not exist. * * @param image the image value to set * @return the VirtualMachineScaleSetUpdateOSDisk object itself. @@ -111,7 +111,7 @@ public VirtualMachineScaleSetUpdateOSDisk withImage(VirtualHardDisk image) { } /** - * Get the vhdContainers value. + * Get the list of virtual hard disk container uris. * * @return the vhdContainers value */ @@ -120,7 +120,7 @@ public List vhdContainers() { } /** - * Set the vhdContainers value. + * Set the list of virtual hard disk container uris. * * @param vhdContainers the vhdContainers value to set * @return the VirtualMachineScaleSetUpdateOSDisk object itself. @@ -131,7 +131,7 @@ public VirtualMachineScaleSetUpdateOSDisk withVhdContainers(List vhdCont } /** - * Get the managedDisk value. + * Get the managed disk parameters. * * @return the managedDisk value */ @@ -140,7 +140,7 @@ public VirtualMachineScaleSetManagedDiskParameters managedDisk() { } /** - * Set the managedDisk value. + * Set the managed disk parameters. * * @param managedDisk the managedDisk value to set * @return the VirtualMachineScaleSetUpdateOSDisk object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSProfile.java index dcee27e6610..5610312d07a 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSProfile.java @@ -40,7 +40,7 @@ public class VirtualMachineScaleSetUpdateOSProfile { private List secrets; /** - * Get the customData value. + * Get a base-64 encoded string of custom data. * * @return the customData value */ @@ -49,7 +49,7 @@ public String customData() { } /** - * Set the customData value. + * Set a base-64 encoded string of custom data. * * @param customData the customData value to set * @return the VirtualMachineScaleSetUpdateOSProfile object itself. @@ -60,7 +60,7 @@ public VirtualMachineScaleSetUpdateOSProfile withCustomData(String customData) { } /** - * Get the windowsConfiguration value. + * Get the Windows Configuration of the OS profile. * * @return the windowsConfiguration value */ @@ -69,7 +69,7 @@ public WindowsConfiguration windowsConfiguration() { } /** - * Set the windowsConfiguration value. + * Set the Windows Configuration of the OS profile. * * @param windowsConfiguration the windowsConfiguration value to set * @return the VirtualMachineScaleSetUpdateOSProfile object itself. @@ -80,7 +80,7 @@ public VirtualMachineScaleSetUpdateOSProfile withWindowsConfiguration(WindowsCon } /** - * Get the linuxConfiguration value. + * Get the Linux Configuration of the OS profile. * * @return the linuxConfiguration value */ @@ -89,7 +89,7 @@ public LinuxConfiguration linuxConfiguration() { } /** - * Set the linuxConfiguration value. + * Set the Linux Configuration of the OS profile. * * @param linuxConfiguration the linuxConfiguration value to set * @return the VirtualMachineScaleSetUpdateOSProfile object itself. @@ -100,7 +100,7 @@ public VirtualMachineScaleSetUpdateOSProfile withLinuxConfiguration(LinuxConfigu } /** - * Get the secrets value. + * Get the List of certificates for addition to the VM. * * @return the secrets value */ @@ -109,7 +109,7 @@ public List secrets() { } /** - * Set the secrets value. + * Set the List of certificates for addition to the VM. * * @param secrets the secrets value to set * @return the VirtualMachineScaleSetUpdateOSProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.java index e8648f0dc10..073616e978c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.java @@ -36,7 +36,7 @@ public class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration { private VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings dnsSettings; /** - * Get the name value. + * Get the publicIP address configuration name. * * @return the name value */ @@ -45,7 +45,7 @@ public String name() { } /** - * Set the name value. + * Set the publicIP address configuration name. * * @param name the name value to set * @return the VirtualMachineScaleSetUpdatePublicIPAddressConfiguration object itself. @@ -56,7 +56,7 @@ public VirtualMachineScaleSetUpdatePublicIPAddressConfiguration withName(String } /** - * Get the idleTimeoutInMinutes value. + * Get the idle timeout of the public IP address. * * @return the idleTimeoutInMinutes value */ @@ -65,7 +65,7 @@ public Integer idleTimeoutInMinutes() { } /** - * Set the idleTimeoutInMinutes value. + * Set the idle timeout of the public IP address. * * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set * @return the VirtualMachineScaleSetUpdatePublicIPAddressConfiguration object itself. @@ -76,7 +76,7 @@ public VirtualMachineScaleSetUpdatePublicIPAddressConfiguration withIdleTimeoutI } /** - * Get the dnsSettings value. + * Get the dns settings to be applied on the publicIP addresses . * * @return the dnsSettings value */ @@ -85,7 +85,7 @@ public VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings dnsSettings } /** - * Set the dnsSettings value. + * Set the dns settings to be applied on the publicIP addresses . * * @param dnsSettings the dnsSettings value to set * @return the VirtualMachineScaleSetUpdatePublicIPAddressConfiguration object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateStorageProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateStorageProfile.java index cb0f3dca337..97d8f9ee884 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateStorageProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateStorageProfile.java @@ -35,7 +35,7 @@ public class VirtualMachineScaleSetUpdateStorageProfile { private List dataDisks; /** - * Get the imageReference value. + * Get the image reference. * * @return the imageReference value */ @@ -44,7 +44,7 @@ public ImageReferenceInner imageReference() { } /** - * Set the imageReference value. + * Set the image reference. * * @param imageReference the imageReference value to set * @return the VirtualMachineScaleSetUpdateStorageProfile object itself. @@ -55,7 +55,7 @@ public VirtualMachineScaleSetUpdateStorageProfile withImageReference(ImageRefere } /** - * Get the osDisk value. + * Get the OS disk. * * @return the osDisk value */ @@ -64,7 +64,7 @@ public VirtualMachineScaleSetUpdateOSDisk osDisk() { } /** - * Set the osDisk value. + * Set the OS disk. * * @param osDisk the osDisk value to set * @return the VirtualMachineScaleSetUpdateStorageProfile object itself. @@ -75,7 +75,7 @@ public VirtualMachineScaleSetUpdateStorageProfile withOsDisk(VirtualMachineScale } /** - * Get the dataDisks value. + * Get the data disks. * * @return the dataDisks value */ @@ -84,7 +84,7 @@ public List dataDisks() { } /** - * Set the dataDisks value. + * Set the data disks. * * @param dataDisks the dataDisks value to set * @return the VirtualMachineScaleSetUpdateStorageProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateVMProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateVMProfile.java index 007b699a094..3a2911c9323 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateVMProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateVMProfile.java @@ -51,7 +51,7 @@ public class VirtualMachineScaleSetUpdateVMProfile { private String licenseType; /** - * Get the osProfile value. + * Get the virtual machine scale set OS profile. * * @return the osProfile value */ @@ -60,7 +60,7 @@ public VirtualMachineScaleSetUpdateOSProfile osProfile() { } /** - * Set the osProfile value. + * Set the virtual machine scale set OS profile. * * @param osProfile the osProfile value to set * @return the VirtualMachineScaleSetUpdateVMProfile object itself. @@ -71,7 +71,7 @@ public VirtualMachineScaleSetUpdateVMProfile withOsProfile(VirtualMachineScaleSe } /** - * Get the storageProfile value. + * Get the virtual machine scale set storage profile. * * @return the storageProfile value */ @@ -80,7 +80,7 @@ public VirtualMachineScaleSetUpdateStorageProfile storageProfile() { } /** - * Set the storageProfile value. + * Set the virtual machine scale set storage profile. * * @param storageProfile the storageProfile value to set * @return the VirtualMachineScaleSetUpdateVMProfile object itself. @@ -91,7 +91,7 @@ public VirtualMachineScaleSetUpdateVMProfile withStorageProfile(VirtualMachineSc } /** - * Get the networkProfile value. + * Get the virtual machine scale set network profile. * * @return the networkProfile value */ @@ -100,7 +100,7 @@ public VirtualMachineScaleSetUpdateNetworkProfile networkProfile() { } /** - * Set the networkProfile value. + * Set the virtual machine scale set network profile. * * @param networkProfile the networkProfile value to set * @return the VirtualMachineScaleSetUpdateVMProfile object itself. @@ -111,7 +111,7 @@ public VirtualMachineScaleSetUpdateVMProfile withNetworkProfile(VirtualMachineSc } /** - * Get the diagnosticsProfile value. + * Get the virtual machine scale set diagnostics profile. * * @return the diagnosticsProfile value */ @@ -120,7 +120,7 @@ public DiagnosticsProfile diagnosticsProfile() { } /** - * Set the diagnosticsProfile value. + * Set the virtual machine scale set diagnostics profile. * * @param diagnosticsProfile the diagnosticsProfile value to set * @return the VirtualMachineScaleSetUpdateVMProfile object itself. @@ -131,7 +131,7 @@ public VirtualMachineScaleSetUpdateVMProfile withDiagnosticsProfile(DiagnosticsP } /** - * Get the extensionProfile value. + * Get the virtual machine scale set extension profile. * * @return the extensionProfile value */ @@ -140,7 +140,7 @@ public VirtualMachineScaleSetExtensionProfile extensionProfile() { } /** - * Set the extensionProfile value. + * Set the virtual machine scale set extension profile. * * @param extensionProfile the extensionProfile value to set * @return the VirtualMachineScaleSetUpdateVMProfile object itself. @@ -151,7 +151,7 @@ public VirtualMachineScaleSetUpdateVMProfile withExtensionProfile(VirtualMachine } /** - * Get the licenseType value. + * Get the license type, which is for bring your own license scenario. * * @return the licenseType value */ @@ -160,7 +160,7 @@ public String licenseType() { } /** - * Set the licenseType value. + * Set the license type, which is for bring your own license scenario. * * @param licenseType the licenseType value to set * @return the VirtualMachineScaleSetUpdateVMProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMExtensionsSummary.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMExtensionsSummary.java index 7622465c834..32cb2bc3028 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMExtensionsSummary.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMExtensionsSummary.java @@ -28,7 +28,7 @@ public class VirtualMachineScaleSetVMExtensionsSummary { private List statusesSummary; /** - * Get the name value. + * Get the extension name. * * @return the name value */ @@ -37,7 +37,7 @@ public String name() { } /** - * Get the statusesSummary value. + * Get the extensions information. * * @return the statusesSummary value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMInstanceIDs.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMInstanceIDs.java index 74a02bc0332..bdaa7933a82 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMInstanceIDs.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMInstanceIDs.java @@ -24,7 +24,7 @@ public class VirtualMachineScaleSetVMInstanceIDs { private List instanceIds; /** - * Get the instanceIds value. + * Get the virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * * @return the instanceIds value */ @@ -33,7 +33,7 @@ public List instanceIds() { } /** - * Set the instanceIds value. + * Set the virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * * @param instanceIds the instanceIds value to set * @return the VirtualMachineScaleSetVMInstanceIDs object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMInstanceRequiredIDs.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMInstanceRequiredIDs.java index 0ca421ce76b..c32c45d0be1 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMInstanceRequiredIDs.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMInstanceRequiredIDs.java @@ -22,7 +22,7 @@ public class VirtualMachineScaleSetVMInstanceRequiredIDs { private List instanceIds; /** - * Get the instanceIds value. + * Get the virtual machine scale set instance ids. * * @return the instanceIds value */ @@ -31,7 +31,7 @@ public List instanceIds() { } /** - * Set the instanceIds value. + * Set the virtual machine scale set instance ids. * * @param instanceIds the instanceIds value to set * @return the VirtualMachineScaleSetVMInstanceRequiredIDs object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java index 346adc9f02f..c874432d836 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java @@ -80,7 +80,7 @@ public class VirtualMachineScaleSetVMProfile { private VirtualMachineEvictionPolicyTypes evictionPolicy; /** - * Get the osProfile value. + * Get specifies the operating system settings for the virtual machines in the scale set. * * @return the osProfile value */ @@ -89,7 +89,7 @@ public VirtualMachineScaleSetOSProfile osProfile() { } /** - * Set the osProfile value. + * Set specifies the operating system settings for the virtual machines in the scale set. * * @param osProfile the osProfile value to set * @return the VirtualMachineScaleSetVMProfile object itself. @@ -100,7 +100,7 @@ public VirtualMachineScaleSetVMProfile withOsProfile(VirtualMachineScaleSetOSPro } /** - * Get the storageProfile value. + * Get specifies the storage settings for the virtual machine disks. * * @return the storageProfile value */ @@ -109,7 +109,7 @@ public VirtualMachineScaleSetStorageProfile storageProfile() { } /** - * Set the storageProfile value. + * Set specifies the storage settings for the virtual machine disks. * * @param storageProfile the storageProfile value to set * @return the VirtualMachineScaleSetVMProfile object itself. @@ -120,7 +120,7 @@ public VirtualMachineScaleSetVMProfile withStorageProfile(VirtualMachineScaleSet } /** - * Get the networkProfile value. + * Get specifies properties of the network interfaces of the virtual machines in the scale set. * * @return the networkProfile value */ @@ -129,7 +129,7 @@ public VirtualMachineScaleSetNetworkProfile networkProfile() { } /** - * Set the networkProfile value. + * Set specifies properties of the network interfaces of the virtual machines in the scale set. * * @param networkProfile the networkProfile value to set * @return the VirtualMachineScaleSetVMProfile object itself. @@ -140,7 +140,7 @@ public VirtualMachineScaleSetVMProfile withNetworkProfile(VirtualMachineScaleSet } /** - * Get the diagnosticsProfile value. + * Get specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. * * @return the diagnosticsProfile value */ @@ -149,7 +149,7 @@ public DiagnosticsProfile diagnosticsProfile() { } /** - * Set the diagnosticsProfile value. + * Set specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. * * @param diagnosticsProfile the diagnosticsProfile value to set * @return the VirtualMachineScaleSetVMProfile object itself. @@ -160,7 +160,7 @@ public VirtualMachineScaleSetVMProfile withDiagnosticsProfile(DiagnosticsProfile } /** - * Get the extensionProfile value. + * Get specifies a collection of settings for extensions installed on virtual machines in the scale set. * * @return the extensionProfile value */ @@ -169,7 +169,7 @@ public VirtualMachineScaleSetExtensionProfile extensionProfile() { } /** - * Set the extensionProfile value. + * Set specifies a collection of settings for extensions installed on virtual machines in the scale set. * * @param extensionProfile the extensionProfile value to set * @return the VirtualMachineScaleSetVMProfile object itself. @@ -180,7 +180,7 @@ public VirtualMachineScaleSetVMProfile withExtensionProfile(VirtualMachineScaleS } /** - * Get the licenseType value. + * Get 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. * * @return the licenseType value */ @@ -189,7 +189,7 @@ public String licenseType() { } /** - * Set the licenseType value. + * Set 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. * * @param licenseType the licenseType value to set * @return the VirtualMachineScaleSetVMProfile object itself. @@ -200,7 +200,7 @@ public VirtualMachineScaleSetVMProfile withLicenseType(String licenseType) { } /** - * Get the priority value. + * Get specifies the priority for the virtual machines in the scale set. <br><br>Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low'. * * @return the priority value */ @@ -209,7 +209,7 @@ public VirtualMachinePriorityTypes priority() { } /** - * Set the priority value. + * Set specifies the priority for the virtual machines in the scale set. <br><br>Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low'. * * @param priority the priority value to set * @return the VirtualMachineScaleSetVMProfile object itself. @@ -220,7 +220,7 @@ public VirtualMachineScaleSetVMProfile withPriority(VirtualMachinePriorityTypes } /** - * Get the evictionPolicy value. + * Get specifies the eviction policy for virtual machines in a low priority scale set. <br><br>Minimum api-version: 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'. * * @return the evictionPolicy value */ @@ -229,7 +229,7 @@ public VirtualMachineEvictionPolicyTypes evictionPolicy() { } /** - * Set the evictionPolicy value. + * Set specifies the eviction policy for virtual machines in a low priority scale set. <br><br>Minimum api-version: 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'. * * @param evictionPolicy the evictionPolicy value to set * @return the VirtualMachineScaleSetVMProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineStatusCodeCount.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineStatusCodeCount.java index d01aff0f168..f85980605a6 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineStatusCodeCount.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineStatusCodeCount.java @@ -28,7 +28,7 @@ public class VirtualMachineStatusCodeCount { private Integer count; /** - * Get the code value. + * Get the instance view status code. * * @return the code value */ @@ -37,7 +37,7 @@ public String code() { } /** - * Get the count value. + * Get the number of instances having a particular status code. * * @return the count value */ 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 index 5ad5d8f5377..d32fdf725ae 100644 --- 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 @@ -127,7 +127,7 @@ public class VirtualMachineUpdate extends UpdateResource { private List zones; /** - * Get the plan value. + * Get 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**. * * @return the plan value */ @@ -136,7 +136,7 @@ public Plan plan() { } /** - * Set the plan value. + * Set 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**. * * @param plan the plan value to set * @return the VirtualMachineUpdate object itself. @@ -147,7 +147,7 @@ public VirtualMachineUpdate withPlan(Plan plan) { } /** - * Get the hardwareProfile value. + * Get specifies the hardware settings for the virtual machine. * * @return the hardwareProfile value */ @@ -156,7 +156,7 @@ public HardwareProfile hardwareProfile() { } /** - * Set the hardwareProfile value. + * Set specifies the hardware settings for the virtual machine. * * @param hardwareProfile the hardwareProfile value to set * @return the VirtualMachineUpdate object itself. @@ -167,7 +167,7 @@ public VirtualMachineUpdate withHardwareProfile(HardwareProfile hardwareProfile) } /** - * Get the storageProfile value. + * Get specifies the storage settings for the virtual machine disks. * * @return the storageProfile value */ @@ -176,7 +176,7 @@ public StorageProfile storageProfile() { } /** - * Set the storageProfile value. + * Set specifies the storage settings for the virtual machine disks. * * @param storageProfile the storageProfile value to set * @return the VirtualMachineUpdate object itself. @@ -187,7 +187,7 @@ public VirtualMachineUpdate withStorageProfile(StorageProfile storageProfile) { } /** - * Get the osProfile value. + * Get specifies the operating system settings for the virtual machine. * * @return the osProfile value */ @@ -196,7 +196,7 @@ public OSProfile osProfile() { } /** - * Set the osProfile value. + * Set specifies the operating system settings for the virtual machine. * * @param osProfile the osProfile value to set * @return the VirtualMachineUpdate object itself. @@ -207,7 +207,7 @@ public VirtualMachineUpdate withOsProfile(OSProfile osProfile) { } /** - * Get the networkProfile value. + * Get specifies the network interfaces of the virtual machine. * * @return the networkProfile value */ @@ -216,7 +216,7 @@ public NetworkProfile networkProfile() { } /** - * Set the networkProfile value. + * Set specifies the network interfaces of the virtual machine. * * @param networkProfile the networkProfile value to set * @return the VirtualMachineUpdate object itself. @@ -227,7 +227,7 @@ public VirtualMachineUpdate withNetworkProfile(NetworkProfile networkProfile) { } /** - * Get the diagnosticsProfile value. + * Get specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. * * @return the diagnosticsProfile value */ @@ -236,7 +236,7 @@ public DiagnosticsProfile diagnosticsProfile() { } /** - * Set the diagnosticsProfile value. + * Set specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. * * @param diagnosticsProfile the diagnosticsProfile value to set * @return the VirtualMachineUpdate object itself. @@ -247,7 +247,7 @@ public VirtualMachineUpdate withDiagnosticsProfile(DiagnosticsProfile diagnostic } /** - * Get the availabilitySet value. + * Get 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. * * @return the availabilitySet value */ @@ -256,7 +256,7 @@ public SubResource availabilitySet() { } /** - * Set the availabilitySet value. + * Set 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. * * @param availabilitySet the availabilitySet value to set * @return the VirtualMachineUpdate object itself. @@ -267,7 +267,7 @@ public VirtualMachineUpdate withAvailabilitySet(SubResource availabilitySet) { } /** - * Get the provisioningState value. + * Get the provisioning state, which only appears in the response. * * @return the provisioningState value */ @@ -276,7 +276,7 @@ public String provisioningState() { } /** - * Get the instanceView value. + * Get the virtual machine instance view. * * @return the instanceView value */ @@ -285,7 +285,7 @@ public VirtualMachineInstanceViewInner instanceView() { } /** - * Get the licenseType value. + * Get 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. * * @return the licenseType value */ @@ -294,7 +294,7 @@ public String licenseType() { } /** - * Set the licenseType value. + * Set 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. * * @param licenseType the licenseType value to set * @return the VirtualMachineUpdate object itself. @@ -305,7 +305,7 @@ public VirtualMachineUpdate withLicenseType(String licenseType) { } /** - * Get the vmId value. + * Get 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. * * @return the vmId value */ @@ -314,7 +314,7 @@ public String vmId() { } /** - * Get the identity value. + * Get the identity of the virtual machine, if configured. * * @return the identity value */ @@ -323,7 +323,7 @@ public VirtualMachineIdentity identity() { } /** - * Set the identity value. + * Set the identity of the virtual machine, if configured. * * @param identity the identity value to set * @return the VirtualMachineUpdate object itself. @@ -334,7 +334,7 @@ public VirtualMachineUpdate withIdentity(VirtualMachineIdentity identity) { } /** - * Get the zones value. + * Get the virtual machine zones. * * @return the zones value */ @@ -343,7 +343,7 @@ public List zones() { } /** - * Set the zones value. + * Set the virtual machine zones. * * @param zones the zones value to set * @return the VirtualMachineUpdate object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WinRMConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WinRMConfiguration.java index f3ea05a5f3f..8ad0917a52b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WinRMConfiguration.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WinRMConfiguration.java @@ -22,7 +22,7 @@ public class WinRMConfiguration { private List listeners; /** - * Get the listeners value. + * Get the list of Windows Remote Management listeners. * * @return the listeners value */ @@ -31,7 +31,7 @@ public List listeners() { } /** - * Set the listeners value. + * Set the list of Windows Remote Management listeners. * * @param listeners the listeners value to set * @return the WinRMConfiguration object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WinRMListener.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WinRMListener.java index 0a68b81ac17..98f6aa49ff0 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WinRMListener.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WinRMListener.java @@ -38,7 +38,7 @@ public class WinRMListener { private String certificateUrl; /** - * Get the protocol value. + * Get specifies the protocol of listener. <br><br> Possible values are: <br>**http** <br><br> **https**. Possible values include: 'Http', 'Https'. * * @return the protocol value */ @@ -47,7 +47,7 @@ public ProtocolTypes protocol() { } /** - * Set the protocol value. + * Set specifies the protocol of listener. <br><br> Possible values are: <br>**http** <br><br> **https**. Possible values include: 'Http', 'Https'. * * @param protocol the protocol value to set * @return the WinRMListener object itself. @@ -58,7 +58,7 @@ public WinRMListener withProtocol(ProtocolTypes protocol) { } /** - * Get the certificateUrl value. + * Get this is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>}. * * @return the certificateUrl value */ @@ -67,7 +67,7 @@ public String certificateUrl() { } /** - * Set the certificateUrl value. + * Set this is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>}. * * @param certificateUrl the certificateUrl value to set * @return the WinRMListener object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WindowsConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WindowsConfiguration.java index eedd3449b0e..d72f07811ee 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WindowsConfiguration.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WindowsConfiguration.java @@ -53,7 +53,7 @@ public class WindowsConfiguration { private WinRMConfiguration winRM; /** - * Get the provisionVMAgent value. + * Get indicates whether virtual machine agent should be provisioned on the virtual machine. <br><br> When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. * * @return the provisionVMAgent value */ @@ -62,7 +62,7 @@ public Boolean provisionVMAgent() { } /** - * Set the provisionVMAgent value. + * Set indicates whether virtual machine agent should be provisioned on the virtual machine. <br><br> When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. * * @param provisionVMAgent the provisionVMAgent value to set * @return the WindowsConfiguration object itself. @@ -73,7 +73,7 @@ public WindowsConfiguration withProvisionVMAgent(Boolean provisionVMAgent) { } /** - * Get the enableAutomaticUpdates value. + * Get indicates whether virtual machine is enabled for automatic updates. * * @return the enableAutomaticUpdates value */ @@ -82,7 +82,7 @@ public Boolean enableAutomaticUpdates() { } /** - * Set the enableAutomaticUpdates value. + * Set indicates whether virtual machine is enabled for automatic updates. * * @param enableAutomaticUpdates the enableAutomaticUpdates value to set * @return the WindowsConfiguration object itself. @@ -93,7 +93,7 @@ public WindowsConfiguration withEnableAutomaticUpdates(Boolean enableAutomaticUp } /** - * Get the timeZone value. + * Get specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". * * @return the timeZone value */ @@ -102,7 +102,7 @@ public String timeZone() { } /** - * Set the timeZone value. + * Set specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". * * @param timeZone the timeZone value to set * @return the WindowsConfiguration object itself. @@ -113,7 +113,7 @@ public WindowsConfiguration withTimeZone(String timeZone) { } /** - * Get the additionalUnattendContent value. + * Get specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. * * @return the additionalUnattendContent value */ @@ -122,7 +122,7 @@ public List additionalUnattendContent() { } /** - * Set the additionalUnattendContent value. + * Set specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. * * @param additionalUnattendContent the additionalUnattendContent value to set * @return the WindowsConfiguration object itself. @@ -133,7 +133,7 @@ public WindowsConfiguration withAdditionalUnattendContent(List virtualMachines() { } /** - * Set the virtualMachines value. + * Set a list of references to all virtual machines in the availability set. * * @param virtualMachines the virtualMachines value to set * @return the AvailabilitySetInner object itself. @@ -120,7 +120,7 @@ public AvailabilitySetInner withVirtualMachines(List virtualMachine } /** - * Get the statuses value. + * Get the resource status information. * * @return the statuses value */ @@ -129,7 +129,7 @@ public List statuses() { } /** - * Get the sku value. + * Get sku of the availability set. * * @return the sku value */ @@ -138,7 +138,7 @@ public Sku sku() { } /** - * Set the sku value. + * Set sku of the availability set. * * @param sku the sku value to set * @return the AvailabilitySetInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeOperationValueInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeOperationValueInner.java index 3640f113e0d..fffa7d9bd97 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeOperationValueInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeOperationValueInner.java @@ -53,7 +53,7 @@ public class ComputeOperationValueInner { private String provider; /** - * Get the origin value. + * Get the origin of the compute operation. * * @return the origin value */ @@ -62,7 +62,7 @@ public String origin() { } /** - * Get the name value. + * Get the name of the compute operation. * * @return the name value */ @@ -71,7 +71,7 @@ public String name() { } /** - * Get the operation value. + * Get the display name of the compute operation. * * @return the operation value */ @@ -80,7 +80,7 @@ public String operation() { } /** - * Get the resource value. + * Get the display name of the resource the operation applies to. * * @return the resource value */ @@ -89,7 +89,7 @@ public String resource() { } /** - * Get the description value. + * Get the description of the operation. * * @return the description value */ @@ -98,7 +98,7 @@ public String description() { } /** - * Get the provider value. + * Get the resource provider for the operation. * * @return the provider value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ContainerServiceInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ContainerServiceInner.java index afa9d0e2925..79474841f54 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ContainerServiceInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ContainerServiceInner.java @@ -82,7 +82,7 @@ public class ContainerServiceInner extends Resource { private ContainerServiceDiagnosticsProfile diagnosticsProfile; /** - * Get the provisioningState value. + * Get the current deployment or provisioning state, which only appears in the response. * * @return the provisioningState value */ @@ -91,7 +91,7 @@ public String provisioningState() { } /** - * Get the orchestratorProfile value. + * Get properties of the orchestrator. * * @return the orchestratorProfile value */ @@ -100,7 +100,7 @@ public ContainerServiceOrchestratorProfile orchestratorProfile() { } /** - * Set the orchestratorProfile value. + * Set properties of the orchestrator. * * @param orchestratorProfile the orchestratorProfile value to set * @return the ContainerServiceInner object itself. @@ -111,7 +111,7 @@ public ContainerServiceInner withOrchestratorProfile(ContainerServiceOrchestrato } /** - * Get the customProfile value. + * Get properties for custom clusters. * * @return the customProfile value */ @@ -120,7 +120,7 @@ public ContainerServiceCustomProfile customProfile() { } /** - * Set the customProfile value. + * Set properties for custom clusters. * * @param customProfile the customProfile value to set * @return the ContainerServiceInner object itself. @@ -131,7 +131,7 @@ public ContainerServiceInner withCustomProfile(ContainerServiceCustomProfile cus } /** - * Get the servicePrincipalProfile value. + * Get properties for cluster service principals. * * @return the servicePrincipalProfile value */ @@ -140,7 +140,7 @@ public ContainerServiceServicePrincipalProfile servicePrincipalProfile() { } /** - * Set the servicePrincipalProfile value. + * Set properties for cluster service principals. * * @param servicePrincipalProfile the servicePrincipalProfile value to set * @return the ContainerServiceInner object itself. @@ -151,7 +151,7 @@ public ContainerServiceInner withServicePrincipalProfile(ContainerServiceService } /** - * Get the masterProfile value. + * Get properties of master agents. * * @return the masterProfile value */ @@ -160,7 +160,7 @@ public ContainerServiceMasterProfile masterProfile() { } /** - * Set the masterProfile value. + * Set properties of master agents. * * @param masterProfile the masterProfile value to set * @return the ContainerServiceInner object itself. @@ -171,7 +171,7 @@ public ContainerServiceInner withMasterProfile(ContainerServiceMasterProfile mas } /** - * Get the agentPoolProfiles value. + * Get properties of the agent pool. * * @return the agentPoolProfiles value */ @@ -180,7 +180,7 @@ public List agentPoolProfiles() { } /** - * Set the agentPoolProfiles value. + * Set properties of the agent pool. * * @param agentPoolProfiles the agentPoolProfiles value to set * @return the ContainerServiceInner object itself. @@ -191,7 +191,7 @@ public ContainerServiceInner withAgentPoolProfiles(List zones() { } /** - * Set the zones value. + * Set the Logical zone list for Disk. * * @param zones the zones value to set * @return the DiskInner object itself. @@ -132,7 +132,7 @@ public DiskInner withZones(List zones) { } /** - * Get the timeCreated value. + * Get the time when the disk was created. * * @return the timeCreated value */ @@ -141,7 +141,7 @@ public DateTime timeCreated() { } /** - * Get the osType value. + * Get the Operating System type. Possible values include: 'Windows', 'Linux'. * * @return the osType value */ @@ -150,7 +150,7 @@ public OperatingSystemTypes osType() { } /** - * Set the osType value. + * Set the Operating System type. Possible values include: 'Windows', 'Linux'. * * @param osType the osType value to set * @return the DiskInner object itself. @@ -161,7 +161,7 @@ public DiskInner withOsType(OperatingSystemTypes osType) { } /** - * Get the creationData value. + * Get disk source information. CreationData information cannot be changed after the disk has been created. * * @return the creationData value */ @@ -170,7 +170,7 @@ public CreationData creationData() { } /** - * Set the creationData value. + * Set disk source information. CreationData information cannot be changed after the disk has been created. * * @param creationData the creationData value to set * @return the DiskInner object itself. @@ -181,7 +181,7 @@ public DiskInner withCreationData(CreationData creationData) { } /** - * Get the diskSizeGB value. + * Get 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. * * @return the diskSizeGB value */ @@ -190,7 +190,7 @@ public Integer diskSizeGB() { } /** - * Set the diskSizeGB value. + * Set 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. * * @param diskSizeGB the diskSizeGB value to set * @return the DiskInner object itself. @@ -201,7 +201,7 @@ public DiskInner withDiskSizeGB(Integer diskSizeGB) { } /** - * Get the encryptionSettings value. + * Get encryption settings for disk or snapshot. * * @return the encryptionSettings value */ @@ -210,7 +210,7 @@ public EncryptionSettings encryptionSettings() { } /** - * Set the encryptionSettings value. + * Set encryption settings for disk or snapshot. * * @param encryptionSettings the encryptionSettings value to set * @return the DiskInner object itself. @@ -221,7 +221,7 @@ public DiskInner withEncryptionSettings(EncryptionSettings encryptionSettings) { } /** - * Get the provisioningState value. + * Get the disk provisioning state. * * @return the provisioningState value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageInner.java index 4662339b5ed..bf47794fae3 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageInner.java @@ -40,7 +40,7 @@ public class ImageInner extends Resource { private String provisioningState; /** - * Get the sourceVirtualMachine value. + * Get the source virtual machine from which Image is created. * * @return the sourceVirtualMachine value */ @@ -49,7 +49,7 @@ public SubResource sourceVirtualMachine() { } /** - * Set the sourceVirtualMachine value. + * Set the source virtual machine from which Image is created. * * @param sourceVirtualMachine the sourceVirtualMachine value to set * @return the ImageInner object itself. @@ -60,7 +60,7 @@ public ImageInner withSourceVirtualMachine(SubResource sourceVirtualMachine) { } /** - * Get the storageProfile value. + * Get specifies the storage settings for the virtual machine disks. * * @return the storageProfile value */ @@ -69,7 +69,7 @@ public ImageStorageProfile storageProfile() { } /** - * Set the storageProfile value. + * Set specifies the storage settings for the virtual machine disks. * * @param storageProfile the storageProfile value to set * @return the ImageInner object itself. @@ -80,7 +80,7 @@ public ImageInner withStorageProfile(ImageStorageProfile storageProfile) { } /** - * Get the provisioningState value. + * Get the provisioning state. * * @return the provisioningState value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageReferenceInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageReferenceInner.java index 7ec601feaac..5fcf2ffcb0e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageReferenceInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageReferenceInner.java @@ -50,7 +50,7 @@ public class ImageReferenceInner extends SubResource { private String version; /** - * Get the publisher value. + * Get the image publisher. * * @return the publisher value */ @@ -59,7 +59,7 @@ public String publisher() { } /** - * Set the publisher value. + * Set the image publisher. * * @param publisher the publisher value to set * @return the ImageReferenceInner object itself. @@ -70,7 +70,7 @@ public ImageReferenceInner withPublisher(String publisher) { } /** - * Get the offer value. + * Get specifies the offer of the platform image or marketplace image used to create the virtual machine. * * @return the offer value */ @@ -79,7 +79,7 @@ public String offer() { } /** - * Set the offer value. + * Set specifies the offer of the platform image or marketplace image used to create the virtual machine. * * @param offer the offer value to set * @return the ImageReferenceInner object itself. @@ -90,7 +90,7 @@ public ImageReferenceInner withOffer(String offer) { } /** - * Get the sku value. + * Get the image SKU. * * @return the sku value */ @@ -99,7 +99,7 @@ public String sku() { } /** - * Set the sku value. + * Set the image SKU. * * @param sku the sku value to set * @return the ImageReferenceInner object itself. @@ -110,7 +110,7 @@ public ImageReferenceInner withSku(String sku) { } /** - * Get the version value. + * Get specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. * * @return the version value */ @@ -119,7 +119,7 @@ public String version() { } /** - * Set the version value. + * Set specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. * * @param version the version value to set * @return the ImageReferenceInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/InstanceViewStatusInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/InstanceViewStatusInner.java index 4072f36348c..eb52e5abe99 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/InstanceViewStatusInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/InstanceViewStatusInner.java @@ -47,7 +47,7 @@ public class InstanceViewStatusInner { private DateTime time; /** - * Get the code value. + * Get the status code. * * @return the code value */ @@ -56,7 +56,7 @@ public String code() { } /** - * Set the code value. + * Set the status code. * * @param code the code value to set * @return the InstanceViewStatusInner object itself. @@ -67,7 +67,7 @@ public InstanceViewStatusInner withCode(String code) { } /** - * Get the level value. + * Get the level code. Possible values include: 'Info', 'Warning', 'Error'. * * @return the level value */ @@ -76,7 +76,7 @@ public StatusLevelTypes level() { } /** - * Set the level value. + * Set the level code. Possible values include: 'Info', 'Warning', 'Error'. * * @param level the level value to set * @return the InstanceViewStatusInner object itself. @@ -87,7 +87,7 @@ public InstanceViewStatusInner withLevel(StatusLevelTypes level) { } /** - * Get the displayStatus value. + * Get the short localizable label for the status. * * @return the displayStatus value */ @@ -96,7 +96,7 @@ public String displayStatus() { } /** - * Set the displayStatus value. + * Set the short localizable label for the status. * * @param displayStatus the displayStatus value to set * @return the InstanceViewStatusInner object itself. @@ -107,7 +107,7 @@ public InstanceViewStatusInner withDisplayStatus(String displayStatus) { } /** - * Get the message value. + * Get the detailed status message, including for alerts and error messages. * * @return the message value */ @@ -116,7 +116,7 @@ public String message() { } /** - * Set the message value. + * Set the detailed status message, including for alerts and error messages. * * @param message the message value to set * @return the InstanceViewStatusInner object itself. @@ -127,7 +127,7 @@ public InstanceViewStatusInner withMessage(String message) { } /** - * Get the time value. + * Get the time of the status. * * @return the time value */ @@ -136,7 +136,7 @@ public DateTime time() { } /** - * Set the time value. + * Set the time of the status. * * @param time the time value to set * @return the InstanceViewStatusInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsOperationResultInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsOperationResultInner.java index 0e4a96c88ce..46707892610 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsOperationResultInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsOperationResultInner.java @@ -22,7 +22,7 @@ public class LogAnalyticsOperationResultInner { private LogAnalyticsOutput properties; /** - * Get the properties value. + * Get logAnalyticsOutput. * * @return the properties value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ManagedDiskParametersInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ManagedDiskParametersInner.java index f5a1963720c..0d83f24a107 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ManagedDiskParametersInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ManagedDiskParametersInner.java @@ -25,7 +25,7 @@ public class ManagedDiskParametersInner extends SubResource { private StorageAccountTypes storageAccountType; /** - * Get the storageAccountType value. + * Get specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @return the storageAccountType value */ @@ -34,7 +34,7 @@ public StorageAccountTypes storageAccountType() { } /** - * Set the storageAccountType value. + * Set specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @param storageAccountType the storageAccountType value to set * @return the ManagedDiskParametersInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/NetworkInterfaceReferenceInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/NetworkInterfaceReferenceInner.java index 72874d16db3..08da4736f4f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/NetworkInterfaceReferenceInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/NetworkInterfaceReferenceInner.java @@ -25,7 +25,7 @@ public class NetworkInterfaceReferenceInner extends SubResource { private Boolean primary; /** - * Get the primary value. + * Get specifies the primary network interface in case the virtual machine has more than 1 network interface. * * @return the primary value */ @@ -34,7 +34,7 @@ public Boolean primary() { } /** - * Set the primary value. + * Set specifies the primary network interface in case the virtual machine has more than 1 network interface. * * @param primary the primary value to set * @return the NetworkInterfaceReferenceInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RecoveryWalkResponseInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RecoveryWalkResponseInner.java index 1d2655887c0..76acea3a38f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RecoveryWalkResponseInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RecoveryWalkResponseInner.java @@ -28,7 +28,7 @@ public class RecoveryWalkResponseInner { private Integer nextPlatformUpdateDomain; /** - * Get the walkPerformed value. + * Get whether the recovery walk was performed. * * @return the walkPerformed value */ @@ -37,7 +37,7 @@ public Boolean walkPerformed() { } /** - * Get the nextPlatformUpdateDomain value. + * Get the next update domain that needs to be walked. Null means walk spanning all update domains has been completed. * * @return the nextPlatformUpdateDomain value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ResourceSkuInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ResourceSkuInner.java index 7635321cb74..3227cb45746 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ResourceSkuInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ResourceSkuInner.java @@ -103,7 +103,7 @@ public class ResourceSkuInner { private List restrictions; /** - * Get the resourceType value. + * Get the type of resource the SKU applies to. * * @return the resourceType value */ @@ -112,7 +112,7 @@ public String resourceType() { } /** - * Get the name value. + * Get the name of SKU. * * @return the name value */ @@ -121,7 +121,7 @@ public String name() { } /** - * Get the tier value. + * Get specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**. * * @return the tier value */ @@ -130,7 +130,7 @@ public String tier() { } /** - * Get the size value. + * Get the Size of the SKU. * * @return the size value */ @@ -139,7 +139,7 @@ public String size() { } /** - * Get the family value. + * Get the Family of this particular SKU. * * @return the family value */ @@ -148,7 +148,7 @@ public String family() { } /** - * Get the kind value. + * Get the Kind of resources that are supported in this SKU. * * @return the kind value */ @@ -157,7 +157,7 @@ public String kind() { } /** - * Get the capacity value. + * Get specifies the number of virtual machines in the scale set. * * @return the capacity value */ @@ -166,7 +166,7 @@ public ResourceSkuCapacity capacity() { } /** - * Get the locations value. + * Get the set of locations that the SKU is available. * * @return the locations value */ @@ -175,7 +175,7 @@ public List locations() { } /** - * Get the locationInfo value. + * Get a list of locations and availability zones in those locations where the SKU is available. * * @return the locationInfo value */ @@ -184,7 +184,7 @@ public List locationInfo() { } /** - * Get the apiVersions value. + * Get the api versions that support this SKU. * * @return the apiVersions value */ @@ -193,7 +193,7 @@ public List apiVersions() { } /** - * Get the costs value. + * Get metadata for retrieving price info. * * @return the costs value */ @@ -202,7 +202,7 @@ public List costs() { } /** - * Get the capabilities value. + * Get a name value pair to describe the capability. * * @return the capabilities value */ @@ -211,7 +211,7 @@ public List capabilities() { } /** - * Get the restrictions value. + * Get the restrictions because of which SKU cannot be used. This is empty if there are no restrictions. * * @return the restrictions value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RollingUpgradeStatusInfoInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RollingUpgradeStatusInfoInner.java index 433da4122a0..4e401fe7757 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RollingUpgradeStatusInfoInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RollingUpgradeStatusInfoInner.java @@ -47,7 +47,7 @@ public class RollingUpgradeStatusInfoInner extends Resource { private ApiError error; /** - * Get the policy value. + * Get the rolling upgrade policies applied for this upgrade. * * @return the policy value */ @@ -56,7 +56,7 @@ public RollingUpgradePolicy policy() { } /** - * Get the runningStatus value. + * Get information about the current running state of the overall upgrade. * * @return the runningStatus value */ @@ -65,7 +65,7 @@ public RollingUpgradeRunningStatus runningStatus() { } /** - * Get the progress value. + * Get information about the number of virtual machine instances in each upgrade state. * * @return the progress value */ @@ -74,7 +74,7 @@ public RollingUpgradeProgressInfo progress() { } /** - * Get the error value. + * Get error details for this upgrade, if there are any. * * @return the error value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RunCommandDocumentBaseInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RunCommandDocumentBaseInner.java index 80c586b0cfd..d5261f10412 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RunCommandDocumentBaseInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RunCommandDocumentBaseInner.java @@ -46,7 +46,7 @@ public class RunCommandDocumentBaseInner { private String description; /** - * Get the schema value. + * Get the VM run command schema. * * @return the schema value */ @@ -55,7 +55,7 @@ public String schema() { } /** - * Set the schema value. + * Set the VM run command schema. * * @param schema the schema value to set * @return the RunCommandDocumentBaseInner object itself. @@ -66,7 +66,7 @@ public RunCommandDocumentBaseInner withSchema(String schema) { } /** - * Get the id value. + * Get the VM run command id. * * @return the id value */ @@ -75,7 +75,7 @@ public String id() { } /** - * Set the id value. + * Set the VM run command id. * * @param id the id value to set * @return the RunCommandDocumentBaseInner object itself. @@ -86,7 +86,7 @@ public RunCommandDocumentBaseInner withId(String id) { } /** - * Get the osType value. + * Get the Operating System type. Possible values include: 'Windows', 'Linux'. * * @return the osType value */ @@ -95,7 +95,7 @@ public OperatingSystemTypes osType() { } /** - * Set the osType value. + * Set the Operating System type. Possible values include: 'Windows', 'Linux'. * * @param osType the osType value to set * @return the RunCommandDocumentBaseInner object itself. @@ -106,7 +106,7 @@ public RunCommandDocumentBaseInner withOsType(OperatingSystemTypes osType) { } /** - * Get the label value. + * Get the VM run command label. * * @return the label value */ @@ -115,7 +115,7 @@ public String label() { } /** - * Set the label value. + * Set the VM run command label. * * @param label the label value to set * @return the RunCommandDocumentBaseInner object itself. @@ -126,7 +126,7 @@ public RunCommandDocumentBaseInner withLabel(String label) { } /** - * Get the description value. + * Get the VM run command description. * * @return the description value */ @@ -135,7 +135,7 @@ public String description() { } /** - * Set the description value. + * Set the VM run command description. * * @param description the description value to set * @return the RunCommandDocumentBaseInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RunCommandDocumentInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RunCommandDocumentInner.java index c7c5af6f28e..a8b06b0d60d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RunCommandDocumentInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RunCommandDocumentInner.java @@ -29,7 +29,7 @@ public class RunCommandDocumentInner extends RunCommandDocumentBaseInner { private List parameters; /** - * Get the script value. + * Get the script to be executed. * * @return the script value */ @@ -38,7 +38,7 @@ public List script() { } /** - * Set the script value. + * Set the script to be executed. * * @param script the script value to set * @return the RunCommandDocumentInner object itself. @@ -49,7 +49,7 @@ public RunCommandDocumentInner withScript(List script) { } /** - * Get the parameters value. + * Get the parameters used by the script. * * @return the parameters value */ @@ -58,7 +58,7 @@ public List parameters() { } /** - * Set the parameters value. + * Set the parameters used by the script. * * @param parameters the parameters value to set * @return the RunCommandDocumentInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java index 851559f1d20..8fb631216b3 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java @@ -76,7 +76,7 @@ public class SnapshotInner extends Resource { private String provisioningState; /** - * Get the managedBy value. + * Get unused. Always Null. * * @return the managedBy value */ @@ -105,7 +105,7 @@ public SnapshotInner withSku(SnapshotSku sku) { } /** - * Get the timeCreated value. + * Get the time when the disk was created. * * @return the timeCreated value */ @@ -114,7 +114,7 @@ public DateTime timeCreated() { } /** - * Get the osType value. + * Get the Operating System type. Possible values include: 'Windows', 'Linux'. * * @return the osType value */ @@ -123,7 +123,7 @@ public OperatingSystemTypes osType() { } /** - * Set the osType value. + * Set the Operating System type. Possible values include: 'Windows', 'Linux'. * * @param osType the osType value to set * @return the SnapshotInner object itself. @@ -134,7 +134,7 @@ public SnapshotInner withOsType(OperatingSystemTypes osType) { } /** - * Get the creationData value. + * Get disk source information. CreationData information cannot be changed after the disk has been created. * * @return the creationData value */ @@ -143,7 +143,7 @@ public CreationData creationData() { } /** - * Set the creationData value. + * Set disk source information. CreationData information cannot be changed after the disk has been created. * * @param creationData the creationData value to set * @return the SnapshotInner object itself. @@ -154,7 +154,7 @@ public SnapshotInner withCreationData(CreationData creationData) { } /** - * Get the diskSizeGB value. + * Get 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. * * @return the diskSizeGB value */ @@ -163,7 +163,7 @@ public Integer diskSizeGB() { } /** - * Set the diskSizeGB value. + * Set 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. * * @param diskSizeGB the diskSizeGB value to set * @return the SnapshotInner object itself. @@ -174,7 +174,7 @@ public SnapshotInner withDiskSizeGB(Integer diskSizeGB) { } /** - * Get the encryptionSettings value. + * Get encryption settings for disk or snapshot. * * @return the encryptionSettings value */ @@ -183,7 +183,7 @@ public EncryptionSettings encryptionSettings() { } /** - * Set the encryptionSettings value. + * Set encryption settings for disk or snapshot. * * @param encryptionSettings the encryptionSettings value to set * @return the SnapshotInner object itself. @@ -194,7 +194,7 @@ public SnapshotInner withEncryptionSettings(EncryptionSettings encryptionSetting } /** - * Get the provisioningState value. + * Get the disk provisioning state. * * @return the provisioningState value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UpgradeOperationHistoricalStatusInfoInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UpgradeOperationHistoricalStatusInfoInner.java index 18e68d2cb21..b828db2abc1 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UpgradeOperationHistoricalStatusInfoInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UpgradeOperationHistoricalStatusInfoInner.java @@ -34,7 +34,7 @@ public class UpgradeOperationHistoricalStatusInfoInner { private String location; /** - * Get the properties value. + * Get information about the properties of the upgrade operation. * * @return the properties value */ @@ -43,7 +43,7 @@ public UpgradeOperationHistoricalStatusInfoProperties properties() { } /** - * Get the type value. + * Get resource type. * * @return the type value */ @@ -52,7 +52,7 @@ public String type() { } /** - * Get the location value. + * Get resource location. * * @return the location value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsageInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsageInner.java index 71d78eadc2a..eff6355dbf3 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsageInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsageInner.java @@ -41,13 +41,16 @@ public class UsageInner { /** * Creates an instance of UsageInner class. + * @param currentValue the current usage of the resource. + * @param limit the maximum permitted usage of the resource. + * @param name the name of the type of usage. */ public UsageInner() { unit = "Count"; } /** - * Get the unit value. + * Get an enum describing the unit of usage measurement. * * @return the unit value */ @@ -56,7 +59,7 @@ public String unit() { } /** - * Set the unit value. + * Set an enum describing the unit of usage measurement. * * @param unit the unit value to set * @return the UsageInner object itself. @@ -67,7 +70,7 @@ public UsageInner withUnit(String unit) { } /** - * Get the currentValue value. + * Get the current usage of the resource. * * @return the currentValue value */ @@ -76,7 +79,7 @@ public int currentValue() { } /** - * Set the currentValue value. + * Set the current usage of the resource. * * @param currentValue the currentValue value to set * @return the UsageInner object itself. @@ -87,7 +90,7 @@ public UsageInner withCurrentValue(int currentValue) { } /** - * Get the limit value. + * Get the maximum permitted usage of the resource. * * @return the limit value */ @@ -96,7 +99,7 @@ public long limit() { } /** - * Set the limit value. + * Set the maximum permitted usage of the resource. * * @param limit the limit value to set * @return the UsageInner object itself. @@ -107,7 +110,7 @@ public UsageInner withLimit(long limit) { } /** - * Get the name value. + * Get the name of the type of usage. * * @return the name value */ @@ -116,7 +119,7 @@ public UsageName name() { } /** - * Set the name value. + * Set the name of the type of usage. * * @param name the name value to set * @return the UsageInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineCaptureResultInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineCaptureResultInner.java index 14721c0ab94..6c6dc22ec15 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineCaptureResultInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineCaptureResultInner.java @@ -41,7 +41,7 @@ public class VirtualMachineCaptureResultInner extends SubResource { private List resources; /** - * Get the schema value. + * Get the schema of the captured virtual machine. * * @return the schema value */ @@ -50,7 +50,7 @@ public String schema() { } /** - * Get the contentVersion value. + * Get the version of the content. * * @return the contentVersion value */ @@ -59,7 +59,7 @@ public String contentVersion() { } /** - * Get the parameters value. + * Get parameters of the captured virtual machine. * * @return the parameters value */ @@ -68,7 +68,7 @@ public Object parameters() { } /** - * Get the resources value. + * Get a list of resource items of the captured virtual machine. * * @return the resources value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageInner.java index b673c7d5771..01d3ca4e013 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageInner.java @@ -52,7 +52,7 @@ public class VirtualMachineExtensionImageInner extends Resource { private Boolean supportsMultipleExtensions; /** - * Get the operatingSystem value. + * Get the operating system this extension supports. * * @return the operatingSystem value */ @@ -61,7 +61,7 @@ public String operatingSystem() { } /** - * Set the operatingSystem value. + * Set the operating system this extension supports. * * @param operatingSystem the operatingSystem value to set * @return the VirtualMachineExtensionImageInner object itself. @@ -72,7 +72,7 @@ public VirtualMachineExtensionImageInner withOperatingSystem(String operatingSys } /** - * Get the computeRole value. + * Get the type of role (IaaS or PaaS) this extension supports. * * @return the computeRole value */ @@ -81,7 +81,7 @@ public String computeRole() { } /** - * Set the computeRole value. + * Set the type of role (IaaS or PaaS) this extension supports. * * @param computeRole the computeRole value to set * @return the VirtualMachineExtensionImageInner object itself. @@ -92,7 +92,7 @@ public VirtualMachineExtensionImageInner withComputeRole(String computeRole) { } /** - * Get the handlerSchema value. + * Get the schema defined by publisher, where extension consumers should provide settings in a matching schema. * * @return the handlerSchema value */ @@ -101,7 +101,7 @@ public String handlerSchema() { } /** - * Set the handlerSchema value. + * Set the schema defined by publisher, where extension consumers should provide settings in a matching schema. * * @param handlerSchema the handlerSchema value to set * @return the VirtualMachineExtensionImageInner object itself. @@ -112,7 +112,7 @@ public VirtualMachineExtensionImageInner withHandlerSchema(String handlerSchema) } /** - * Get the vmScaleSetEnabled value. + * Get whether the extension can be used on xRP VMScaleSets. By default existing extensions are usable on scalesets, but there might be cases where a publisher wants to explicitly indicate the extension is only enabled for CRP VMs but not VMSS. * * @return the vmScaleSetEnabled value */ @@ -121,7 +121,7 @@ public Boolean vmScaleSetEnabled() { } /** - * Set the vmScaleSetEnabled value. + * Set whether the extension can be used on xRP VMScaleSets. By default existing extensions are usable on scalesets, but there might be cases where a publisher wants to explicitly indicate the extension is only enabled for CRP VMs but not VMSS. * * @param vmScaleSetEnabled the vmScaleSetEnabled value to set * @return the VirtualMachineExtensionImageInner object itself. @@ -132,7 +132,7 @@ public VirtualMachineExtensionImageInner withVmScaleSetEnabled(Boolean vmScaleSe } /** - * Get the supportsMultipleExtensions value. + * Get whether the handler can support multiple extensions. * * @return the supportsMultipleExtensions value */ @@ -141,7 +141,7 @@ public Boolean supportsMultipleExtensions() { } /** - * Set the supportsMultipleExtensions value. + * Set whether the handler can support multiple extensions. * * @param supportsMultipleExtensions the supportsMultipleExtensions value to set * @return the VirtualMachineExtensionImageInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionInner.java index 10a9b16caa9..f8871c56081 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionInner.java @@ -79,7 +79,7 @@ public class VirtualMachineExtensionInner extends Resource { private VirtualMachineExtensionInstanceView instanceView; /** - * Get the forceUpdateTag value. + * Get how the extension handler should be forced to update even if the extension configuration has not changed. * * @return the forceUpdateTag value */ @@ -88,7 +88,7 @@ public String forceUpdateTag() { } /** - * Set the forceUpdateTag value. + * Set how the extension handler should be forced to update even if the extension configuration has not changed. * * @param forceUpdateTag the forceUpdateTag value to set * @return the VirtualMachineExtensionInner object itself. @@ -99,7 +99,7 @@ public VirtualMachineExtensionInner withForceUpdateTag(String forceUpdateTag) { } /** - * Get the publisher value. + * Get the name of the extension handler publisher. * * @return the publisher value */ @@ -108,7 +108,7 @@ public String publisher() { } /** - * Set the publisher value. + * Set the name of the extension handler publisher. * * @param publisher the publisher value to set * @return the VirtualMachineExtensionInner object itself. @@ -119,7 +119,7 @@ public VirtualMachineExtensionInner withPublisher(String publisher) { } /** - * Get the virtualMachineExtensionType value. + * Get specifies the type of the extension; an example is "CustomScriptExtension". * * @return the virtualMachineExtensionType value */ @@ -128,7 +128,7 @@ public String virtualMachineExtensionType() { } /** - * Set the virtualMachineExtensionType value. + * Set specifies the type of the extension; an example is "CustomScriptExtension". * * @param virtualMachineExtensionType the virtualMachineExtensionType value to set * @return the VirtualMachineExtensionInner object itself. @@ -139,7 +139,7 @@ public VirtualMachineExtensionInner withVirtualMachineExtensionType(String virtu } /** - * Get the typeHandlerVersion value. + * Get specifies the version of the script handler. * * @return the typeHandlerVersion value */ @@ -148,7 +148,7 @@ public String typeHandlerVersion() { } /** - * Set the typeHandlerVersion value. + * Set specifies the version of the script handler. * * @param typeHandlerVersion the typeHandlerVersion value to set * @return the VirtualMachineExtensionInner object itself. @@ -159,7 +159,7 @@ public VirtualMachineExtensionInner withTypeHandlerVersion(String typeHandlerVer } /** - * Get the autoUpgradeMinorVersion value. + * Get 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. * * @return the autoUpgradeMinorVersion value */ @@ -168,7 +168,7 @@ public Boolean autoUpgradeMinorVersion() { } /** - * Set the autoUpgradeMinorVersion value. + * Set 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. * * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set * @return the VirtualMachineExtensionInner object itself. @@ -179,7 +179,7 @@ public VirtualMachineExtensionInner withAutoUpgradeMinorVersion(Boolean autoUpgr } /** - * Get the settings value. + * Get json formatted public settings for the extension. * * @return the settings value */ @@ -188,7 +188,7 @@ public Object settings() { } /** - * Set the settings value. + * Set json formatted public settings for the extension. * * @param settings the settings value to set * @return the VirtualMachineExtensionInner object itself. @@ -199,7 +199,7 @@ public VirtualMachineExtensionInner withSettings(Object settings) { } /** - * Get the protectedSettings value. + * Get the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. * * @return the protectedSettings value */ @@ -208,7 +208,7 @@ public Object protectedSettings() { } /** - * Set the protectedSettings value. + * Set the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. * * @param protectedSettings the protectedSettings value to set * @return the VirtualMachineExtensionInner object itself. @@ -219,7 +219,7 @@ public VirtualMachineExtensionInner withProtectedSettings(Object protectedSettin } /** - * Get the provisioningState value. + * Get the provisioning state, which only appears in the response. * * @return the provisioningState value */ @@ -228,7 +228,7 @@ public String provisioningState() { } /** - * Get the instanceView value. + * Get the virtual machine extension instance view. * * @return the instanceView value */ @@ -237,7 +237,7 @@ public VirtualMachineExtensionInstanceView instanceView() { } /** - * Set the instanceView value. + * Set the virtual machine extension instance view. * * @param instanceView the instanceView value to set * @return the VirtualMachineExtensionInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsListResultInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsListResultInner.java index 35ae87eec32..d7552310e2d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsListResultInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsListResultInner.java @@ -22,7 +22,7 @@ public class VirtualMachineExtensionsListResultInner { private List value; /** - * Get the value value. + * Get the list of extensions. * * @return the value value */ @@ -31,7 +31,7 @@ public List value() { } /** - * Set the value value. + * Set the list of extensions. * * @param value the value value to set * @return the VirtualMachineExtensionsListResultInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImageResourceInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImageResourceInner.java index bf9d4d0f0e9..9c18ab1e9b0 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImageResourceInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImageResourceInner.java @@ -37,7 +37,7 @@ public class VirtualMachineImageResourceInner extends SubResource { private Map tags; /** - * Get the name value. + * Get the name of the resource. * * @return the name value */ @@ -46,7 +46,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource. * * @param name the name value to set * @return the VirtualMachineImageResourceInner object itself. @@ -57,7 +57,7 @@ public VirtualMachineImageResourceInner withName(String name) { } /** - * Get the location value. + * Get the supported Azure location of the resource. * * @return the location value */ @@ -66,7 +66,7 @@ public String location() { } /** - * Set the location value. + * Set the supported Azure location of the resource. * * @param location the location value to set * @return the VirtualMachineImageResourceInner object itself. @@ -77,7 +77,7 @@ public VirtualMachineImageResourceInner withLocation(String location) { } /** - * Get the tags value. + * Get specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). * * @return the tags value */ @@ -86,7 +86,7 @@ public Map tags() { } /** - * Set the tags value. + * Set specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). * * @param tags the tags value to set * @return the VirtualMachineImageResourceInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInner.java index 95b866ced05..f6ce5056050 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInner.java @@ -140,7 +140,7 @@ public class VirtualMachineInner extends Resource { private List zones; /** - * Get the plan value. + * Get 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**. * * @return the plan value */ @@ -149,7 +149,7 @@ public Plan plan() { } /** - * Set the plan value. + * Set 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**. * * @param plan the plan value to set * @return the VirtualMachineInner object itself. @@ -160,7 +160,7 @@ public VirtualMachineInner withPlan(Plan plan) { } /** - * Get the hardwareProfile value. + * Get specifies the hardware settings for the virtual machine. * * @return the hardwareProfile value */ @@ -169,7 +169,7 @@ public HardwareProfile hardwareProfile() { } /** - * Set the hardwareProfile value. + * Set specifies the hardware settings for the virtual machine. * * @param hardwareProfile the hardwareProfile value to set * @return the VirtualMachineInner object itself. @@ -180,7 +180,7 @@ public VirtualMachineInner withHardwareProfile(HardwareProfile hardwareProfile) } /** - * Get the storageProfile value. + * Get specifies the storage settings for the virtual machine disks. * * @return the storageProfile value */ @@ -189,7 +189,7 @@ public StorageProfile storageProfile() { } /** - * Set the storageProfile value. + * Set specifies the storage settings for the virtual machine disks. * * @param storageProfile the storageProfile value to set * @return the VirtualMachineInner object itself. @@ -200,7 +200,7 @@ public VirtualMachineInner withStorageProfile(StorageProfile storageProfile) { } /** - * Get the osProfile value. + * Get specifies the operating system settings for the virtual machine. * * @return the osProfile value */ @@ -209,7 +209,7 @@ public OSProfile osProfile() { } /** - * Set the osProfile value. + * Set specifies the operating system settings for the virtual machine. * * @param osProfile the osProfile value to set * @return the VirtualMachineInner object itself. @@ -220,7 +220,7 @@ public VirtualMachineInner withOsProfile(OSProfile osProfile) { } /** - * Get the networkProfile value. + * Get specifies the network interfaces of the virtual machine. * * @return the networkProfile value */ @@ -229,7 +229,7 @@ public NetworkProfile networkProfile() { } /** - * Set the networkProfile value. + * Set specifies the network interfaces of the virtual machine. * * @param networkProfile the networkProfile value to set * @return the VirtualMachineInner object itself. @@ -240,7 +240,7 @@ public VirtualMachineInner withNetworkProfile(NetworkProfile networkProfile) { } /** - * Get the diagnosticsProfile value. + * Get specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. * * @return the diagnosticsProfile value */ @@ -249,7 +249,7 @@ public DiagnosticsProfile diagnosticsProfile() { } /** - * Set the diagnosticsProfile value. + * Set specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. * * @param diagnosticsProfile the diagnosticsProfile value to set * @return the VirtualMachineInner object itself. @@ -260,7 +260,7 @@ public VirtualMachineInner withDiagnosticsProfile(DiagnosticsProfile diagnostics } /** - * Get the availabilitySet value. + * Get 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. * * @return the availabilitySet value */ @@ -269,7 +269,7 @@ public SubResource availabilitySet() { } /** - * Set the availabilitySet value. + * Set 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. * * @param availabilitySet the availabilitySet value to set * @return the VirtualMachineInner object itself. @@ -280,7 +280,7 @@ public VirtualMachineInner withAvailabilitySet(SubResource availabilitySet) { } /** - * Get the provisioningState value. + * Get the provisioning state, which only appears in the response. * * @return the provisioningState value */ @@ -289,7 +289,7 @@ public String provisioningState() { } /** - * Get the instanceView value. + * Get the virtual machine instance view. * * @return the instanceView value */ @@ -298,7 +298,7 @@ public VirtualMachineInstanceViewInner instanceView() { } /** - * Get the licenseType value. + * Get 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. * * @return the licenseType value */ @@ -307,7 +307,7 @@ public String licenseType() { } /** - * Set the licenseType value. + * Set 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. * * @param licenseType the licenseType value to set * @return the VirtualMachineInner object itself. @@ -318,7 +318,7 @@ public VirtualMachineInner withLicenseType(String licenseType) { } /** - * Get the vmId value. + * Get 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. * * @return the vmId value */ @@ -327,7 +327,7 @@ public String vmId() { } /** - * Get the resources value. + * Get the virtual machine child extension resources. * * @return the resources value */ @@ -336,7 +336,7 @@ public List resources() { } /** - * Get the identity value. + * Get the identity of the virtual machine, if configured. * * @return the identity value */ @@ -345,7 +345,7 @@ public VirtualMachineIdentity identity() { } /** - * Set the identity value. + * Set the identity of the virtual machine, if configured. * * @param identity the identity value to set * @return the VirtualMachineInner object itself. @@ -356,7 +356,7 @@ public VirtualMachineInner withIdentity(VirtualMachineIdentity identity) { } /** - * Get the zones value. + * Get the virtual machine zones. * * @return the zones value */ @@ -365,7 +365,7 @@ public List zones() { } /** - * Set the zones value. + * Set the virtual machine zones. * * @param zones the zones value to set * @return the VirtualMachineInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java index c0ac832e016..390eaf31a3b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java @@ -98,7 +98,7 @@ public class VirtualMachineInstanceViewInner { private List statuses; /** - * Get the platformUpdateDomain value. + * Get specifies the update domain of the virtual machine. * * @return the platformUpdateDomain value */ @@ -107,7 +107,7 @@ public Integer platformUpdateDomain() { } /** - * Set the platformUpdateDomain value. + * Set specifies the update domain of the virtual machine. * * @param platformUpdateDomain the platformUpdateDomain value to set * @return the VirtualMachineInstanceViewInner object itself. @@ -118,7 +118,7 @@ public VirtualMachineInstanceViewInner withPlatformUpdateDomain(Integer platform } /** - * Get the platformFaultDomain value. + * Get specifies the fault domain of the virtual machine. * * @return the platformFaultDomain value */ @@ -127,7 +127,7 @@ public Integer platformFaultDomain() { } /** - * Set the platformFaultDomain value. + * Set specifies the fault domain of the virtual machine. * * @param platformFaultDomain the platformFaultDomain value to set * @return the VirtualMachineInstanceViewInner object itself. @@ -138,7 +138,7 @@ public VirtualMachineInstanceViewInner withPlatformFaultDomain(Integer platformF } /** - * Get the computerName value. + * Get the computer name assigned to the virtual machine. * * @return the computerName value */ @@ -147,7 +147,7 @@ public String computerName() { } /** - * Set the computerName value. + * Set the computer name assigned to the virtual machine. * * @param computerName the computerName value to set * @return the VirtualMachineInstanceViewInner object itself. @@ -158,7 +158,7 @@ public VirtualMachineInstanceViewInner withComputerName(String computerName) { } /** - * Get the osName value. + * Get the Operating System running on the virtual machine. * * @return the osName value */ @@ -167,7 +167,7 @@ public String osName() { } /** - * Set the osName value. + * Set the Operating System running on the virtual machine. * * @param osName the osName value to set * @return the VirtualMachineInstanceViewInner object itself. @@ -178,7 +178,7 @@ public VirtualMachineInstanceViewInner withOsName(String osName) { } /** - * Get the osVersion value. + * Get the version of Operating System running on the virtual machine. * * @return the osVersion value */ @@ -187,7 +187,7 @@ public String osVersion() { } /** - * Set the osVersion value. + * Set the version of Operating System running on the virtual machine. * * @param osVersion the osVersion value to set * @return the VirtualMachineInstanceViewInner object itself. @@ -198,7 +198,7 @@ public VirtualMachineInstanceViewInner withOsVersion(String osVersion) { } /** - * Get the rdpThumbPrint value. + * Get the Remote desktop certificate thumbprint. * * @return the rdpThumbPrint value */ @@ -207,7 +207,7 @@ public String rdpThumbPrint() { } /** - * Set the rdpThumbPrint value. + * Set the Remote desktop certificate thumbprint. * * @param rdpThumbPrint the rdpThumbPrint value to set * @return the VirtualMachineInstanceViewInner object itself. @@ -218,7 +218,7 @@ public VirtualMachineInstanceViewInner withRdpThumbPrint(String rdpThumbPrint) { } /** - * Get the vmAgent value. + * Get the VM Agent running on the virtual machine. * * @return the vmAgent value */ @@ -227,7 +227,7 @@ public VirtualMachineAgentInstanceView vmAgent() { } /** - * Set the vmAgent value. + * Set the VM Agent running on the virtual machine. * * @param vmAgent the vmAgent value to set * @return the VirtualMachineInstanceViewInner object itself. @@ -238,7 +238,7 @@ public VirtualMachineInstanceViewInner withVmAgent(VirtualMachineAgentInstanceVi } /** - * Get the maintenanceRedeployStatus value. + * Get the Maintenance Operation status on the virtual machine. * * @return the maintenanceRedeployStatus value */ @@ -247,7 +247,7 @@ public MaintenanceRedeployStatus maintenanceRedeployStatus() { } /** - * Set the maintenanceRedeployStatus value. + * Set the Maintenance Operation status on the virtual machine. * * @param maintenanceRedeployStatus the maintenanceRedeployStatus value to set * @return the VirtualMachineInstanceViewInner object itself. @@ -258,7 +258,7 @@ public VirtualMachineInstanceViewInner withMaintenanceRedeployStatus(Maintenance } /** - * Get the disks value. + * Get the virtual machine disk information. * * @return the disks value */ @@ -267,7 +267,7 @@ public List disks() { } /** - * Set the disks value. + * Set the virtual machine disk information. * * @param disks the disks value to set * @return the VirtualMachineInstanceViewInner object itself. @@ -278,7 +278,7 @@ public VirtualMachineInstanceViewInner withDisks(List disks) { } /** - * Get the extensions value. + * Get the extensions information. * * @return the extensions value */ @@ -287,7 +287,7 @@ public List extensions() { } /** - * Set the extensions value. + * Set the extensions information. * * @param extensions the extensions value to set * @return the VirtualMachineInstanceViewInner object itself. @@ -298,7 +298,7 @@ public VirtualMachineInstanceViewInner withExtensions(List statuses() { } /** - * Set the statuses value. + * Set the resource status information. * * @param statuses the statuses value to set * @return the VirtualMachineInstanceViewInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionInner.java index b5f5e0e6c35..462d8d445d7 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionInner.java @@ -79,7 +79,7 @@ public class VirtualMachineScaleSetExtensionInner extends SubResourceReadOnly { private String provisioningState; /** - * Get the name value. + * Get the name of the extension. * * @return the name value */ @@ -88,7 +88,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the extension. * * @param name the name value to set * @return the VirtualMachineScaleSetExtensionInner object itself. @@ -99,7 +99,7 @@ public VirtualMachineScaleSetExtensionInner withName(String name) { } /** - * Get the forceUpdateTag value. + * Get if a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed. * * @return the forceUpdateTag value */ @@ -108,7 +108,7 @@ public String forceUpdateTag() { } /** - * Set the forceUpdateTag value. + * Set if a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed. * * @param forceUpdateTag the forceUpdateTag value to set * @return the VirtualMachineScaleSetExtensionInner object itself. @@ -119,7 +119,7 @@ public VirtualMachineScaleSetExtensionInner withForceUpdateTag(String forceUpdat } /** - * Get the publisher value. + * Get the name of the extension handler publisher. * * @return the publisher value */ @@ -128,7 +128,7 @@ public String publisher() { } /** - * Set the publisher value. + * Set the name of the extension handler publisher. * * @param publisher the publisher value to set * @return the VirtualMachineScaleSetExtensionInner object itself. @@ -139,7 +139,7 @@ public VirtualMachineScaleSetExtensionInner withPublisher(String publisher) { } /** - * Get the type value. + * Get specifies the type of the extension; an example is "CustomScriptExtension". * * @return the type value */ @@ -148,7 +148,7 @@ public String type() { } /** - * Set the type value. + * Set specifies the type of the extension; an example is "CustomScriptExtension". * * @param type the type value to set * @return the VirtualMachineScaleSetExtensionInner object itself. @@ -159,7 +159,7 @@ public VirtualMachineScaleSetExtensionInner withType(String type) { } /** - * Get the typeHandlerVersion value. + * Get specifies the version of the script handler. * * @return the typeHandlerVersion value */ @@ -168,7 +168,7 @@ public String typeHandlerVersion() { } /** - * Set the typeHandlerVersion value. + * Set specifies the version of the script handler. * * @param typeHandlerVersion the typeHandlerVersion value to set * @return the VirtualMachineScaleSetExtensionInner object itself. @@ -179,7 +179,7 @@ public VirtualMachineScaleSetExtensionInner withTypeHandlerVersion(String typeHa } /** - * Get the autoUpgradeMinorVersion value. + * Get 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. * * @return the autoUpgradeMinorVersion value */ @@ -188,7 +188,7 @@ public Boolean autoUpgradeMinorVersion() { } /** - * Set the autoUpgradeMinorVersion value. + * Set 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. * * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set * @return the VirtualMachineScaleSetExtensionInner object itself. @@ -199,7 +199,7 @@ public VirtualMachineScaleSetExtensionInner withAutoUpgradeMinorVersion(Boolean } /** - * Get the settings value. + * Get json formatted public settings for the extension. * * @return the settings value */ @@ -208,7 +208,7 @@ public Object settings() { } /** - * Set the settings value. + * Set json formatted public settings for the extension. * * @param settings the settings value to set * @return the VirtualMachineScaleSetExtensionInner object itself. @@ -219,7 +219,7 @@ public VirtualMachineScaleSetExtensionInner withSettings(Object settings) { } /** - * Get the protectedSettings value. + * Get the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. * * @return the protectedSettings value */ @@ -228,7 +228,7 @@ public Object protectedSettings() { } /** - * Set the protectedSettings value. + * Set the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. * * @param protectedSettings the protectedSettings value to set * @return the VirtualMachineScaleSetExtensionInner object itself. @@ -239,7 +239,7 @@ public VirtualMachineScaleSetExtensionInner withProtectedSettings(Object protect } /** - * Get the provisioningState value. + * Get the provisioning state, which only appears in the response. * * @return the provisioningState value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetIPConfigurationInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetIPConfigurationInner.java index 22b180d47f1..663f6fe0bb1 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetIPConfigurationInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetIPConfigurationInner.java @@ -83,7 +83,7 @@ public class VirtualMachineScaleSetIPConfigurationInner extends SubResource { private List loadBalancerInboundNatPools; /** - * Get the name value. + * Get the IP configuration name. * * @return the name value */ @@ -92,7 +92,7 @@ public String name() { } /** - * Set the name value. + * Set the IP configuration name. * * @param name the name value to set * @return the VirtualMachineScaleSetIPConfigurationInner object itself. @@ -103,7 +103,7 @@ public VirtualMachineScaleSetIPConfigurationInner withName(String name) { } /** - * Get the subnet value. + * Get specifies the identifier of the subnet. * * @return the subnet value */ @@ -112,7 +112,7 @@ public ApiEntityReference subnet() { } /** - * Set the subnet value. + * Set specifies the identifier of the subnet. * * @param subnet the subnet value to set * @return the VirtualMachineScaleSetIPConfigurationInner object itself. @@ -123,7 +123,7 @@ public VirtualMachineScaleSetIPConfigurationInner withSubnet(ApiEntityReference } /** - * Get the primary value. + * Get specifies the primary network interface in case the virtual machine has more than 1 network interface. * * @return the primary value */ @@ -132,7 +132,7 @@ public Boolean primary() { } /** - * Set the primary value. + * Set specifies the primary network interface in case the virtual machine has more than 1 network interface. * * @param primary the primary value to set * @return the VirtualMachineScaleSetIPConfigurationInner object itself. @@ -143,7 +143,7 @@ public VirtualMachineScaleSetIPConfigurationInner withPrimary(Boolean primary) { } /** - * Get the publicIPAddressConfiguration value. + * Get the publicIPAddressConfiguration. * * @return the publicIPAddressConfiguration value */ @@ -152,7 +152,7 @@ public VirtualMachineScaleSetPublicIPAddressConfiguration publicIPAddressConfigu } /** - * Set the publicIPAddressConfiguration value. + * Set the publicIPAddressConfiguration. * * @param publicIPAddressConfiguration the publicIPAddressConfiguration value to set * @return the VirtualMachineScaleSetIPConfigurationInner object itself. @@ -163,7 +163,7 @@ public VirtualMachineScaleSetIPConfigurationInner withPublicIPAddressConfigurati } /** - * Get the privateIPAddressVersion value. + * Get available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'. * * @return the privateIPAddressVersion value */ @@ -172,7 +172,7 @@ public IPVersion privateIPAddressVersion() { } /** - * Set the privateIPAddressVersion value. + * Set available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'. * * @param privateIPAddressVersion the privateIPAddressVersion value to set * @return the VirtualMachineScaleSetIPConfigurationInner object itself. @@ -183,7 +183,7 @@ public VirtualMachineScaleSetIPConfigurationInner withPrivateIPAddressVersion(IP } /** - * Get the applicationGatewayBackendAddressPools value. + * Get specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway. * * @return the applicationGatewayBackendAddressPools value */ @@ -192,7 +192,7 @@ public List applicationGatewayBackendAddressPools() { } /** - * Set the applicationGatewayBackendAddressPools value. + * Set specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway. * * @param applicationGatewayBackendAddressPools the applicationGatewayBackendAddressPools value to set * @return the VirtualMachineScaleSetIPConfigurationInner object itself. @@ -203,7 +203,7 @@ public VirtualMachineScaleSetIPConfigurationInner withApplicationGatewayBackendA } /** - * Get the loadBalancerBackendAddressPools value. + * Get specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer. * * @return the loadBalancerBackendAddressPools value */ @@ -212,7 +212,7 @@ public List loadBalancerBackendAddressPools() { } /** - * Set the loadBalancerBackendAddressPools value. + * Set specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer. * * @param loadBalancerBackendAddressPools the loadBalancerBackendAddressPools value to set * @return the VirtualMachineScaleSetIPConfigurationInner object itself. @@ -223,7 +223,7 @@ public VirtualMachineScaleSetIPConfigurationInner withLoadBalancerBackendAddress } /** - * Get the loadBalancerInboundNatPools value. + * Get specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer. * * @return the loadBalancerInboundNatPools value */ @@ -232,7 +232,7 @@ public List loadBalancerInboundNatPools() { } /** - * Set the loadBalancerInboundNatPools value. + * Set specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer. * * @param loadBalancerInboundNatPools the loadBalancerInboundNatPools value to set * @return the VirtualMachineScaleSetIPConfigurationInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java index 2bc0e32a743..552d8b19edb 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java @@ -105,7 +105,7 @@ public class VirtualMachineScaleSetInner extends Resource { private List zones; /** - * Get the sku value. + * Get the virtual machine scale set sku. * * @return the sku value */ @@ -114,7 +114,7 @@ public Sku sku() { } /** - * Set the sku value. + * Set the virtual machine scale set sku. * * @param sku the sku value to set * @return the VirtualMachineScaleSetInner object itself. @@ -125,7 +125,7 @@ public VirtualMachineScaleSetInner withSku(Sku sku) { } /** - * Get the plan value. + * Get 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**. * * @return the plan value */ @@ -134,7 +134,7 @@ public Plan plan() { } /** - * Set the plan value. + * Set 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**. * * @param plan the plan value to set * @return the VirtualMachineScaleSetInner object itself. @@ -145,7 +145,7 @@ public VirtualMachineScaleSetInner withPlan(Plan plan) { } /** - * Get the upgradePolicy value. + * Get the upgrade policy. * * @return the upgradePolicy value */ @@ -154,7 +154,7 @@ public UpgradePolicy upgradePolicy() { } /** - * Set the upgradePolicy value. + * Set the upgrade policy. * * @param upgradePolicy the upgradePolicy value to set * @return the VirtualMachineScaleSetInner object itself. @@ -165,7 +165,7 @@ public VirtualMachineScaleSetInner withUpgradePolicy(UpgradePolicy upgradePolicy } /** - * Get the virtualMachineProfile value. + * Get the virtual machine profile. * * @return the virtualMachineProfile value */ @@ -174,7 +174,7 @@ public VirtualMachineScaleSetVMProfile virtualMachineProfile() { } /** - * Set the virtualMachineProfile value. + * Set the virtual machine profile. * * @param virtualMachineProfile the virtualMachineProfile value to set * @return the VirtualMachineScaleSetInner object itself. @@ -185,7 +185,7 @@ public VirtualMachineScaleSetInner withVirtualMachineProfile(VirtualMachineScale } /** - * Get the provisioningState value. + * Get the provisioning state, which only appears in the response. * * @return the provisioningState value */ @@ -194,7 +194,7 @@ public String provisioningState() { } /** - * Get the overprovision value. + * Get specifies whether the Virtual Machine Scale Set should be overprovisioned. * * @return the overprovision value */ @@ -203,7 +203,7 @@ public Boolean overprovision() { } /** - * Set the overprovision value. + * Set specifies whether the Virtual Machine Scale Set should be overprovisioned. * * @param overprovision the overprovision value to set * @return the VirtualMachineScaleSetInner object itself. @@ -214,7 +214,7 @@ public VirtualMachineScaleSetInner withOverprovision(Boolean overprovision) { } /** - * Get the uniqueId value. + * Get specifies the ID which uniquely identifies a Virtual Machine Scale Set. * * @return the uniqueId value */ @@ -223,7 +223,7 @@ public String uniqueId() { } /** - * Get the singlePlacementGroup value. + * Get when true this limits the scale set to a single placement group, of max size 100 virtual machines. * * @return the singlePlacementGroup value */ @@ -232,7 +232,7 @@ public Boolean singlePlacementGroup() { } /** - * Set the singlePlacementGroup value. + * Set when true this limits the scale set to a single placement group, of max size 100 virtual machines. * * @param singlePlacementGroup the singlePlacementGroup value to set * @return the VirtualMachineScaleSetInner object itself. @@ -243,7 +243,7 @@ public VirtualMachineScaleSetInner withSinglePlacementGroup(Boolean singlePlacem } /** - * Get the zoneBalance value. + * Get whether to force stictly even Virtual Machine distribution cross x-zones in case there is zone outage. * * @return the zoneBalance value */ @@ -252,7 +252,7 @@ public Boolean zoneBalance() { } /** - * Set the zoneBalance value. + * Set whether to force stictly even Virtual Machine distribution cross x-zones in case there is zone outage. * * @param zoneBalance the zoneBalance value to set * @return the VirtualMachineScaleSetInner object itself. @@ -263,7 +263,7 @@ public VirtualMachineScaleSetInner withZoneBalance(Boolean zoneBalance) { } /** - * Get the platformFaultDomainCount value. + * Get fault Domain count for each placement group. * * @return the platformFaultDomainCount value */ @@ -272,7 +272,7 @@ public Integer platformFaultDomainCount() { } /** - * Set the platformFaultDomainCount value. + * Set fault Domain count for each placement group. * * @param platformFaultDomainCount the platformFaultDomainCount value to set * @return the VirtualMachineScaleSetInner object itself. @@ -283,7 +283,7 @@ public VirtualMachineScaleSetInner withPlatformFaultDomainCount(Integer platform } /** - * Get the identity value. + * Get the identity of the virtual machine scale set, if configured. * * @return the identity value */ @@ -292,7 +292,7 @@ public VirtualMachineScaleSetIdentity identity() { } /** - * Set the identity value. + * Set the identity of the virtual machine scale set, if configured. * * @param identity the identity value to set * @return the VirtualMachineScaleSetInner object itself. @@ -303,7 +303,7 @@ public VirtualMachineScaleSetInner withIdentity(VirtualMachineScaleSetIdentity i } /** - * Get the zones value. + * Get the virtual machine scale set zones. * * @return the zones value */ @@ -312,7 +312,7 @@ public List zones() { } /** - * Set the zones value. + * Set the virtual machine scale set zones. * * @param zones the zones value to set * @return the VirtualMachineScaleSetInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInstanceViewInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInstanceViewInner.java index 2fda853b700..94b5ead6cdd 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInstanceViewInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInstanceViewInner.java @@ -36,7 +36,7 @@ public class VirtualMachineScaleSetInstanceViewInner { private List statuses; /** - * Get the virtualMachine value. + * Get the instance view status summary for the virtual machine scale set. * * @return the virtualMachine value */ @@ -45,7 +45,7 @@ public VirtualMachineScaleSetInstanceViewStatusesSummary virtualMachine() { } /** - * Get the extensions value. + * Get the extensions information. * * @return the extensions value */ @@ -54,7 +54,7 @@ public List extensions() { } /** - * Get the statuses value. + * Get the resource status information. * * @return the statuses value */ @@ -63,7 +63,7 @@ public List statuses() { } /** - * Set the statuses value. + * Set the resource status information. * * @param statuses the statuses value to set * @return the VirtualMachineScaleSetInstanceViewInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetNetworkConfigurationInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetNetworkConfigurationInner.java index 3c9b28a3014..1001dd14024 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetNetworkConfigurationInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetNetworkConfigurationInner.java @@ -65,7 +65,7 @@ public class VirtualMachineScaleSetNetworkConfigurationInner extends SubResource private Boolean enableIPForwarding; /** - * Get the name value. + * Get the network configuration name. * * @return the name value */ @@ -74,7 +74,7 @@ public String name() { } /** - * Set the name value. + * Set the network configuration name. * * @param name the name value to set * @return the VirtualMachineScaleSetNetworkConfigurationInner object itself. @@ -85,7 +85,7 @@ public VirtualMachineScaleSetNetworkConfigurationInner withName(String name) { } /** - * Get the primary value. + * Get specifies the primary network interface in case the virtual machine has more than 1 network interface. * * @return the primary value */ @@ -94,7 +94,7 @@ public Boolean primary() { } /** - * Set the primary value. + * Set specifies the primary network interface in case the virtual machine has more than 1 network interface. * * @param primary the primary value to set * @return the VirtualMachineScaleSetNetworkConfigurationInner object itself. @@ -105,7 +105,7 @@ public VirtualMachineScaleSetNetworkConfigurationInner withPrimary(Boolean prima } /** - * Get the enableAcceleratedNetworking value. + * Get specifies whether the network interface is accelerated networking-enabled. * * @return the enableAcceleratedNetworking value */ @@ -114,7 +114,7 @@ public Boolean enableAcceleratedNetworking() { } /** - * Set the enableAcceleratedNetworking value. + * Set specifies whether the network interface is accelerated networking-enabled. * * @param enableAcceleratedNetworking the enableAcceleratedNetworking value to set * @return the VirtualMachineScaleSetNetworkConfigurationInner object itself. @@ -125,7 +125,7 @@ public VirtualMachineScaleSetNetworkConfigurationInner withEnableAcceleratedNetw } /** - * Get the networkSecurityGroup value. + * Get the network security group. * * @return the networkSecurityGroup value */ @@ -134,7 +134,7 @@ public SubResource networkSecurityGroup() { } /** - * Set the networkSecurityGroup value. + * Set the network security group. * * @param networkSecurityGroup the networkSecurityGroup value to set * @return the VirtualMachineScaleSetNetworkConfigurationInner object itself. @@ -145,7 +145,7 @@ public VirtualMachineScaleSetNetworkConfigurationInner withNetworkSecurityGroup( } /** - * Get the dnsSettings value. + * Get the dns settings to be applied on the network interfaces. * * @return the dnsSettings value */ @@ -154,7 +154,7 @@ public VirtualMachineScaleSetNetworkConfigurationDnsSettings dnsSettings() { } /** - * Set the dnsSettings value. + * Set the dns settings to be applied on the network interfaces. * * @param dnsSettings the dnsSettings value to set * @return the VirtualMachineScaleSetNetworkConfigurationInner object itself. @@ -165,7 +165,7 @@ public VirtualMachineScaleSetNetworkConfigurationInner withDnsSettings(VirtualMa } /** - * Get the ipConfigurations value. + * Get specifies the IP configurations of the network interface. * * @return the ipConfigurations value */ @@ -174,7 +174,7 @@ public List ipConfigurations() { } /** - * Set the ipConfigurations value. + * Set specifies the IP configurations of the network interface. * * @param ipConfigurations the ipConfigurations value to set * @return the VirtualMachineScaleSetNetworkConfigurationInner object itself. @@ -185,7 +185,7 @@ public VirtualMachineScaleSetNetworkConfigurationInner withIpConfigurations(List } /** - * Get the enableIPForwarding value. + * Get whether IP forwarding enabled on this NIC. * * @return the enableIPForwarding value */ @@ -194,7 +194,7 @@ public Boolean enableIPForwarding() { } /** - * Set the enableIPForwarding value. + * Set whether IP forwarding enabled on this NIC. * * @param enableIPForwarding the enableIPForwarding value to set * @return the VirtualMachineScaleSetNetworkConfigurationInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetSkuInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetSkuInner.java index 4ba987fcf02..9b3e8ca20fc 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetSkuInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetSkuInner.java @@ -35,7 +35,7 @@ public class VirtualMachineScaleSetSkuInner { private VirtualMachineScaleSetSkuCapacity capacity; /** - * Get the resourceType value. + * Get the type of resource the sku applies to. * * @return the resourceType value */ @@ -44,7 +44,7 @@ public String resourceType() { } /** - * Get the sku value. + * Get the Sku. * * @return the sku value */ @@ -53,7 +53,7 @@ public Sku sku() { } /** - * Get the capacity value. + * Get specifies the number of virtual machines in the scale set. * * @return the capacity value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateIPConfigurationInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateIPConfigurationInner.java index 1a512cb71ea..4c8aae22e37 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateIPConfigurationInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateIPConfigurationInner.java @@ -74,7 +74,7 @@ public class VirtualMachineScaleSetUpdateIPConfigurationInner extends SubResourc private List loadBalancerInboundNatPools; /** - * Get the name value. + * Get the IP configuration name. * * @return the name value */ @@ -83,7 +83,7 @@ public String name() { } /** - * Set the name value. + * Set the IP configuration name. * * @param name the name value to set * @return the VirtualMachineScaleSetUpdateIPConfigurationInner object itself. @@ -94,7 +94,7 @@ public VirtualMachineScaleSetUpdateIPConfigurationInner withName(String name) { } /** - * Get the subnet value. + * Get the subnet. * * @return the subnet value */ @@ -103,7 +103,7 @@ public ApiEntityReference subnet() { } /** - * Set the subnet value. + * Set the subnet. * * @param subnet the subnet value to set * @return the VirtualMachineScaleSetUpdateIPConfigurationInner object itself. @@ -114,7 +114,7 @@ public VirtualMachineScaleSetUpdateIPConfigurationInner withSubnet(ApiEntityRefe } /** - * Get the primary value. + * Get specifies the primary IP Configuration in case the network interface has more than one IP Configuration. * * @return the primary value */ @@ -123,7 +123,7 @@ public Boolean primary() { } /** - * Set the primary value. + * Set specifies the primary IP Configuration in case the network interface has more than one IP Configuration. * * @param primary the primary value to set * @return the VirtualMachineScaleSetUpdateIPConfigurationInner object itself. @@ -134,7 +134,7 @@ public VirtualMachineScaleSetUpdateIPConfigurationInner withPrimary(Boolean prim } /** - * Get the publicIPAddressConfiguration value. + * Get the publicIPAddressConfiguration. * * @return the publicIPAddressConfiguration value */ @@ -143,7 +143,7 @@ public VirtualMachineScaleSetUpdatePublicIPAddressConfiguration publicIPAddressC } /** - * Set the publicIPAddressConfiguration value. + * Set the publicIPAddressConfiguration. * * @param publicIPAddressConfiguration the publicIPAddressConfiguration value to set * @return the VirtualMachineScaleSetUpdateIPConfigurationInner object itself. @@ -154,7 +154,7 @@ public VirtualMachineScaleSetUpdateIPConfigurationInner withPublicIPAddressConfi } /** - * Get the privateIPAddressVersion value. + * Get available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'. * * @return the privateIPAddressVersion value */ @@ -163,7 +163,7 @@ public IPVersion privateIPAddressVersion() { } /** - * Set the privateIPAddressVersion value. + * Set available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'. * * @param privateIPAddressVersion the privateIPAddressVersion value to set * @return the VirtualMachineScaleSetUpdateIPConfigurationInner object itself. @@ -174,7 +174,7 @@ public VirtualMachineScaleSetUpdateIPConfigurationInner withPrivateIPAddressVers } /** - * Get the applicationGatewayBackendAddressPools value. + * Get the application gateway backend address pools. * * @return the applicationGatewayBackendAddressPools value */ @@ -183,7 +183,7 @@ public List applicationGatewayBackendAddressPools() { } /** - * Set the applicationGatewayBackendAddressPools value. + * Set the application gateway backend address pools. * * @param applicationGatewayBackendAddressPools the applicationGatewayBackendAddressPools value to set * @return the VirtualMachineScaleSetUpdateIPConfigurationInner object itself. @@ -194,7 +194,7 @@ public VirtualMachineScaleSetUpdateIPConfigurationInner withApplicationGatewayBa } /** - * Get the loadBalancerBackendAddressPools value. + * Get the load balancer backend address pools. * * @return the loadBalancerBackendAddressPools value */ @@ -203,7 +203,7 @@ public List loadBalancerBackendAddressPools() { } /** - * Set the loadBalancerBackendAddressPools value. + * Set the load balancer backend address pools. * * @param loadBalancerBackendAddressPools the loadBalancerBackendAddressPools value to set * @return the VirtualMachineScaleSetUpdateIPConfigurationInner object itself. @@ -214,7 +214,7 @@ public VirtualMachineScaleSetUpdateIPConfigurationInner withLoadBalancerBackendA } /** - * Get the loadBalancerInboundNatPools value. + * Get the load balancer inbound nat pools. * * @return the loadBalancerInboundNatPools value */ @@ -223,7 +223,7 @@ public List loadBalancerInboundNatPools() { } /** - * Set the loadBalancerInboundNatPools value. + * Set the load balancer inbound nat pools. * * @param loadBalancerInboundNatPools the loadBalancerInboundNatPools value to set * @return the VirtualMachineScaleSetUpdateIPConfigurationInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateNetworkConfigurationInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateNetworkConfigurationInner.java index f5d03c6fd32..2cc10ee75f8 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateNetworkConfigurationInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateNetworkConfigurationInner.java @@ -64,7 +64,7 @@ public class VirtualMachineScaleSetUpdateNetworkConfigurationInner extends SubRe private Boolean enableIPForwarding; /** - * Get the name value. + * Get the network configuration name. * * @return the name value */ @@ -73,7 +73,7 @@ public String name() { } /** - * Set the name value. + * Set the network configuration name. * * @param name the name value to set * @return the VirtualMachineScaleSetUpdateNetworkConfigurationInner object itself. @@ -84,7 +84,7 @@ public VirtualMachineScaleSetUpdateNetworkConfigurationInner withName(String nam } /** - * Get the primary value. + * Get whether this is a primary NIC on a virtual machine. * * @return the primary value */ @@ -93,7 +93,7 @@ public Boolean primary() { } /** - * Set the primary value. + * Set whether this is a primary NIC on a virtual machine. * * @param primary the primary value to set * @return the VirtualMachineScaleSetUpdateNetworkConfigurationInner object itself. @@ -104,7 +104,7 @@ public VirtualMachineScaleSetUpdateNetworkConfigurationInner withPrimary(Boolean } /** - * Get the enableAcceleratedNetworking value. + * Get specifies whether the network interface is accelerated networking-enabled. * * @return the enableAcceleratedNetworking value */ @@ -113,7 +113,7 @@ public Boolean enableAcceleratedNetworking() { } /** - * Set the enableAcceleratedNetworking value. + * Set specifies whether the network interface is accelerated networking-enabled. * * @param enableAcceleratedNetworking the enableAcceleratedNetworking value to set * @return the VirtualMachineScaleSetUpdateNetworkConfigurationInner object itself. @@ -124,7 +124,7 @@ public VirtualMachineScaleSetUpdateNetworkConfigurationInner withEnableAccelerat } /** - * Get the networkSecurityGroup value. + * Get the network security group. * * @return the networkSecurityGroup value */ @@ -133,7 +133,7 @@ public SubResource networkSecurityGroup() { } /** - * Set the networkSecurityGroup value. + * Set the network security group. * * @param networkSecurityGroup the networkSecurityGroup value to set * @return the VirtualMachineScaleSetUpdateNetworkConfigurationInner object itself. @@ -144,7 +144,7 @@ public VirtualMachineScaleSetUpdateNetworkConfigurationInner withNetworkSecurity } /** - * Get the dnsSettings value. + * Get the dns settings to be applied on the network interfaces. * * @return the dnsSettings value */ @@ -153,7 +153,7 @@ public VirtualMachineScaleSetNetworkConfigurationDnsSettings dnsSettings() { } /** - * Set the dnsSettings value. + * Set the dns settings to be applied on the network interfaces. * * @param dnsSettings the dnsSettings value to set * @return the VirtualMachineScaleSetUpdateNetworkConfigurationInner object itself. @@ -164,7 +164,7 @@ public VirtualMachineScaleSetUpdateNetworkConfigurationInner withDnsSettings(Vir } /** - * Get the ipConfigurations value. + * Get the virtual machine scale set IP Configuration. * * @return the ipConfigurations value */ @@ -173,7 +173,7 @@ public List ipConfigurations() } /** - * Set the ipConfigurations value. + * Set the virtual machine scale set IP Configuration. * * @param ipConfigurations the ipConfigurations value to set * @return the VirtualMachineScaleSetUpdateNetworkConfigurationInner object itself. @@ -184,7 +184,7 @@ public VirtualMachineScaleSetUpdateNetworkConfigurationInner withIpConfiguration } /** - * Get the enableIPForwarding value. + * Get whether IP forwarding enabled on this NIC. * * @return the enableIPForwarding value */ @@ -193,7 +193,7 @@ public Boolean enableIPForwarding() { } /** - * Set the enableIPForwarding value. + * Set whether IP forwarding enabled on this NIC. * * @param enableIPForwarding the enableIPForwarding value to set * @return the VirtualMachineScaleSetUpdateNetworkConfigurationInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInner.java index cd11fc0dadc..dd25c89e98d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInner.java @@ -145,7 +145,7 @@ public class VirtualMachineScaleSetVMInner extends Resource { private List resources; /** - * Get the instanceId value. + * Get the virtual machine instance ID. * * @return the instanceId value */ @@ -154,7 +154,7 @@ public String instanceId() { } /** - * Get the sku value. + * Get the virtual machine SKU. * * @return the sku value */ @@ -163,7 +163,7 @@ public Sku sku() { } /** - * Get the latestModelApplied value. + * Get specifies whether the latest model has been applied to the virtual machine. * * @return the latestModelApplied value */ @@ -172,7 +172,7 @@ public Boolean latestModelApplied() { } /** - * Get the vmId value. + * Get azure VM unique ID. * * @return the vmId value */ @@ -181,7 +181,7 @@ public String vmId() { } /** - * Get the instanceView value. + * Get the virtual machine instance view. * * @return the instanceView value */ @@ -190,7 +190,7 @@ public VirtualMachineInstanceViewInner instanceView() { } /** - * Get the hardwareProfile value. + * Get specifies the hardware settings for the virtual machine. * * @return the hardwareProfile value */ @@ -199,7 +199,7 @@ public HardwareProfile hardwareProfile() { } /** - * Set the hardwareProfile value. + * Set specifies the hardware settings for the virtual machine. * * @param hardwareProfile the hardwareProfile value to set * @return the VirtualMachineScaleSetVMInner object itself. @@ -210,7 +210,7 @@ public VirtualMachineScaleSetVMInner withHardwareProfile(HardwareProfile hardwar } /** - * Get the storageProfile value. + * Get specifies the storage settings for the virtual machine disks. * * @return the storageProfile value */ @@ -219,7 +219,7 @@ public StorageProfile storageProfile() { } /** - * Set the storageProfile value. + * Set specifies the storage settings for the virtual machine disks. * * @param storageProfile the storageProfile value to set * @return the VirtualMachineScaleSetVMInner object itself. @@ -230,7 +230,7 @@ public VirtualMachineScaleSetVMInner withStorageProfile(StorageProfile storagePr } /** - * Get the osProfile value. + * Get specifies the operating system settings for the virtual machine. * * @return the osProfile value */ @@ -239,7 +239,7 @@ public OSProfile osProfile() { } /** - * Set the osProfile value. + * Set specifies the operating system settings for the virtual machine. * * @param osProfile the osProfile value to set * @return the VirtualMachineScaleSetVMInner object itself. @@ -250,7 +250,7 @@ public VirtualMachineScaleSetVMInner withOsProfile(OSProfile osProfile) { } /** - * Get the networkProfile value. + * Get specifies the network interfaces of the virtual machine. * * @return the networkProfile value */ @@ -259,7 +259,7 @@ public NetworkProfile networkProfile() { } /** - * Set the networkProfile value. + * Set specifies the network interfaces of the virtual machine. * * @param networkProfile the networkProfile value to set * @return the VirtualMachineScaleSetVMInner object itself. @@ -270,7 +270,7 @@ public VirtualMachineScaleSetVMInner withNetworkProfile(NetworkProfile networkPr } /** - * Get the diagnosticsProfile value. + * Get specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. * * @return the diagnosticsProfile value */ @@ -279,7 +279,7 @@ public DiagnosticsProfile diagnosticsProfile() { } /** - * Set the diagnosticsProfile value. + * Set specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. * * @param diagnosticsProfile the diagnosticsProfile value to set * @return the VirtualMachineScaleSetVMInner object itself. @@ -290,7 +290,7 @@ public VirtualMachineScaleSetVMInner withDiagnosticsProfile(DiagnosticsProfile d } /** - * Get the availabilitySet value. + * Get 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. * * @return the availabilitySet value */ @@ -299,7 +299,7 @@ public SubResource availabilitySet() { } /** - * Set the availabilitySet value. + * Set 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. * * @param availabilitySet the availabilitySet value to set * @return the VirtualMachineScaleSetVMInner object itself. @@ -310,7 +310,7 @@ public VirtualMachineScaleSetVMInner withAvailabilitySet(SubResource availabilit } /** - * Get the provisioningState value. + * Get the provisioning state, which only appears in the response. * * @return the provisioningState value */ @@ -319,7 +319,7 @@ public String provisioningState() { } /** - * Get the licenseType value. + * Get 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. * * @return the licenseType value */ @@ -328,7 +328,7 @@ public String licenseType() { } /** - * Set the licenseType value. + * Set 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. * * @param licenseType the licenseType value to set * @return the VirtualMachineScaleSetVMInner object itself. @@ -339,7 +339,7 @@ public VirtualMachineScaleSetVMInner withLicenseType(String licenseType) { } /** - * Get the plan value. + * Get 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**. * * @return the plan value */ @@ -348,7 +348,7 @@ public Plan plan() { } /** - * Set the plan value. + * Set 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**. * * @param plan the plan value to set * @return the VirtualMachineScaleSetVMInner object itself. @@ -359,7 +359,7 @@ public VirtualMachineScaleSetVMInner withPlan(Plan plan) { } /** - * Get the resources value. + * Get the virtual machine child extension resources. * * @return the resources value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java index d0dfa38a43f..17f6ce67f0e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java @@ -94,7 +94,7 @@ public class VirtualMachineScaleSetVMInstanceViewInner { private String placementGroupId; /** - * Get the platformUpdateDomain value. + * Get the Update Domain count. * * @return the platformUpdateDomain value */ @@ -103,7 +103,7 @@ public Integer platformUpdateDomain() { } /** - * Set the platformUpdateDomain value. + * Set the Update Domain count. * * @param platformUpdateDomain the platformUpdateDomain value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. @@ -114,7 +114,7 @@ public VirtualMachineScaleSetVMInstanceViewInner withPlatformUpdateDomain(Intege } /** - * Get the platformFaultDomain value. + * Get the Fault Domain count. * * @return the platformFaultDomain value */ @@ -123,7 +123,7 @@ public Integer platformFaultDomain() { } /** - * Set the platformFaultDomain value. + * Set the Fault Domain count. * * @param platformFaultDomain the platformFaultDomain value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. @@ -134,7 +134,7 @@ public VirtualMachineScaleSetVMInstanceViewInner withPlatformFaultDomain(Integer } /** - * Get the rdpThumbPrint value. + * Get the Remote desktop certificate thumbprint. * * @return the rdpThumbPrint value */ @@ -143,7 +143,7 @@ public String rdpThumbPrint() { } /** - * Set the rdpThumbPrint value. + * Set the Remote desktop certificate thumbprint. * * @param rdpThumbPrint the rdpThumbPrint value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. @@ -154,7 +154,7 @@ public VirtualMachineScaleSetVMInstanceViewInner withRdpThumbPrint(String rdpThu } /** - * Get the vmAgent value. + * Get the VM Agent running on the virtual machine. * * @return the vmAgent value */ @@ -163,7 +163,7 @@ public VirtualMachineAgentInstanceView vmAgent() { } /** - * Set the vmAgent value. + * Set the VM Agent running on the virtual machine. * * @param vmAgent the vmAgent value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. @@ -174,7 +174,7 @@ public VirtualMachineScaleSetVMInstanceViewInner withVmAgent(VirtualMachineAgent } /** - * Get the maintenanceRedeployStatus value. + * Get the Maintenance Operation status on the virtual machine. * * @return the maintenanceRedeployStatus value */ @@ -183,7 +183,7 @@ public MaintenanceRedeployStatus maintenanceRedeployStatus() { } /** - * Set the maintenanceRedeployStatus value. + * Set the Maintenance Operation status on the virtual machine. * * @param maintenanceRedeployStatus the maintenanceRedeployStatus value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. @@ -194,7 +194,7 @@ public VirtualMachineScaleSetVMInstanceViewInner withMaintenanceRedeployStatus(M } /** - * Get the disks value. + * Get the disks information. * * @return the disks value */ @@ -203,7 +203,7 @@ public List disks() { } /** - * Set the disks value. + * Set the disks information. * * @param disks the disks value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. @@ -214,7 +214,7 @@ public VirtualMachineScaleSetVMInstanceViewInner withDisks(List extensions() { } /** - * Set the extensions value. + * Set the extensions information. * * @param extensions the extensions value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. @@ -234,7 +234,7 @@ public VirtualMachineScaleSetVMInstanceViewInner withExtensions(List statuses() { } /** - * Set the statuses value. + * Set the resource status information. * * @param statuses the statuses value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. @@ -283,7 +283,7 @@ public VirtualMachineScaleSetVMInstanceViewInner withStatuses(List