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..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 @@ -36,8 +36,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/HardwareProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java index 88c92002d66..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,36 +21,59 @@ 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', - * '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/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..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 @@ -19,13 +19,7 @@ public enum StorageAccountTypes { STANDARD_LRS("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"); + PREMIUM_LRS("Premium_LRS"); /** The actual serialized value for a StorageAccountTypes instance. */ private String value; @@ -56,4 +50,4 @@ public static StorageAccountTypes 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/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 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 8513af73e93..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. */ @@ -276,6 +289,32 @@ public VirtualMachineScaleSetVMsInner virtualMachineScaleSetVMs() { return this.virtualMachineScaleSetVMs; } + /** + * The LogAnalyticsInner object to access its operations. + */ + private LogAnalyticsInner logAnalytics; + + /** + * Gets the LogAnalyticsInner object to access its operations. + * @return the LogAnalyticsInner object. + */ + public LogAnalyticsInner logAnalytics() { + return this.logAnalytics; + } + + /** + * The VirtualMachineRunCommandsInner object to access its operations. + */ + private VirtualMachineRunCommandsInner virtualMachineRunCommands; + + /** + * Gets the VirtualMachineRunCommandsInner object to access its operations. + * @return the VirtualMachineRunCommandsInner object. + */ + public VirtualMachineRunCommandsInner virtualMachineRunCommands() { + return this.virtualMachineRunCommands; + } + /** * The ResourceSkusInner object to access its operations. */ @@ -316,16 +355,16 @@ public SnapshotsInner snapshots() { } /** - * The VirtualMachineRunCommandsInner object to access its operations. + * The ContainerServicesInner object to access its operations. */ - private VirtualMachineRunCommandsInner virtualMachineRunCommands; + private ContainerServicesInner containerServices; /** - * Gets the VirtualMachineRunCommandsInner object to access its operations. - * @return the VirtualMachineRunCommandsInner object. + * Gets the ContainerServicesInner object to access its operations. + * @return the ContainerServicesInner object. */ - public VirtualMachineRunCommandsInner virtualMachineRunCommands() { - return this.virtualMachineRunCommands; + public ContainerServicesInner containerServices() { + return this.containerServices; } /** @@ -362,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); @@ -374,10 +414,12 @@ protected void initialize() { this.virtualMachineScaleSetExtensions = new VirtualMachineScaleSetExtensionsInner(restClient().retrofit(), this); this.virtualMachineScaleSetRollingUpgrades = new VirtualMachineScaleSetRollingUpgradesInner(restClient().retrofit(), this); this.virtualMachineScaleSetVMs = new VirtualMachineScaleSetVMsInner(restClient().retrofit(), this); + this.logAnalytics = new LogAnalyticsInner(restClient().retrofit(), this); + this.virtualMachineRunCommands = new VirtualMachineRunCommandsInner(restClient().retrofit(), this); this.resourceSkus = new ResourceSkusInner(restClient().retrofit(), this); this.disks = new DisksInner(restClient().retrofit(), this); this.snapshots = new SnapshotsInner(restClient().retrofit(), this); - this.virtualMachineRunCommands = new VirtualMachineRunCommandsInner(restClient().retrofit(), this); + this.containerServices = new ContainerServicesInner(restClient().retrofit(), this); this.azureClient = new AzureClient(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/ContainerServiceInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ContainerServiceInner.java new file mode 100644 index 00000000000..afa9d0e2925 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ContainerServiceInner.java @@ -0,0 +1,253 @@ +/** + * 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.ContainerServiceOrchestratorProfile; +import com.microsoft.azure.management.compute.ContainerServiceCustomProfile; +import com.microsoft.azure.management.compute.ContainerServiceServicePrincipalProfile; +import com.microsoft.azure.management.compute.ContainerServiceMasterProfile; +import java.util.List; +import com.microsoft.azure.management.compute.ContainerServiceAgentPoolProfile; +import com.microsoft.azure.management.compute.ContainerServiceWindowsProfile; +import com.microsoft.azure.management.compute.ContainerServiceLinuxProfile; +import com.microsoft.azure.management.compute.ContainerServiceDiagnosticsProfile; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Container service. + */ +@JsonFlatten +public class ContainerServiceInner extends Resource { + /** + * the current deployment or provisioning state, which only appears in the + * response. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Properties of the orchestrator. + */ + @JsonProperty(value = "properties.orchestratorProfile") + private ContainerServiceOrchestratorProfile orchestratorProfile; + + /** + * Properties for custom clusters. + */ + @JsonProperty(value = "properties.customProfile") + private ContainerServiceCustomProfile customProfile; + + /** + * Properties for cluster service principals. + */ + @JsonProperty(value = "properties.servicePrincipalProfile") + private ContainerServiceServicePrincipalProfile servicePrincipalProfile; + + /** + * Properties of master agents. + */ + @JsonProperty(value = "properties.masterProfile", required = true) + private ContainerServiceMasterProfile masterProfile; + + /** + * Properties of the agent pool. + */ + @JsonProperty(value = "properties.agentPoolProfiles", required = true) + private List 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..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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 */ @@ -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 * 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> 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 @@ -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 @@ -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 * 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> 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/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/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/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/SnapshotsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java index 160d3e70deb..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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 */ @@ -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 * 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> 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 @@ -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 @@ -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 * 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 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/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/VirtualMachineScaleSetVMsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java index 72c6a79a93c..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 @@ -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); @@ -631,6 +642,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. * 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..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 @@ -176,6 +176,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); @@ -3455,6 +3459,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/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 73c8e8c5ffc..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 @@ -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; @@ -32,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; @@ -83,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); @@ -525,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. * @@ -852,9 +1028,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 +1043,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 +1053,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 +1070,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 +1084,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 +1097,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 +2625,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 +2700,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