diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AccessLevel.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AccessLevel.java index c2dbf143ca9..47876604914 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AccessLevel.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AccessLevel.java @@ -8,46 +8,34 @@ package com.microsoft.azure.management.compute; +import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for AccessLevel. */ -public enum AccessLevel { - /** Enum value None. */ - NONE("None"), +public final class AccessLevel extends ExpandableStringEnum { + /** Static value None for AccessLevel. */ + public static final AccessLevel NONE = fromString("None"); - /** Enum value Read. */ - READ("Read"); - - /** The actual serialized value for a AccessLevel instance. */ - private String value; - - AccessLevel(String value) { - this.value = value; - } + /** Static value Read for AccessLevel. */ + public static final AccessLevel READ = fromString("Read"); /** - * Parses a serialized value to a AccessLevel instance. - * - * @param value the serialized value to parse. - * @return the parsed AccessLevel object, or null if unable to parse. + * Creates or finds a AccessLevel from its string representation. + * @param name a name to look for + * @return the corresponding AccessLevel */ @JsonCreator - public static AccessLevel fromString(String value) { - AccessLevel[] items = AccessLevel.values(); - for (AccessLevel item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static AccessLevel fromString(String name) { + return fromString(name, AccessLevel.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** + * @return known AccessLevel values + */ + public static Collection values() { + return values(AccessLevel.class); } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AdditionalUnattendContent.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AdditionalUnattendContent.java index dbbc84f0a5f..0f6476f6245 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AdditionalUnattendContent.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AdditionalUnattendContent.java @@ -49,7 +49,7 @@ public class AdditionalUnattendContent { private String content; /** - * Get the passName value. + * Get the pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'OobeSystem'. * * @return the passName value */ @@ -58,7 +58,7 @@ public PassNames passName() { } /** - * Set the passName value. + * Set the pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'OobeSystem'. * * @param passName the passName value to set * @return the AdditionalUnattendContent object itself. @@ -69,7 +69,7 @@ public AdditionalUnattendContent withPassName(PassNames passName) { } /** - * Get the componentName value. + * Get the component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'Microsoft-Windows-Shell-Setup'. * * @return the componentName value */ @@ -78,7 +78,7 @@ public ComponentNames componentName() { } /** - * Set the componentName value. + * Set the component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'Microsoft-Windows-Shell-Setup'. * * @param componentName the componentName value to set * @return the AdditionalUnattendContent object itself. @@ -89,7 +89,7 @@ public AdditionalUnattendContent withComponentName(ComponentNames componentName) } /** - * Get the settingName value. + * Get specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: 'AutoLogon', 'FirstLogonCommands'. * * @return the settingName value */ @@ -98,7 +98,7 @@ public SettingNames settingName() { } /** - * Set the settingName value. + * Set specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: 'AutoLogon', 'FirstLogonCommands'. * * @param settingName the settingName value to set * @return the AdditionalUnattendContent object itself. @@ -109,7 +109,7 @@ public AdditionalUnattendContent withSettingName(SettingNames settingName) { } /** - * Get the content value. + * Get specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted. * * @return the content value */ @@ -118,7 +118,7 @@ public String content() { } /** - * Set the content value. + * Set specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted. * * @param content the content value to set * @return the AdditionalUnattendContent object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AggregatedReplicationState.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AggregatedReplicationState.java new file mode 100644 index 00000000000..c2238ed133f --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AggregatedReplicationState.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AggregatedReplicationState. + */ +public enum AggregatedReplicationState { + /** Enum value Unknown. */ + UNKNOWN("Unknown"), + + /** Enum value InProgress. */ + IN_PROGRESS("InProgress"), + + /** Enum value Completed. */ + COMPLETED("Completed"), + + /** Enum value Failed. */ + FAILED("Failed"); + + /** The actual serialized value for a AggregatedReplicationState instance. */ + private String value; + + AggregatedReplicationState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AggregatedReplicationState instance. + * + * @param value the serialized value to parse. + * @return the parsed AggregatedReplicationState object, or null if unable to parse. + */ + @JsonCreator + public static AggregatedReplicationState fromString(String value) { + AggregatedReplicationState[] items = AggregatedReplicationState.values(); + for (AggregatedReplicationState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiEntityReference.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiEntityReference.java index 7a6af6b2503..d7581221f61 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiEntityReference.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiEntityReference.java @@ -22,7 +22,7 @@ public class ApiEntityReference { private String id; /** - * Get the id value. + * Get the ARM resource id in the form of /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/... * * @return the id value */ @@ -31,7 +31,7 @@ public String id() { } /** - * Set the id value. + * Set the ARM resource id in the form of /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/... * * @param id the id value to set * @return the ApiEntityReference object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiError.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiError.java index 82e3f36b349..12ad6bc97db 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiError.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiError.java @@ -46,7 +46,7 @@ public class ApiError { private String message; /** - * Get the details value. + * Get the Api error details. * * @return the details value */ @@ -55,7 +55,7 @@ public List details() { } /** - * Set the details value. + * Set the Api error details. * * @param details the details value to set * @return the ApiError object itself. @@ -66,7 +66,7 @@ public ApiError withDetails(List details) { } /** - * Get the innererror value. + * Get the Api inner error. * * @return the innererror value */ @@ -75,7 +75,7 @@ public InnerError innererror() { } /** - * Set the innererror value. + * Set the Api inner error. * * @param innererror the innererror value to set * @return the ApiError object itself. @@ -86,7 +86,7 @@ public ApiError withInnererror(InnerError innererror) { } /** - * Get the code value. + * Get the error code. * * @return the code value */ @@ -95,7 +95,7 @@ public String code() { } /** - * Set the code value. + * Set the error code. * * @param code the code value to set * @return the ApiError object itself. @@ -106,7 +106,7 @@ public ApiError withCode(String code) { } /** - * Get the target value. + * Get the target of the particular error. * * @return the target value */ @@ -115,7 +115,7 @@ public String target() { } /** - * Set the target value. + * Set the target of the particular error. * * @param target the target value to set * @return the ApiError object itself. @@ -126,7 +126,7 @@ public ApiError withTarget(String target) { } /** - * Get the message value. + * Get the error message. * * @return the message value */ @@ -135,7 +135,7 @@ public String message() { } /** - * Set the message value. + * Set the error message. * * @param message the message value to set * @return the ApiError object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiErrorBase.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiErrorBase.java index f520179483a..73254f94935 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiErrorBase.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ApiErrorBase.java @@ -33,7 +33,7 @@ public class ApiErrorBase { private String message; /** - * Get the code value. + * Get the error code. * * @return the code value */ @@ -42,7 +42,7 @@ public String code() { } /** - * Set the code value. + * Set the error code. * * @param code the code value to set * @return the ApiErrorBase object itself. @@ -53,7 +53,7 @@ public ApiErrorBase withCode(String code) { } /** - * Get the target value. + * Get the target of the particular error. * * @return the target value */ @@ -62,7 +62,7 @@ public String target() { } /** - * Set the target value. + * Set the target of the particular error. * * @param target the target value to set * @return the ApiErrorBase object itself. @@ -73,7 +73,7 @@ public ApiErrorBase withTarget(String target) { } /** - * Get the message value. + * Get the error message. * * @return the message value */ @@ -82,7 +82,7 @@ public String message() { } /** - * Set the message value. + * Set the error message. * * @param message the message value to set * @return the ApiErrorBase object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AutoOSUpgradePolicy.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AutoOSUpgradePolicy.java new file mode 100644 index 00000000000..0c36c172fec --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AutoOSUpgradePolicy.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The configuration parameters used for performing automatic OS upgrade. + */ +public class AutoOSUpgradePolicy { + /** + * Whether OS image rollback feature should be disabled. Default value is + * false. + */ + @JsonProperty(value = "disableAutoRollback") + private Boolean disableAutoRollback; + + /** + * Get whether OS image rollback feature should be disabled. Default value is false. + * + * @return the disableAutoRollback value + */ + public Boolean disableAutoRollback() { + return this.disableAutoRollback; + } + + /** + * Set whether OS image rollback feature should be disabled. Default value is false. + * + * @param disableAutoRollback the disableAutoRollback value to set + * @return the AutoOSUpgradePolicy object itself. + */ + public AutoOSUpgradePolicy withDisableAutoRollback(Boolean disableAutoRollback) { + this.disableAutoRollback = disableAutoRollback; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java new file mode 100644 index 00000000000..e35f5da6f36 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetUpdate.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Specifies information about the availability set that the virtual machine + * should be assigned to. Only tags may be updated. + */ +@JsonFlatten +public class AvailabilitySetUpdate extends UpdateResource { + /** + * Update Domain count. + */ + @JsonProperty(value = "properties.platformUpdateDomainCount") + private Integer platformUpdateDomainCount; + + /** + * Fault Domain count. + */ + @JsonProperty(value = "properties.platformFaultDomainCount") + private Integer platformFaultDomainCount; + + /** + * A list of references to all virtual machines in the availability set. + */ + @JsonProperty(value = "properties.virtualMachines") + private List virtualMachines; + + /** + * The resource status information. + */ + @JsonProperty(value = "properties.statuses", access = JsonProperty.Access.WRITE_ONLY) + private List statuses; + + /** + * Sku of the availability set. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * Get update Domain count. + * + * @return the platformUpdateDomainCount value + */ + public Integer platformUpdateDomainCount() { + return this.platformUpdateDomainCount; + } + + /** + * Set update Domain count. + * + * @param platformUpdateDomainCount the platformUpdateDomainCount value to set + * @return the AvailabilitySetUpdate object itself. + */ + public AvailabilitySetUpdate withPlatformUpdateDomainCount(Integer platformUpdateDomainCount) { + this.platformUpdateDomainCount = platformUpdateDomainCount; + return this; + } + + /** + * Get fault Domain count. + * + * @return the platformFaultDomainCount value + */ + public Integer platformFaultDomainCount() { + return this.platformFaultDomainCount; + } + + /** + * Set fault Domain count. + * + * @param platformFaultDomainCount the platformFaultDomainCount value to set + * @return the AvailabilitySetUpdate object itself. + */ + public AvailabilitySetUpdate withPlatformFaultDomainCount(Integer platformFaultDomainCount) { + this.platformFaultDomainCount = platformFaultDomainCount; + return this; + } + + /** + * Get a list of references to all virtual machines in the availability set. + * + * @return the virtualMachines value + */ + public List virtualMachines() { + return this.virtualMachines; + } + + /** + * Set a list of references to all virtual machines in the availability set. + * + * @param virtualMachines the virtualMachines value to set + * @return the AvailabilitySetUpdate object itself. + */ + public AvailabilitySetUpdate withVirtualMachines(List virtualMachines) { + this.virtualMachines = virtualMachines; + return this; + } + + /** + * Get the resource status information. + * + * @return the statuses value + */ + public List statuses() { + return this.statuses; + } + + /** + * Get sku of the availability set. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set sku of the availability set. + * + * @param sku the sku value to set + * @return the AvailabilitySetUpdate object itself. + */ + public AvailabilitySetUpdate withSku(Sku sku) { + this.sku = sku; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/BootDiagnostics.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/BootDiagnostics.java index 4d3e342dc44..95d7748f131 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/BootDiagnostics.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/BootDiagnostics.java @@ -32,7 +32,7 @@ public class BootDiagnostics { private String storageUri; /** - * Get the enabled value. + * Get whether boot diagnostics should be enabled on the Virtual Machine. * * @return the enabled value */ @@ -41,7 +41,7 @@ public Boolean enabled() { } /** - * Set the enabled value. + * Set whether boot diagnostics should be enabled on the Virtual Machine. * * @param enabled the enabled value to set * @return the BootDiagnostics object itself. @@ -52,7 +52,7 @@ public BootDiagnostics withEnabled(Boolean enabled) { } /** - * Get the storageUri value. + * Get uri of the storage account to use for placing the console output and screenshot. * * @return the storageUri value */ @@ -61,7 +61,7 @@ public String storageUri() { } /** - * Set the storageUri value. + * Set uri of the storage account to use for placing the console output and screenshot. * * @param storageUri the storageUri value to set * @return the BootDiagnostics object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/BootDiagnosticsInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/BootDiagnosticsInstanceView.java index 12b4a8832d1..fa33fe4a610 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/BootDiagnosticsInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/BootDiagnosticsInstanceView.java @@ -27,7 +27,7 @@ public class BootDiagnosticsInstanceView { private String serialConsoleLogBlobUri; /** - * Get the consoleScreenshotBlobUri value. + * Get the console screenshot blob URI. * * @return the consoleScreenshotBlobUri value */ @@ -36,7 +36,7 @@ public String consoleScreenshotBlobUri() { } /** - * Set the consoleScreenshotBlobUri value. + * Set the console screenshot blob URI. * * @param consoleScreenshotBlobUri the consoleScreenshotBlobUri value to set * @return the BootDiagnosticsInstanceView object itself. @@ -47,7 +47,7 @@ public BootDiagnosticsInstanceView withConsoleScreenshotBlobUri(String consoleSc } /** - * Get the serialConsoleLogBlobUri value. + * Get the Linux serial console log blob Uri. * * @return the serialConsoleLogBlobUri value */ @@ -56,7 +56,7 @@ public String serialConsoleLogBlobUri() { } /** - * Set the serialConsoleLogBlobUri value. + * Set the Linux serial console log blob Uri. * * @param serialConsoleLogBlobUri the serialConsoleLogBlobUri value to set * @return the BootDiagnosticsInstanceView object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceAgentPoolProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceAgentPoolProfile.java new file mode 100644 index 00000000000..3fd253ab495 --- /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 unique name of the agent pool profile in the context of the subscription and resource group. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set unique name of the agent pool profile in the context of the subscription and resource group. + * + * @param name the name value to set + * @return the ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + * + * @return the count value + */ + public int count() { + return this.count; + } + + /** + * Set number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + * + * @param count the count value to set + * @return the ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withCount(int count) { + this.count = count; + return this; + } + + /** + * Get size of agent VMs. Possible values include: 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5'. + * + * @return the vmSize value + */ + public ContainerServiceVMSizeTypes vmSize() { + return this.vmSize; + } + + /** + * Set size of agent VMs. Possible values include: 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5'. + * + * @param vmSize the vmSize value to set + * @return the ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withVmSize(ContainerServiceVMSizeTypes vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get dNS prefix to be used to create the FQDN for the agent pool. + * + * @return the dnsPrefix value + */ + public String dnsPrefix() { + return this.dnsPrefix; + } + + /** + * Set dNS prefix to be used to create the FQDN for the agent pool. + * + * @param dnsPrefix the dnsPrefix value to set + * @return the ContainerServiceAgentPoolProfile object itself. + */ + public ContainerServiceAgentPoolProfile withDnsPrefix(String dnsPrefix) { + this.dnsPrefix = dnsPrefix; + return this; + } + + /** + * Get fDQN for the agent pool. + * + * @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..6877eac1553 --- /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 name of the custom orchestrator to use. + * + * @return the orchestrator value + */ + public String orchestrator() { + return this.orchestrator; + } + + /** + * Set the name of the custom orchestrator to use. + * + * @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..a63f5d665ed --- /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 profile for the container service VM diagnostic agent. + * + * @return the vmDiagnostics value + */ + public ContainerServiceVMDiagnostics vmDiagnostics() { + return this.vmDiagnostics; + } + + /** + * Set profile for the container service VM diagnostic agent. + * + * @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..ee397080c55 --- /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 administrator username to use for Linux VMs. + * + * @return the adminUsername value + */ + public String adminUsername() { + return this.adminUsername; + } + + /** + * Set the administrator username to use for Linux VMs. + * + * @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 key configuration for Linux VMs. + * + * @return the ssh value + */ + public ContainerServiceSshConfiguration ssh() { + return this.ssh; + } + + /** + * Set the ssh key configuration for Linux VMs. + * + * @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..685838f6444 --- /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 number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. + * + * @return the count value + */ + public Integer count() { + return this.count; + } + + /** + * Set number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. + * + * @param count the count value to set + * @return the ContainerServiceMasterProfile object itself. + */ + public ContainerServiceMasterProfile withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get dNS prefix to be used to create the FQDN for master. + * + * @return the dnsPrefix value + */ + public String dnsPrefix() { + return this.dnsPrefix; + } + + /** + * Set dNS prefix to be used to create the FQDN for master. + * + * @param dnsPrefix the dnsPrefix value to set + * @return the ContainerServiceMasterProfile object itself. + */ + public ContainerServiceMasterProfile withDnsPrefix(String dnsPrefix) { + this.dnsPrefix = dnsPrefix; + return this; + } + + /** + * Get fDQN for the master. + * + * @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..b5c70178cad --- /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 orchestrator to use to manage container service cluster resources. Valid values are Swarm, DCOS, and Custom. Possible values include: 'Swarm', 'DCOS', 'Custom', 'Kubernetes'. + * + * @return the orchestratorType value + */ + public ContainerServiceOrchestratorTypes orchestratorType() { + return this.orchestratorType; + } + + /** + * Set the orchestrator to use to manage container service cluster resources. Valid values are Swarm, DCOS, and Custom. Possible values include: 'Swarm', 'DCOS', 'Custom', 'Kubernetes'. + * + * @param orchestratorType the orchestratorType value to set + * @return the ContainerServiceOrchestratorProfile object itself. + */ + 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..7b3d14f3fa3 --- /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 ID for the service principal. + * + * @return the clientId value + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the ID for the service principal. + * + * @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 password associated with the service principal. + * + * @return the secret value + */ + public String secret() { + return this.secret; + } + + /** + * Set the secret password associated with the service principal. + * + * @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..2933a41a0d4 --- /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 list of SSH public keys used to authenticate with Linux-based VMs. + * + * @return the publicKeys value + */ + public List publicKeys() { + return this.publicKeys; + } + + /** + * Set the list of SSH public keys used to authenticate with Linux-based VMs. + * + * @param publicKeys the publicKeys value to set + * @return the ContainerServiceSshConfiguration object itself. + */ + 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..509e54d174b --- /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 certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. + * + * @return the keyData value + */ + public String keyData() { + return this.keyData; + } + + /** + * Set certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. + * + * @param keyData the keyData value to set + * @return the ContainerServiceSshPublicKey object itself. + */ + 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..e9918152ab0 --- /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 whether the VM diagnostic agent is provisioned on the VM. + * + * @return the enabled value + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set whether the VM diagnostic agent is provisioned on the VM. + * + * @param enabled the enabled value to set + * @return the ContainerServiceVMDiagnostics object itself. + */ + public ContainerServiceVMDiagnostics withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the URI of the storage account where diagnostics are stored. + * + * @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..4dd14e8202c --- /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 administrator username to use for Windows VMs. + * + * @return the adminUsername value + */ + public String adminUsername() { + return this.adminUsername; + } + + /** + * Set the administrator username to use for Windows VMs. + * + * @param adminUsername the adminUsername value to set + * @return the ContainerServiceWindowsProfile object itself. + */ + public ContainerServiceWindowsProfile withAdminUsername(String adminUsername) { + this.adminUsername = adminUsername; + return this; + } + + /** + * Get the administrator password to use for Windows VMs. + * + * @return the adminPassword value + */ + public String adminPassword() { + return this.adminPassword; + } + + /** + * Set the administrator password to use for Windows VMs. + * + * @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..5121c009502 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/CreationData.java @@ -16,7 +16,8 @@ public class CreationData { /** * This enumerates the possible sources of a disk's creation. Possible - * values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy'. + * values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', + * 'Restore'. */ @JsonProperty(value = "createOption", required = true) private DiskCreateOption createOption; @@ -36,8 +37,8 @@ public class CreationData { private ImageDiskReference imageReference; /** - * If creationOption is Import, this is the URI of a blob to be imported - * into a managed disk. + * If createOption is Import, this is the URI of a blob to be imported into + * a managed disk. */ @JsonProperty(value = "sourceUri") private String sourceUri; @@ -50,7 +51,7 @@ public class CreationData { private String sourceResourceId; /** - * Get the createOption value. + * Get this enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore'. * * @return the createOption value */ @@ -59,7 +60,7 @@ public DiskCreateOption createOption() { } /** - * Set the createOption value. + * Set this enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore'. * * @param createOption the createOption value to set * @return the CreationData object itself. @@ -70,7 +71,7 @@ public CreationData withCreateOption(DiskCreateOption createOption) { } /** - * Get the storageAccountId value. + * Get if createOption is Import, the Azure Resource Manager identifier of the storage account containing the blob to import as a disk. Required only if the blob is in a different subscription. * * @return the storageAccountId value */ @@ -79,7 +80,7 @@ public String storageAccountId() { } /** - * Set the storageAccountId value. + * Set if createOption is Import, the Azure Resource Manager identifier of the storage account containing the blob to import as a disk. Required only if the blob is in a different subscription. * * @param storageAccountId the storageAccountId value to set * @return the CreationData object itself. @@ -90,7 +91,7 @@ public CreationData withStorageAccountId(String storageAccountId) { } /** - * Get the imageReference value. + * Get disk source information. * * @return the imageReference value */ @@ -99,7 +100,7 @@ public ImageDiskReference imageReference() { } /** - * Set the imageReference value. + * Set disk source information. * * @param imageReference the imageReference value to set * @return the CreationData object itself. @@ -110,7 +111,7 @@ public CreationData withImageReference(ImageDiskReference imageReference) { } /** - * Get the sourceUri value. + * Get if createOption is Import, this is the URI of a blob to be imported into a managed disk. * * @return the sourceUri value */ @@ -119,7 +120,7 @@ public String sourceUri() { } /** - * Set the sourceUri value. + * Set if createOption is Import, this is the URI of a blob to be imported into a managed disk. * * @param sourceUri the sourceUri value to set * @return the CreationData object itself. @@ -130,7 +131,7 @@ public CreationData withSourceUri(String sourceUri) { } /** - * Get the sourceResourceId value. + * Get if createOption is Copy, this is the ARM id of the source snapshot or disk. * * @return the sourceResourceId value */ @@ -139,7 +140,7 @@ public String sourceResourceId() { } /** - * Set the sourceResourceId value. + * Set if createOption is Copy, this is the ARM id of the source snapshot or disk. * * @param sourceResourceId the sourceResourceId value to set * @return the CreationData object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java index 66cb552f26d..7ee25bc720c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDisk.java @@ -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 @@ -82,7 +89,7 @@ public class DataDisk { private ManagedDiskParametersInner managedDisk; /** - * Get the lun value. + * Get specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. * * @return the lun value */ @@ -91,7 +98,7 @@ public int lun() { } /** - * Set the lun value. + * Set specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. * * @param lun the lun value to set * @return the DataDisk object itself. @@ -102,7 +109,7 @@ public DataDisk withLun(int lun) { } /** - * Get the name value. + * Get the disk name. * * @return the name value */ @@ -111,7 +118,7 @@ public String name() { } /** - * Set the name value. + * Set the disk name. * * @param name the name value to set * @return the DataDisk object itself. @@ -122,7 +129,7 @@ public DataDisk withName(String name) { } /** - * Get the vhd value. + * Get the virtual hard disk. * * @return the vhd value */ @@ -131,7 +138,7 @@ public VirtualHardDisk vhd() { } /** - * Set the vhd value. + * Set the virtual hard disk. * * @param vhd the vhd value to set * @return the DataDisk object itself. @@ -142,7 +149,7 @@ public DataDisk withVhd(VirtualHardDisk vhd) { } /** - * Get the image value. + * Get the source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. * * @return the image value */ @@ -151,7 +158,7 @@ public VirtualHardDisk image() { } /** - * Set the image value. + * Set the source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. * * @param image the image value to set * @return the DataDisk object itself. @@ -162,7 +169,7 @@ public DataDisk withImage(VirtualHardDisk image) { } /** - * Get the caching value. + * Get specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @return the caching value */ @@ -171,7 +178,7 @@ public CachingTypes caching() { } /** - * Set the caching value. + * Set specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @param caching the caching value to set * @return the DataDisk object itself. @@ -182,7 +189,27 @@ public DataDisk withCaching(CachingTypes caching) { } /** - * Get the createOption value. + * Get specifies whether writeAccelerator should be enabled or disabled on the disk. + * + * @return the writeAcceleratorEnabled value + */ + public Boolean writeAcceleratorEnabled() { + return this.writeAcceleratorEnabled; + } + + /** + * Set specifies whether writeAccelerator should be enabled or disabled on the disk. + * + * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set + * @return the DataDisk object itself. + */ + public DataDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) { + this.writeAcceleratorEnabled = writeAcceleratorEnabled; + return this; + } + + /** + * Get specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'. * * @return the createOption value */ @@ -191,7 +218,7 @@ public DiskCreateOptionTypes createOption() { } /** - * Set the createOption value. + * Set specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'. * * @param createOption the createOption value to set * @return the DataDisk object itself. @@ -202,7 +229,7 @@ public DataDisk withCreateOption(DiskCreateOptionTypes createOption) { } /** - * Get the diskSizeGB value. + * Get specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @return the diskSizeGB value */ @@ -211,7 +238,7 @@ public Integer diskSizeGB() { } /** - * Set the diskSizeGB value. + * Set specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @param diskSizeGB the diskSizeGB value to set * @return the DataDisk object itself. @@ -222,7 +249,7 @@ public DataDisk withDiskSizeGB(Integer diskSizeGB) { } /** - * Get the managedDisk value. + * Get the managed disk parameters. * * @return the managedDisk value */ @@ -231,7 +258,7 @@ public ManagedDiskParametersInner managedDisk() { } /** - * Set the managedDisk value. + * Set the managed disk parameters. * * @param managedDisk the managedDisk value to set * @return the DataDisk object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDiskImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDiskImage.java index ed8c3f25a4f..c641de8eb86 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDiskImage.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DataDiskImage.java @@ -23,7 +23,7 @@ public class DataDiskImage { private Integer lun; /** - * Get the lun value. + * Get specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. * * @return the lun value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiagnosticsProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiagnosticsProfile.java index 30eb09b9f7d..e8695724c71 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiagnosticsProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiagnosticsProfile.java @@ -27,7 +27,7 @@ public class DiagnosticsProfile { private BootDiagnostics bootDiagnostics; /** - * Get the bootDiagnostics value. + * Get boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> For Linux Virtual Machines, you can easily view the output of your console log. <br><br> For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor. * * @return the bootDiagnostics value */ @@ -36,7 +36,7 @@ public BootDiagnostics bootDiagnostics() { } /** - * Set the bootDiagnostics value. + * Set boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> For Linux Virtual Machines, you can easily view the output of your console log. <br><br> For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor. * * @param bootDiagnostics the bootDiagnostics value to set * @return the DiagnosticsProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Disallowed.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Disallowed.java new file mode 100644 index 00000000000..bb457789156 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Disallowed.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the disallowed disk types. + */ +public class Disallowed { + /** + * A list of disk types. + */ + @JsonProperty(value = "diskTypes") + private List diskTypes; + + /** + * Get the diskTypes value. + * + * @return the diskTypes value + */ + public List diskTypes() { + return this.diskTypes; + } + + /** + * Set the diskTypes value. + * + * @param diskTypes the diskTypes value to set + * @return the Disallowed object itself. + */ + public Disallowed withDiskTypes(List diskTypes) { + this.diskTypes = diskTypes; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOption.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOption.java index 903fd7cbca9..98c18c3d144 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOption.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOption.java @@ -8,55 +8,46 @@ package com.microsoft.azure.management.compute; +import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for DiskCreateOption. */ -public enum DiskCreateOption { - /** Enum value Empty. */ - EMPTY("Empty"), +public final class DiskCreateOption extends ExpandableStringEnum { + /** Static value Empty for DiskCreateOption. */ + public static final DiskCreateOption EMPTY = fromString("Empty"); - /** Enum value Attach. */ - ATTACH("Attach"), + /** Static value Attach for DiskCreateOption. */ + public static final DiskCreateOption ATTACH = fromString("Attach"); - /** Enum value FromImage. */ - FROM_IMAGE("FromImage"), + /** Static value FromImage for DiskCreateOption. */ + public static final DiskCreateOption FROM_IMAGE = fromString("FromImage"); - /** Enum value Import. */ - IMPORT("Import"), + /** Static value Import for DiskCreateOption. */ + public static final DiskCreateOption IMPORT = fromString("Import"); - /** Enum value Copy. */ - COPY("Copy"); + /** Static value Copy for DiskCreateOption. */ + public static final DiskCreateOption COPY = fromString("Copy"); - /** The actual serialized value for a DiskCreateOption instance. */ - private String value; - - DiskCreateOption(String value) { - this.value = value; - } + /** Static value Restore for DiskCreateOption. */ + public static final DiskCreateOption RESTORE = fromString("Restore"); /** - * Parses a serialized value to a DiskCreateOption instance. - * - * @param value the serialized value to parse. - * @return the parsed DiskCreateOption object, or null if unable to parse. + * Creates or finds a DiskCreateOption from its string representation. + * @param name a name to look for + * @return the corresponding DiskCreateOption */ @JsonCreator - public static DiskCreateOption fromString(String value) { - DiskCreateOption[] items = DiskCreateOption.values(); - for (DiskCreateOption item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static DiskCreateOption fromString(String name) { + return fromString(name, DiskCreateOption.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** + * @return known DiskCreateOption values + */ + public static Collection values() { + return values(DiskCreateOption.class); } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOptionTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOptionTypes.java index b8c17affbbe..66781dc00fe 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOptionTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskCreateOptionTypes.java @@ -8,49 +8,37 @@ package com.microsoft.azure.management.compute; +import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for DiskCreateOptionTypes. */ -public enum DiskCreateOptionTypes { - /** Enum value FromImage. */ - FROM_IMAGE("FromImage"), +public final class DiskCreateOptionTypes extends ExpandableStringEnum { + /** Static value FromImage for DiskCreateOptionTypes. */ + public static final DiskCreateOptionTypes FROM_IMAGE = fromString("FromImage"); - /** Enum value Empty. */ - EMPTY("Empty"), + /** Static value Empty for DiskCreateOptionTypes. */ + public static final DiskCreateOptionTypes EMPTY = fromString("Empty"); - /** Enum value Attach. */ - ATTACH("Attach"); - - /** The actual serialized value for a DiskCreateOptionTypes instance. */ - private String value; - - DiskCreateOptionTypes(String value) { - this.value = value; - } + /** Static value Attach for DiskCreateOptionTypes. */ + public static final DiskCreateOptionTypes ATTACH = fromString("Attach"); /** - * Parses a serialized value to a DiskCreateOptionTypes instance. - * - * @param value the serialized value to parse. - * @return the parsed DiskCreateOptionTypes object, or null if unable to parse. + * Creates or finds a DiskCreateOptionTypes from its string representation. + * @param name a name to look for + * @return the corresponding DiskCreateOptionTypes */ @JsonCreator - public static DiskCreateOptionTypes fromString(String value) { - DiskCreateOptionTypes[] items = DiskCreateOptionTypes.values(); - for (DiskCreateOptionTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static DiskCreateOptionTypes fromString(String name) { + return fromString(name, DiskCreateOptionTypes.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** + * @return known DiskCreateOptionTypes values + */ + public static Collection values() { + return values(DiskCreateOptionTypes.class); } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskEncryptionSettings.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskEncryptionSettings.java index 53d96f8141a..569191f7b87 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskEncryptionSettings.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskEncryptionSettings.java @@ -35,7 +35,7 @@ public class DiskEncryptionSettings { private Boolean enabled; /** - * Get the diskEncryptionKey value. + * Get specifies the location of the disk encryption key, which is a Key Vault Secret. * * @return the diskEncryptionKey value */ @@ -44,7 +44,7 @@ public KeyVaultSecretReference diskEncryptionKey() { } /** - * Set the diskEncryptionKey value. + * Set specifies the location of the disk encryption key, which is a Key Vault Secret. * * @param diskEncryptionKey the diskEncryptionKey value to set * @return the DiskEncryptionSettings object itself. @@ -55,7 +55,7 @@ public DiskEncryptionSettings withDiskEncryptionKey(KeyVaultSecretReference disk } /** - * Get the keyEncryptionKey value. + * Get specifies the location of the key encryption key in Key Vault. * * @return the keyEncryptionKey value */ @@ -64,7 +64,7 @@ public KeyVaultKeyReference keyEncryptionKey() { } /** - * Set the keyEncryptionKey value. + * Set specifies the location of the key encryption key in Key Vault. * * @param keyEncryptionKey the keyEncryptionKey value to set * @return the DiskEncryptionSettings object itself. @@ -75,7 +75,7 @@ public DiskEncryptionSettings withKeyEncryptionKey(KeyVaultKeyReference keyEncry } /** - * Get the enabled value. + * Get specifies whether disk encryption should be enabled on the virtual machine. * * @return the enabled value */ @@ -84,7 +84,7 @@ public Boolean enabled() { } /** - * Set the enabled value. + * Set specifies whether disk encryption should be enabled on the virtual machine. * * @param enabled the enabled value to set * @return the DiskEncryptionSettings object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskInstanceView.java index 92474499e72..fe5b498d24c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskInstanceView.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.compute; import java.util.List; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -32,10 +33,10 @@ public class DiskInstanceView { * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** - * Get the name value. + * Get the disk name. * * @return the name value */ @@ -44,7 +45,7 @@ public String name() { } /** - * Set the name value. + * Set the disk name. * * @param name the name value to set * @return the DiskInstanceView object itself. @@ -55,7 +56,7 @@ public DiskInstanceView withName(String name) { } /** - * Get the encryptionSettings value. + * Get specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15. * * @return the encryptionSettings value */ @@ -64,7 +65,7 @@ public List encryptionSettings() { } /** - * Set the encryptionSettings value. + * Set specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15. * * @param encryptionSettings the encryptionSettings value to set * @return the DiskInstanceView object itself. @@ -75,21 +76,21 @@ public DiskInstanceView withEncryptionSettings(List encr } /** - * Get the statuses value. + * Get the resource status information. * * @return the statuses value */ - public List statuses() { + public List statuses() { return this.statuses; } /** - * Set the statuses value. + * Set the resource status information. * * @param statuses the statuses value to set * @return the DiskInstanceView object itself. */ - public DiskInstanceView withStatuses(List statuses) { + public DiskInstanceView withStatuses(List statuses) { this.statuses = statuses; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java index 39b94bcaf85..cfe673b3a02 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskSku.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * The disks and snapshots sku name. Can be Standard_LRS or Premium_LRS. + * The disks sku name. Can be Standard_LRS or Premium_LRS. */ public class DiskSku { /** @@ -27,7 +27,7 @@ public class DiskSku { private String tier; /** - * Get the name value. + * Get the sku name. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @return the name value */ @@ -36,7 +36,7 @@ public StorageAccountTypes name() { } /** - * Set the name value. + * Set the sku name. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @param name the name value to set * @return the DiskSku object itself. @@ -47,7 +47,7 @@ public DiskSku withName(StorageAccountTypes name) { } /** - * Get the tier value. + * Get the sku tier. * * @return the tier value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskUpdate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskUpdate.java new file mode 100644 index 00000000000..3ce17e168ed --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/DiskUpdate.java @@ -0,0 +1,154 @@ +/** + * 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.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Disk update resource. + */ +@JsonFlatten +public class DiskUpdate { + /** + * the Operating System type. Possible values include: 'Windows', 'Linux'. + */ + @JsonProperty(value = "properties.osType") + private OperatingSystemTypes osType; + + /** + * If creationData.createOption is Empty, this field is mandatory and it + * indicates the size of the VHD to create. If this field is present for + * updates or creation with other options, it indicates a resize. Resizes + * are only allowed if the disk is not attached to a running VM, and can + * only increase the disk's size. + */ + @JsonProperty(value = "properties.diskSizeGB") + private Integer diskSizeGB; + + /** + * Encryption settings for disk or snapshot. + */ + @JsonProperty(value = "properties.encryptionSettings") + private EncryptionSettings encryptionSettings; + + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The sku property. + */ + @JsonProperty(value = "sku") + private DiskSku sku; + + /** + * Get the Operating System type. Possible values include: 'Windows', 'Linux'. + * + * @return the osType value + */ + public OperatingSystemTypes osType() { + return this.osType; + } + + /** + * Set the Operating System type. Possible values include: 'Windows', 'Linux'. + * + * @param osType the osType value to set + * @return the DiskUpdate object itself. + */ + public DiskUpdate withOsType(OperatingSystemTypes osType) { + this.osType = osType; + return this; + } + + /** + * Get if creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. + * + * @return the diskSizeGB value + */ + public Integer diskSizeGB() { + return this.diskSizeGB; + } + + /** + * Set if creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. + * + * @param diskSizeGB the diskSizeGB value to set + * @return the DiskUpdate object itself. + */ + public DiskUpdate withDiskSizeGB(Integer diskSizeGB) { + this.diskSizeGB = diskSizeGB; + return this; + } + + /** + * Get encryption settings for disk or snapshot. + * + * @return the encryptionSettings value + */ + public EncryptionSettings encryptionSettings() { + return this.encryptionSettings; + } + + /** + * Set encryption settings for disk or snapshot. + * + * @param encryptionSettings the encryptionSettings value to set + * @return the DiskUpdate object itself. + */ + public DiskUpdate withEncryptionSettings(EncryptionSettings encryptionSettings) { + this.encryptionSettings = encryptionSettings; + return this; + } + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the DiskUpdate object itself. + */ + public DiskUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the sku value. + * + * @return the sku value + */ + public DiskSku sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the DiskUpdate object itself. + */ + public DiskUpdate withSku(DiskSku sku) { + this.sku = sku; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/EncryptionSettings.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/EncryptionSettings.java index ba38f0a6bd6..513d02f9e6d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/EncryptionSettings.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/EncryptionSettings.java @@ -37,7 +37,7 @@ public class EncryptionSettings { private KeyVaultAndKeyReference keyEncryptionKey; /** - * Get the enabled value. + * Get set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged. * * @return the enabled value */ @@ -46,7 +46,7 @@ public Boolean enabled() { } /** - * Set the enabled value. + * Set set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged. * * @param enabled the enabled value to set * @return the EncryptionSettings object itself. @@ -57,7 +57,7 @@ public EncryptionSettings withEnabled(Boolean enabled) { } /** - * Get the diskEncryptionKey value. + * Get key Vault Secret Url and vault id of the disk encryption key. * * @return the diskEncryptionKey value */ @@ -66,7 +66,7 @@ public KeyVaultAndSecretReference diskEncryptionKey() { } /** - * Set the diskEncryptionKey value. + * Set key Vault Secret Url and vault id of the disk encryption key. * * @param diskEncryptionKey the diskEncryptionKey value to set * @return the EncryptionSettings object itself. @@ -77,7 +77,7 @@ public EncryptionSettings withDiskEncryptionKey(KeyVaultAndSecretReference diskE } /** - * Get the keyEncryptionKey value. + * Get key Vault Key Url and vault id of the key encryption key. * * @return the keyEncryptionKey value */ @@ -86,7 +86,7 @@ public KeyVaultAndKeyReference keyEncryptionKey() { } /** - * Set the keyEncryptionKey value. + * Set key Vault Key Url and vault id of the key encryption key. * * @param keyEncryptionKey the keyEncryptionKey value to set * @return the EncryptionSettings object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryArtifactPublishingProfileBase.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryArtifactPublishingProfileBase.java new file mode 100644 index 00000000000..b26fa33af52 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryArtifactPublishingProfileBase.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the basic gallery artifact publishing profile. + */ +public class GalleryArtifactPublishingProfileBase { + /** + * The regions where the artifact is going to be published. + */ + @JsonProperty(value = "regions") + private List regions; + + /** + * The source property. + */ + @JsonProperty(value = "source") + private GalleryArtifactSource source; + + /** + * Get the regions value. + * + * @return the regions value + */ + public List regions() { + return this.regions; + } + + /** + * Set the regions value. + * + * @param regions the regions value to set + * @return the GalleryArtifactPublishingProfileBase object itself. + */ + public GalleryArtifactPublishingProfileBase withRegions(List regions) { + this.regions = regions; + return this; + } + + /** + * Get the source value. + * + * @return the source value + */ + public GalleryArtifactSource source() { + return this.source; + } + + /** + * Set the source value. + * + * @param source the source value to set + * @return the GalleryArtifactPublishingProfileBase object itself. + */ + public GalleryArtifactPublishingProfileBase withSource(GalleryArtifactSource source) { + this.source = source; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryArtifactSource.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryArtifactSource.java new file mode 100644 index 00000000000..90c90ea5647 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryArtifactSource.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The source of the gallery artifact. + */ +public class GalleryArtifactSource { + /** + * The managedImage property. + */ + @JsonProperty(value = "managedImage") + private ManagedArtifact managedImage; + + /** + * Get the managedImage value. + * + * @return the managedImage value + */ + public ManagedArtifact managedImage() { + return this.managedImage; + } + + /** + * Set the managedImage value. + * + * @param managedImage the managedImage value to set + * @return the GalleryArtifactSource object itself. + */ + public GalleryArtifactSource withManagedImage(ManagedArtifact managedImage) { + this.managedImage = managedImage; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryDataDiskImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryDataDiskImage.java new file mode 100644 index 00000000000..86d3aac024c --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryDataDiskImage.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This is the data disk image. + */ +public class GalleryDataDiskImage extends GalleryDiskImage { + /** + * Specifies the logical unit number of the data disk. This value is used + * to identify data disks within the VM and therefore must be unique for + * each data disk attached to a VM. + */ + @JsonProperty(value = "lun") + private Integer lun; + + /** + * Get the lun value. + * + * @return the lun value + */ + public Integer lun() { + return this.lun; + } + + /** + * Set the lun value. + * + * @param lun the lun value to set + * @return the GalleryDataDiskImage object itself. + */ + public GalleryDataDiskImage withLun(Integer lun) { + this.lun = lun; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryDiskImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryDiskImage.java new file mode 100644 index 00000000000..2c93f4cb064 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryDiskImage.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This is the disk image base class. + */ +public class GalleryDiskImage { + /** + * It indicates the size of the VHD to create. + */ + @JsonProperty(value = "sizedInGB") + private Integer sizedInGB; + + /** + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. + */ + @JsonProperty(value = "hostCaching") + private HostCaching hostCaching; + + /** + * Get the sizedInGB value. + * + * @return the sizedInGB value + */ + public Integer sizedInGB() { + return this.sizedInGB; + } + + /** + * Set the sizedInGB value. + * + * @param sizedInGB the sizedInGB value to set + * @return the GalleryDiskImage object itself. + */ + public GalleryDiskImage withSizedInGB(Integer sizedInGB) { + this.sizedInGB = sizedInGB; + return this; + } + + /** + * Get the hostCaching value. + * + * @return the hostCaching value + */ + public HostCaching hostCaching() { + return this.hostCaching; + } + + /** + * Set the hostCaching value. + * + * @param hostCaching the hostCaching value to set + * @return the GalleryDiskImage object itself. + */ + public GalleryDiskImage withHostCaching(HostCaching hostCaching) { + this.hostCaching = hostCaching; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryIdentifier.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryIdentifier.java new file mode 100644 index 00000000000..5eadb7c8a7b --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryIdentifier.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The GalleryIdentifier model. + */ +public class GalleryIdentifier { + /** + * The unique name of the gallery. + */ + @JsonProperty(value = "uniqueName", access = JsonProperty.Access.WRITE_ONLY) + private String uniqueName; + + /** + * Get the uniqueName value. + * + * @return the uniqueName value + */ + public String uniqueName() { + return this.uniqueName; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageIdentifier.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageIdentifier.java new file mode 100644 index 00000000000..f3e6f5e87ad --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageIdentifier.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This is the gallery image identifier. + */ +public class GalleryImageIdentifier { + /** + * The gallery image publisher name. + */ + @JsonProperty(value = "publisher") + private String publisher; + + /** + * The gallery image offer name. + */ + @JsonProperty(value = "offer") + private String offer; + + /** + * The gallery image sku name. + */ + @JsonProperty(value = "sku") + private String sku; + + /** + * Get the publisher value. + * + * @return the publisher value + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher value. + * + * @param publisher the publisher value to set + * @return the GalleryImageIdentifier object itself. + */ + public GalleryImageIdentifier withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get the offer value. + * + * @return the offer value + */ + public String offer() { + return this.offer; + } + + /** + * Set the offer value. + * + * @param offer the offer value to set + * @return the GalleryImageIdentifier object itself. + */ + public GalleryImageIdentifier withOffer(String offer) { + this.offer = offer; + return this; + } + + /** + * Get the sku value. + * + * @return the sku value + */ + public String sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the GalleryImageIdentifier object itself. + */ + public GalleryImageIdentifier withSku(String sku) { + this.sku = sku; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageVersionPublishingProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageVersionPublishingProfile.java new file mode 100644 index 00000000000..bbdfd9575d2 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageVersionPublishingProfile.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import org.joda.time.LocalDate; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The publishing profile of a gallery image version. + */ +public class GalleryImageVersionPublishingProfile extends GalleryArtifactPublishingProfileBase { + /** + * The flag means that if it is set to true, people deploying VMs with + * 'latest' as version will not use this version. + */ + @JsonProperty(value = "excludeFromLatest") + private Boolean excludeFromLatest; + + /** + * The time when the gallery image version is published. + */ + @JsonProperty(value = "publishedDate", access = JsonProperty.Access.WRITE_ONLY) + private LocalDate publishedDate; + + /** + * The end of life date of the gallery image version. + */ + @JsonProperty(value = "endOfLifeDate") + private LocalDate endOfLifeDate; + + /** + * Get the excludeFromLatest value. + * + * @return the excludeFromLatest value + */ + public Boolean excludeFromLatest() { + return this.excludeFromLatest; + } + + /** + * Set the excludeFromLatest value. + * + * @param excludeFromLatest the excludeFromLatest value to set + * @return the GalleryImageVersionPublishingProfile object itself. + */ + public GalleryImageVersionPublishingProfile withExcludeFromLatest(Boolean excludeFromLatest) { + this.excludeFromLatest = excludeFromLatest; + return this; + } + + /** + * Get the publishedDate value. + * + * @return the publishedDate value + */ + public LocalDate publishedDate() { + return this.publishedDate; + } + + /** + * Get the endOfLifeDate value. + * + * @return the endOfLifeDate value + */ + public LocalDate endOfLifeDate() { + return this.endOfLifeDate; + } + + /** + * Set the endOfLifeDate value. + * + * @param endOfLifeDate the endOfLifeDate value to set + * @return the GalleryImageVersionPublishingProfile object itself. + */ + public GalleryImageVersionPublishingProfile withEndOfLifeDate(LocalDate endOfLifeDate) { + this.endOfLifeDate = endOfLifeDate; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageVersionStorageProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageVersionStorageProfile.java new file mode 100644 index 00000000000..219a798c135 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryImageVersionStorageProfile.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This is the storage profile of a gallery image version. + */ +public class GalleryImageVersionStorageProfile { + /** + * The osDiskImage property. + */ + @JsonProperty(value = "osDiskImage") + private GalleryOSDiskImage osDiskImage; + + /** + * A list of data disk images. + */ + @JsonProperty(value = "dataDiskImages") + private List dataDiskImages; + + /** + * Get the osDiskImage value. + * + * @return the osDiskImage value + */ + public GalleryOSDiskImage osDiskImage() { + return this.osDiskImage; + } + + /** + * Set the osDiskImage value. + * + * @param osDiskImage the osDiskImage value to set + * @return the GalleryImageVersionStorageProfile object itself. + */ + public GalleryImageVersionStorageProfile withOsDiskImage(GalleryOSDiskImage osDiskImage) { + this.osDiskImage = osDiskImage; + return this; + } + + /** + * Get the dataDiskImages value. + * + * @return the dataDiskImages value + */ + public List dataDiskImages() { + return this.dataDiskImages; + } + + /** + * Set the dataDiskImages value. + * + * @param dataDiskImages the dataDiskImages value to set + * @return the GalleryImageVersionStorageProfile object itself. + */ + public GalleryImageVersionStorageProfile withDataDiskImages(List dataDiskImages) { + this.dataDiskImages = dataDiskImages; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryOSDiskImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryOSDiskImage.java new file mode 100644 index 00000000000..4e2950fb80e --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GalleryOSDiskImage.java @@ -0,0 +1,16 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + + +/** + * This is the OS disk image. + */ +public class GalleryOSDiskImage extends GalleryDiskImage { +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GrantAccessData.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GrantAccessData.java new file mode 100644 index 00000000000..6d91f25b9fe --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/GrantAccessData.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data used for requesting a SAS. + */ +public class GrantAccessData { + /** + * Possible values include: 'None', 'Read'. + */ + @JsonProperty(value = "access", required = true) + private AccessLevel access; + + /** + * Time duration in seconds until the SAS access expires. + */ + @JsonProperty(value = "durationInSeconds", required = true) + private int durationInSeconds; + + /** + * Get possible values include: 'None', 'Read'. + * + * @return the access value + */ + public AccessLevel access() { + return this.access; + } + + /** + * Set possible values include: 'None', 'Read'. + * + * @param access the access value to set + * @return the GrantAccessData object itself. + */ + public GrantAccessData withAccess(AccessLevel access) { + this.access = access; + return this; + } + + /** + * Get time duration in seconds until the SAS access expires. + * + * @return the durationInSeconds value + */ + public int durationInSeconds() { + return this.durationInSeconds; + } + + /** + * Set time duration in seconds until the SAS access expires. + * + * @param durationInSeconds the durationInSeconds value to set + * @return the GrantAccessData object itself. + */ + public GrantAccessData withDurationInSeconds(int durationInSeconds) { + this.durationInSeconds = durationInSeconds; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java index 88c92002d66..893814739da 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HardwareProfile.java @@ -21,42 +21,65 @@ 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; /** - * Get the vmSize value. + * Get specifies the size of the virtual machine. For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> The available VM sizes depend on region and availability set. For a list of available sizes use these APIs: <br><br> [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) <br><br> [List all available virtual machine sizes in a region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) <br><br> [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', 'Standard_NV12', 'Standard_NV24'. * * @return the vmSize value */ @@ -65,7 +88,7 @@ public VirtualMachineSizeTypes vmSize() { } /** - * Set the vmSize value. + * Set specifies the size of the virtual machine. For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> The available VM sizes depend on region and availability set. For a list of available sizes use these APIs: <br><br> [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) <br><br> [List all available virtual machine sizes in a region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) <br><br> [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', 'Standard_NV12', 'Standard_NV24'. * * @param vmSize the vmSize value to set * @return the HardwareProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HostCaching.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HostCaching.java new file mode 100644 index 00000000000..50498ff106f --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/HostCaching.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for HostCaching. + */ +public enum HostCaching { + /** Enum value None. */ + NONE("None"), + + /** Enum value ReadOnly. */ + READ_ONLY("ReadOnly"), + + /** Enum value ReadWrite. */ + READ_WRITE("ReadWrite"); + + /** The actual serialized value for a HostCaching instance. */ + private String value; + + HostCaching(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a HostCaching instance. + * + * @param value the serialized value to parse. + * @return the parsed HostCaching object, or null if unable to parse. + */ + @JsonCreator + public static HostCaching fromString(String value) { + HostCaching[] items = HostCaching.values(); + for (HostCaching item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageDataDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageDataDisk.java index 2aec5e55152..594e7f1259d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageDataDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageDataDisk.java @@ -68,7 +68,7 @@ public class ImageDataDisk { private StorageAccountTypes storageAccountType; /** - * Get the lun value. + * Get specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. * * @return the lun value */ @@ -77,7 +77,7 @@ public int lun() { } /** - * Set the lun value. + * Set specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. * * @param lun the lun value to set * @return the ImageDataDisk object itself. @@ -88,7 +88,7 @@ public ImageDataDisk withLun(int lun) { } /** - * Get the snapshot value. + * Get the snapshot. * * @return the snapshot value */ @@ -97,7 +97,7 @@ public SubResource snapshot() { } /** - * Set the snapshot value. + * Set the snapshot. * * @param snapshot the snapshot value to set * @return the ImageDataDisk object itself. @@ -108,7 +108,7 @@ public ImageDataDisk withSnapshot(SubResource snapshot) { } /** - * Get the managedDisk value. + * Get the managedDisk. * * @return the managedDisk value */ @@ -117,7 +117,7 @@ public SubResource managedDisk() { } /** - * Set the managedDisk value. + * Set the managedDisk. * * @param managedDisk the managedDisk value to set * @return the ImageDataDisk object itself. @@ -128,7 +128,7 @@ public ImageDataDisk withManagedDisk(SubResource managedDisk) { } /** - * Get the blobUri value. + * Get the Virtual Hard Disk. * * @return the blobUri value */ @@ -137,7 +137,7 @@ public String blobUri() { } /** - * Set the blobUri value. + * Set the Virtual Hard Disk. * * @param blobUri the blobUri value to set * @return the ImageDataDisk object itself. @@ -148,7 +148,7 @@ public ImageDataDisk withBlobUri(String blobUri) { } /** - * Get the caching value. + * Get specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @return the caching value */ @@ -157,7 +157,7 @@ public CachingTypes caching() { } /** - * Set the caching value. + * Set specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @param caching the caching value to set * @return the ImageDataDisk object itself. @@ -168,7 +168,7 @@ public ImageDataDisk withCaching(CachingTypes caching) { } /** - * Get the diskSizeGB value. + * Get specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @return the diskSizeGB value */ @@ -177,7 +177,7 @@ public Integer diskSizeGB() { } /** - * Set the diskSizeGB value. + * Set specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @param diskSizeGB the diskSizeGB value to set * @return the ImageDataDisk object itself. @@ -188,7 +188,7 @@ public ImageDataDisk withDiskSizeGB(Integer diskSizeGB) { } /** - * Get the storageAccountType value. + * Get specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @return the storageAccountType value */ @@ -197,7 +197,7 @@ public StorageAccountTypes storageAccountType() { } /** - * Set the storageAccountType value. + * Set specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @param storageAccountType the storageAccountType value to set * @return the ImageDataDisk object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageDiskReference.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageDiskReference.java index c1a048e8a69..22a3269bb74 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageDiskReference.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageDiskReference.java @@ -30,7 +30,7 @@ public class ImageDiskReference { private Integer lun; /** - * Get the id value. + * Get a relative uri containing either a Platform Imgage Repository or user image reference. * * @return the id value */ @@ -39,7 +39,7 @@ public String id() { } /** - * Set the id value. + * Set a relative uri containing either a Platform Imgage Repository or user image reference. * * @param id the id value to set * @return the ImageDiskReference object itself. @@ -50,7 +50,7 @@ public ImageDiskReference withId(String id) { } /** - * Get the lun value. + * Get if the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null. * * @return the lun value */ @@ -59,7 +59,7 @@ public Integer lun() { } /** - * Set the lun value. + * Set if the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null. * * @param lun the lun value to set * @return the ImageDiskReference object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageOSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageOSDisk.java index 03a1c0c59d8..896653c6fb7 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageOSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageOSDisk.java @@ -76,7 +76,7 @@ public class ImageOSDisk { private StorageAccountTypes storageAccountType; /** - * Get the osType value. + * Get this property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'. * * @return the osType value */ @@ -85,7 +85,7 @@ public OperatingSystemTypes osType() { } /** - * Set the osType value. + * Set this property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'. * * @param osType the osType value to set * @return the ImageOSDisk object itself. @@ -96,7 +96,7 @@ public ImageOSDisk withOsType(OperatingSystemTypes osType) { } /** - * Get the osState value. + * Get the OS State. Possible values include: 'Generalized', 'Specialized'. * * @return the osState value */ @@ -105,7 +105,7 @@ public OperatingSystemStateTypes osState() { } /** - * Set the osState value. + * Set the OS State. Possible values include: 'Generalized', 'Specialized'. * * @param osState the osState value to set * @return the ImageOSDisk object itself. @@ -116,7 +116,7 @@ public ImageOSDisk withOsState(OperatingSystemStateTypes osState) { } /** - * Get the snapshot value. + * Get the snapshot. * * @return the snapshot value */ @@ -125,7 +125,7 @@ public SubResource snapshot() { } /** - * Set the snapshot value. + * Set the snapshot. * * @param snapshot the snapshot value to set * @return the ImageOSDisk object itself. @@ -136,7 +136,7 @@ public ImageOSDisk withSnapshot(SubResource snapshot) { } /** - * Get the managedDisk value. + * Get the managedDisk. * * @return the managedDisk value */ @@ -145,7 +145,7 @@ public SubResource managedDisk() { } /** - * Set the managedDisk value. + * Set the managedDisk. * * @param managedDisk the managedDisk value to set * @return the ImageOSDisk object itself. @@ -156,7 +156,7 @@ public ImageOSDisk withManagedDisk(SubResource managedDisk) { } /** - * Get the blobUri value. + * Get the Virtual Hard Disk. * * @return the blobUri value */ @@ -165,7 +165,7 @@ public String blobUri() { } /** - * Set the blobUri value. + * Set the Virtual Hard Disk. * * @param blobUri the blobUri value to set * @return the ImageOSDisk object itself. @@ -176,7 +176,7 @@ public ImageOSDisk withBlobUri(String blobUri) { } /** - * Get the caching value. + * Get specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @return the caching value */ @@ -185,7 +185,7 @@ public CachingTypes caching() { } /** - * Set the caching value. + * Set specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @param caching the caching value to set * @return the ImageOSDisk object itself. @@ -196,7 +196,7 @@ public ImageOSDisk withCaching(CachingTypes caching) { } /** - * Get the diskSizeGB value. + * Get specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @return the diskSizeGB value */ @@ -205,7 +205,7 @@ public Integer diskSizeGB() { } /** - * Set the diskSizeGB value. + * Set specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @param diskSizeGB the diskSizeGB value to set * @return the ImageOSDisk object itself. @@ -216,7 +216,7 @@ public ImageOSDisk withDiskSizeGB(Integer diskSizeGB) { } /** - * Get the storageAccountType value. + * Get specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @return the storageAccountType value */ @@ -225,7 +225,7 @@ public StorageAccountTypes storageAccountType() { } /** - * Set the storageAccountType value. + * Set specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @param storageAccountType the storageAccountType value to set * @return the ImageOSDisk object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImagePurchasePlan.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImagePurchasePlan.java new file mode 100644 index 00000000000..d61b7bd047c --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImagePurchasePlan.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the gallery image purchase plan. This is used by marketplace + * images. + */ +public class ImagePurchasePlan { + /** + * The plan ID. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The publisher ID. + */ + @JsonProperty(value = "publisher") + private String publisher; + + /** + * The product ID. + */ + @JsonProperty(value = "product") + private String product; + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the ImagePurchasePlan object itself. + */ + public ImagePurchasePlan withName(String name) { + this.name = name; + return this; + } + + /** + * Get the publisher value. + * + * @return the publisher value + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher value. + * + * @param publisher the publisher value to set + * @return the ImagePurchasePlan object itself. + */ + public ImagePurchasePlan withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get the product value. + * + * @return the product value + */ + public String product() { + return this.product; + } + + /** + * Set the product value. + * + * @param product the product value to set + * @return the ImagePurchasePlan object itself. + */ + public ImagePurchasePlan withProduct(String product) { + this.product = product; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java index 616a6d8e130..b6633cb7a84 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageStorageProfile.java @@ -21,7 +21,7 @@ public class ImageStorageProfile { * see [About disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). */ - @JsonProperty(value = "osDisk", required = true) + @JsonProperty(value = "osDisk") private ImageOSDisk osDisk; /** @@ -34,7 +34,15 @@ public class ImageStorageProfile { private List dataDisks; /** - * Get the osDisk value. + * Specifies whether an image is zone resilient or not. Default is false. + * Zone resilient images can be created only in regions that provide Zone + * Redundant Storage (ZRS). + */ + @JsonProperty(value = "zoneResilient") + private Boolean zoneResilient; + + /** + * Get specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @return the osDisk value */ @@ -43,7 +51,7 @@ public ImageOSDisk osDisk() { } /** - * Set the osDisk value. + * Set specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @param osDisk the osDisk value to set * @return the ImageStorageProfile object itself. @@ -54,7 +62,7 @@ public ImageStorageProfile withOsDisk(ImageOSDisk osDisk) { } /** - * Get the dataDisks value. + * Get specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @return the dataDisks value */ @@ -63,7 +71,7 @@ public List dataDisks() { } /** - * Set the dataDisks value. + * Set specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @param dataDisks the dataDisks value to set * @return the ImageStorageProfile object itself. @@ -73,4 +81,24 @@ public ImageStorageProfile withDataDisks(List dataDisks) { return this; } + /** + * Get specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS). + * + * @return the zoneResilient value + */ + public Boolean zoneResilient() { + return this.zoneResilient; + } + + /** + * Set specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS). + * + * @param zoneResilient the zoneResilient value to set + * @return the ImageStorageProfile object itself. + */ + public ImageStorageProfile withZoneResilient(Boolean zoneResilient) { + this.zoneResilient = zoneResilient; + return this; + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageUpdate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageUpdate.java new file mode 100644 index 00000000000..f260a655c52 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ImageUpdate.java @@ -0,0 +1,87 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The source user image virtual hard disk. Only tags may be updated. + */ +@JsonFlatten +public class ImageUpdate extends UpdateResource { + /** + * The source virtual machine from which Image is created. + */ + @JsonProperty(value = "properties.sourceVirtualMachine") + private SubResource sourceVirtualMachine; + + /** + * Specifies the storage settings for the virtual machine disks. + */ + @JsonProperty(value = "properties.storageProfile") + private ImageStorageProfile storageProfile; + + /** + * The provisioning state. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Get the source virtual machine from which Image is created. + * + * @return the sourceVirtualMachine value + */ + public SubResource sourceVirtualMachine() { + return this.sourceVirtualMachine; + } + + /** + * Set the source virtual machine from which Image is created. + * + * @param sourceVirtualMachine the sourceVirtualMachine value to set + * @return the ImageUpdate object itself. + */ + public ImageUpdate withSourceVirtualMachine(SubResource sourceVirtualMachine) { + this.sourceVirtualMachine = sourceVirtualMachine; + return this; + } + + /** + * Get specifies the storage settings for the virtual machine disks. + * + * @return the storageProfile value + */ + public ImageStorageProfile storageProfile() { + return this.storageProfile; + } + + /** + * Set specifies the storage settings for the virtual machine disks. + * + * @param storageProfile the storageProfile value to set + * @return the ImageUpdate object itself. + */ + public ImageUpdate withStorageProfile(ImageStorageProfile storageProfile) { + this.storageProfile = storageProfile; + return this; + } + + /** + * Get the provisioning state. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/InnerError.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/InnerError.java index 87179759633..2c5a8559298 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/InnerError.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/InnerError.java @@ -27,7 +27,7 @@ public class InnerError { private String errordetail; /** - * Get the exceptiontype value. + * Get the exception type. * * @return the exceptiontype value */ @@ -36,7 +36,7 @@ public String exceptiontype() { } /** - * Set the exceptiontype value. + * Set the exception type. * * @param exceptiontype the exceptiontype value to set * @return the InnerError object itself. @@ -47,7 +47,7 @@ public InnerError withExceptiontype(String exceptiontype) { } /** - * Get the errordetail value. + * Get the internal error message or exception dump. * * @return the errordetail value */ @@ -56,7 +56,7 @@ public String errordetail() { } /** - * Set the errordetail value. + * Set the internal error message or exception dump. * * @param errordetail the errordetail value to set * @return the InnerError object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/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/KeyVaultAndKeyReference.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultAndKeyReference.java index 8554ddff181..f7fc290061e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultAndKeyReference.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultAndKeyReference.java @@ -28,7 +28,7 @@ public class KeyVaultAndKeyReference { private String keyUrl; /** - * Get the sourceVault value. + * Get resource id of the KeyVault containing the key or secret. * * @return the sourceVault value */ @@ -37,7 +37,7 @@ public SourceVault sourceVault() { } /** - * Set the sourceVault value. + * Set resource id of the KeyVault containing the key or secret. * * @param sourceVault the sourceVault value to set * @return the KeyVaultAndKeyReference object itself. @@ -48,7 +48,7 @@ public KeyVaultAndKeyReference withSourceVault(SourceVault sourceVault) { } /** - * Get the keyUrl value. + * Get url pointing to a key or secret in KeyVault. * * @return the keyUrl value */ @@ -57,7 +57,7 @@ public String keyUrl() { } /** - * Set the keyUrl value. + * Set url pointing to a key or secret in KeyVault. * * @param keyUrl the keyUrl value to set * @return the KeyVaultAndKeyReference object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultAndSecretReference.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultAndSecretReference.java index f7fcde0d42b..d6d701820e8 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultAndSecretReference.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultAndSecretReference.java @@ -27,7 +27,7 @@ public class KeyVaultAndSecretReference { private String secretUrl; /** - * Get the sourceVault value. + * Get resource id of the KeyVault containing the key or secret. * * @return the sourceVault value */ @@ -36,7 +36,7 @@ public SourceVault sourceVault() { } /** - * Set the sourceVault value. + * Set resource id of the KeyVault containing the key or secret. * * @param sourceVault the sourceVault value to set * @return the KeyVaultAndSecretReference object itself. @@ -47,7 +47,7 @@ public KeyVaultAndSecretReference withSourceVault(SourceVault sourceVault) { } /** - * Get the secretUrl value. + * Get url pointing to a key or secret in KeyVault. * * @return the secretUrl value */ @@ -56,7 +56,7 @@ public String secretUrl() { } /** - * Set the secretUrl value. + * Set url pointing to a key or secret in KeyVault. * * @param secretUrl the secretUrl value to set * @return the KeyVaultAndSecretReference object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultKeyReference.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultKeyReference.java index bcc6c3e78a0..59a4e5a5bb0 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultKeyReference.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultKeyReference.java @@ -28,7 +28,7 @@ public class KeyVaultKeyReference { private SubResource sourceVault; /** - * Get the keyUrl value. + * Get the URL referencing a key encryption key in Key Vault. * * @return the keyUrl value */ @@ -37,7 +37,7 @@ public String keyUrl() { } /** - * Set the keyUrl value. + * Set the URL referencing a key encryption key in Key Vault. * * @param keyUrl the keyUrl value to set * @return the KeyVaultKeyReference object itself. @@ -48,7 +48,7 @@ public KeyVaultKeyReference withKeyUrl(String keyUrl) { } /** - * Get the sourceVault value. + * Get the relative URL of the Key Vault containing the key. * * @return the sourceVault value */ @@ -57,7 +57,7 @@ public SubResource sourceVault() { } /** - * Set the sourceVault value. + * Set the relative URL of the Key Vault containing the key. * * @param sourceVault the sourceVault value to set * @return the KeyVaultKeyReference object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultSecretReference.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultSecretReference.java index be661cc5788..a53f65c6f13 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultSecretReference.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/KeyVaultSecretReference.java @@ -28,7 +28,7 @@ public class KeyVaultSecretReference { private SubResource sourceVault; /** - * Get the secretUrl value. + * Get the URL referencing a secret in a Key Vault. * * @return the secretUrl value */ @@ -37,7 +37,7 @@ public String secretUrl() { } /** - * Set the secretUrl value. + * Set the URL referencing a secret in a Key Vault. * * @param secretUrl the secretUrl value to set * @return the KeyVaultSecretReference object itself. @@ -48,7 +48,7 @@ public KeyVaultSecretReference withSecretUrl(String secretUrl) { } /** - * Get the sourceVault value. + * Get the relative URL of the Key Vault containing the secret. * * @return the sourceVault value */ @@ -57,7 +57,7 @@ public SubResource sourceVault() { } /** - * Set the sourceVault value. + * Set the relative URL of the Key Vault containing the secret. * * @param sourceVault the sourceVault value to set * @return the KeyVaultSecretReference object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LinuxConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LinuxConfiguration.java index 4437d203c44..573fc526e57 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LinuxConfiguration.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LinuxConfiguration.java @@ -33,7 +33,7 @@ public class LinuxConfiguration { private SshConfiguration ssh; /** - * Get the disablePasswordAuthentication value. + * Get specifies whether password authentication should be disabled. * * @return the disablePasswordAuthentication value */ @@ -42,7 +42,7 @@ public Boolean disablePasswordAuthentication() { } /** - * Set the disablePasswordAuthentication value. + * Set specifies whether password authentication should be disabled. * * @param disablePasswordAuthentication the disablePasswordAuthentication value to set * @return the LinuxConfiguration object itself. @@ -53,7 +53,7 @@ public LinuxConfiguration withDisablePasswordAuthentication(Boolean disablePassw } /** - * Get the ssh value. + * Get specifies the ssh key configuration for a Linux OS. * * @return the ssh value */ @@ -62,7 +62,7 @@ public SshConfiguration ssh() { } /** - * Set the ssh value. + * Set specifies the ssh key configuration for a Linux OS. * * @param ssh the ssh value to set * @return the LinuxConfiguration object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsInputBase.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/LogAnalyticsInputBase.java new file mode 100644 index 00000000000..c30c957ead2 --- /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 sAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. + * + * @return the blobContainerSasUri value + */ + public String blobContainerSasUri() { + return this.blobContainerSasUri; + } + + /** + * Set sAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. + * + * @param blobContainerSasUri the blobContainerSasUri value to set + * @return the LogAnalyticsInputBase object itself. + */ + public LogAnalyticsInputBase withBlobContainerSasUri(String blobContainerSasUri) { + this.blobContainerSasUri = blobContainerSasUri; + return this; + } + + /** + * Get from time of the query. + * + * @return the fromTime value + */ + public DateTime fromTime() { + return this.fromTime; + } + + /** + * Set from time of the query. + * + * @param fromTime the fromTime value to set + * @return the LogAnalyticsInputBase object itself. + */ + public LogAnalyticsInputBase withFromTime(DateTime fromTime) { + this.fromTime = fromTime; + return this; + } + + /** + * Get to time of the query. + * + * @return the toTime value + */ + public DateTime toTime() { + return this.toTime; + } + + /** + * Set to time of the query. + * + * @param toTime the toTime value to set + * @return the LogAnalyticsInputBase object itself. + */ + public LogAnalyticsInputBase withToTime(DateTime toTime) { + this.toTime = toTime; + return this; + } + + /** + * Get group query result by Throttle Policy applied. + * + * @return the groupByThrottlePolicy value + */ + public Boolean groupByThrottlePolicy() { + return this.groupByThrottlePolicy; + } + + /** + * Set group query result by Throttle Policy applied. + * + * @param groupByThrottlePolicy the groupByThrottlePolicy value to set + * @return the LogAnalyticsInputBase object itself. + */ + public LogAnalyticsInputBase withGroupByThrottlePolicy(Boolean groupByThrottlePolicy) { + this.groupByThrottlePolicy = groupByThrottlePolicy; + return this; + } + + /** + * Get group query result by by Operation Name. + * + * @return the groupByOperationName value + */ + public Boolean groupByOperationName() { + return this.groupByOperationName; + } + + /** + * Set group query result by by Operation Name. + * + * @param groupByOperationName the groupByOperationName value to set + * @return the LogAnalyticsInputBase object itself. + */ + public LogAnalyticsInputBase withGroupByOperationName(Boolean groupByOperationName) { + this.groupByOperationName = groupByOperationName; + return this; + } + + /** + * Get group query result by Resource Name. + * + * @return the groupByResourceName value + */ + public Boolean groupByResourceName() { + return this.groupByResourceName; + } + + /** + * Set group query result by Resource Name. + * + * @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..dc310a855cb --- /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 output file Uri path to blob container. + * + * @return the output value + */ + public String output() { + return this.output; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/MaintenanceRedeployStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/MaintenanceRedeployStatus.java index 291b72fa5df..33444244cb2 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/MaintenanceRedeployStatus.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/MaintenanceRedeployStatus.java @@ -59,7 +59,7 @@ public class MaintenanceRedeployStatus { private String lastOperationMessage; /** - * Get the isCustomerInitiatedMaintenanceAllowed value. + * Get true, if customer is allowed to perform Maintenance. * * @return the isCustomerInitiatedMaintenanceAllowed value */ @@ -68,7 +68,7 @@ public Boolean isCustomerInitiatedMaintenanceAllowed() { } /** - * Set the isCustomerInitiatedMaintenanceAllowed value. + * Set true, if customer is allowed to perform Maintenance. * * @param isCustomerInitiatedMaintenanceAllowed the isCustomerInitiatedMaintenanceAllowed value to set * @return the MaintenanceRedeployStatus object itself. @@ -79,7 +79,7 @@ public MaintenanceRedeployStatus withIsCustomerInitiatedMaintenanceAllowed(Boole } /** - * Get the preMaintenanceWindowStartTime value. + * Get start Time for the Pre Maintenance Window. * * @return the preMaintenanceWindowStartTime value */ @@ -88,7 +88,7 @@ public DateTime preMaintenanceWindowStartTime() { } /** - * Set the preMaintenanceWindowStartTime value. + * Set start Time for the Pre Maintenance Window. * * @param preMaintenanceWindowStartTime the preMaintenanceWindowStartTime value to set * @return the MaintenanceRedeployStatus object itself. @@ -99,7 +99,7 @@ public MaintenanceRedeployStatus withPreMaintenanceWindowStartTime(DateTime preM } /** - * Get the preMaintenanceWindowEndTime value. + * Get end Time for the Pre Maintenance Window. * * @return the preMaintenanceWindowEndTime value */ @@ -108,7 +108,7 @@ public DateTime preMaintenanceWindowEndTime() { } /** - * Set the preMaintenanceWindowEndTime value. + * Set end Time for the Pre Maintenance Window. * * @param preMaintenanceWindowEndTime the preMaintenanceWindowEndTime value to set * @return the MaintenanceRedeployStatus object itself. @@ -119,7 +119,7 @@ public MaintenanceRedeployStatus withPreMaintenanceWindowEndTime(DateTime preMai } /** - * Get the maintenanceWindowStartTime value. + * Get start Time for the Maintenance Window. * * @return the maintenanceWindowStartTime value */ @@ -128,7 +128,7 @@ public DateTime maintenanceWindowStartTime() { } /** - * Set the maintenanceWindowStartTime value. + * Set start Time for the Maintenance Window. * * @param maintenanceWindowStartTime the maintenanceWindowStartTime value to set * @return the MaintenanceRedeployStatus object itself. @@ -139,7 +139,7 @@ public MaintenanceRedeployStatus withMaintenanceWindowStartTime(DateTime mainten } /** - * Get the maintenanceWindowEndTime value. + * Get end Time for the Maintenance Window. * * @return the maintenanceWindowEndTime value */ @@ -148,7 +148,7 @@ public DateTime maintenanceWindowEndTime() { } /** - * Set the maintenanceWindowEndTime value. + * Set end Time for the Maintenance Window. * * @param maintenanceWindowEndTime the maintenanceWindowEndTime value to set * @return the MaintenanceRedeployStatus object itself. @@ -159,7 +159,7 @@ public MaintenanceRedeployStatus withMaintenanceWindowEndTime(DateTime maintenan } /** - * Get the lastOperationResultCode value. + * Get the Last Maintenance Operation Result Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', 'MaintenanceCompleted'. * * @return the lastOperationResultCode value */ @@ -168,7 +168,7 @@ public MaintenanceOperationResultCodeTypes lastOperationResultCode() { } /** - * Set the lastOperationResultCode value. + * Set the Last Maintenance Operation Result Code. Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', 'MaintenanceCompleted'. * * @param lastOperationResultCode the lastOperationResultCode value to set * @return the MaintenanceRedeployStatus object itself. @@ -179,7 +179,7 @@ public MaintenanceRedeployStatus withLastOperationResultCode(MaintenanceOperatio } /** - * Get the lastOperationMessage value. + * Get message returned for the last Maintenance Operation. * * @return the lastOperationMessage value */ @@ -188,7 +188,7 @@ public String lastOperationMessage() { } /** - * Set the lastOperationMessage value. + * Set message returned for the last Maintenance Operation. * * @param lastOperationMessage the lastOperationMessage value to set * @return the MaintenanceRedeployStatus object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ManagedArtifact.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ManagedArtifact.java new file mode 100644 index 00000000000..9fdc871e233 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ManagedArtifact.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The managed artifact. + */ +public class ManagedArtifact { + /** + * The managed artifact id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the id value. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the id value. + * + * @param id the id value to set + * @return the ManagedArtifact object itself. + */ + public ManagedArtifact withId(String id) { + this.id = id; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/NetworkProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/NetworkProfile.java index a5bfdfb1fd4..46fe6e7dcad 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/NetworkProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/NetworkProfile.java @@ -24,7 +24,7 @@ public class NetworkProfile { private List networkInterfaces; /** - * Get the networkInterfaces value. + * Get specifies the list of resource Ids for the network interfaces associated with the virtual machine. * * @return the networkInterfaces value */ @@ -33,7 +33,7 @@ public List networkInterfaces() { } /** - * Set the networkInterfaces value. + * Set specifies the list of resource Ids for the network interfaces associated with the virtual machine. * * @param networkInterfaces the networkInterfaces value to set * @return the NetworkProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java index 8e598af97a3..a98771e5087 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDisk.java @@ -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 @@ -94,7 +101,7 @@ public class OSDisk { private ManagedDiskParametersInner managedDisk; /** - * Get the osType value. + * Get this property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'. * * @return the osType value */ @@ -103,7 +110,7 @@ public OperatingSystemTypes osType() { } /** - * Set the osType value. + * Set this property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'. * * @param osType the osType value to set * @return the OSDisk object itself. @@ -114,7 +121,7 @@ public OSDisk withOsType(OperatingSystemTypes osType) { } /** - * Get the encryptionSettings value. + * Get specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15. * * @return the encryptionSettings value */ @@ -123,7 +130,7 @@ public DiskEncryptionSettings encryptionSettings() { } /** - * Set the encryptionSettings value. + * Set specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15. * * @param encryptionSettings the encryptionSettings value to set * @return the OSDisk object itself. @@ -134,7 +141,7 @@ public OSDisk withEncryptionSettings(DiskEncryptionSettings encryptionSettings) } /** - * Get the name value. + * Get the disk name. * * @return the name value */ @@ -143,7 +150,7 @@ public String name() { } /** - * Set the name value. + * Set the disk name. * * @param name the name value to set * @return the OSDisk object itself. @@ -154,7 +161,7 @@ public OSDisk withName(String name) { } /** - * Get the vhd value. + * Get the virtual hard disk. * * @return the vhd value */ @@ -163,7 +170,7 @@ public VirtualHardDisk vhd() { } /** - * Set the vhd value. + * Set the virtual hard disk. * * @param vhd the vhd value to set * @return the OSDisk object itself. @@ -174,7 +181,7 @@ public OSDisk withVhd(VirtualHardDisk vhd) { } /** - * Get the image value. + * Get the source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. * * @return the image value */ @@ -183,7 +190,7 @@ public VirtualHardDisk image() { } /** - * Set the image value. + * Set the source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. * * @param image the image value to set * @return the OSDisk object itself. @@ -194,7 +201,7 @@ public OSDisk withImage(VirtualHardDisk image) { } /** - * Get the caching value. + * Get specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @return the caching value */ @@ -203,7 +210,7 @@ public CachingTypes caching() { } /** - * Set the caching value. + * Set specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @param caching the caching value to set * @return the OSDisk object itself. @@ -214,7 +221,27 @@ public OSDisk withCaching(CachingTypes caching) { } /** - * Get the createOption value. + * Get specifies whether writeAccelerator should be enabled or disabled on the disk. + * + * @return the writeAcceleratorEnabled value + */ + public Boolean writeAcceleratorEnabled() { + return this.writeAcceleratorEnabled; + } + + /** + * Set specifies whether writeAccelerator should be enabled or disabled on the disk. + * + * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set + * @return the OSDisk object itself. + */ + public OSDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) { + this.writeAcceleratorEnabled = writeAcceleratorEnabled; + return this; + } + + /** + * Get specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'. * * @return the createOption value */ @@ -223,7 +250,7 @@ public DiskCreateOptionTypes createOption() { } /** - * Set the createOption value. + * Set specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'. * * @param createOption the createOption value to set * @return the OSDisk object itself. @@ -234,7 +261,7 @@ public OSDisk withCreateOption(DiskCreateOptionTypes createOption) { } /** - * Get the diskSizeGB value. + * Get specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @return the diskSizeGB value */ @@ -243,7 +270,7 @@ public Integer diskSizeGB() { } /** - * Set the diskSizeGB value. + * Set specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @param diskSizeGB the diskSizeGB value to set * @return the OSDisk object itself. @@ -254,7 +281,7 @@ public OSDisk withDiskSizeGB(Integer diskSizeGB) { } /** - * Get the managedDisk value. + * Get the managed disk parameters. * * @return the managedDisk value */ @@ -263,7 +290,7 @@ public ManagedDiskParametersInner managedDisk() { } /** - * Set the managedDisk value. + * Set the managed disk parameters. * * @param managedDisk the managedDisk value to set * @return the OSDisk object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDiskImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDiskImage.java index 32ccef8a67b..e3eda63bd4f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDiskImage.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSDiskImage.java @@ -22,7 +22,7 @@ public class OSDiskImage { private OperatingSystemTypes operatingSystem; /** - * Get the operatingSystem value. + * Get the operating system of the osDiskImage. Possible values include: 'Windows', 'Linux'. * * @return the operatingSystem value */ @@ -31,7 +31,7 @@ public OperatingSystemTypes operatingSystem() { } /** - * Set the operatingSystem value. + * Set the operating system of the osDiskImage. Possible values include: 'Windows', 'Linux'. * * @param operatingSystem the operatingSystem value to set * @return the OSDiskImage object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSProfile.java index 969df52f231..a646516eec1 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/OSProfile.java @@ -106,7 +106,7 @@ public class OSProfile { private List secrets; /** - * Get the computerName value. + * Get specifies the host OS name of the virtual machine. <br><br> **Max-length (Windows):** 15 characters <br><br> **Max-length (Linux):** 64 characters. <br><br> For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). * * @return the computerName value */ @@ -115,7 +115,7 @@ public String computerName() { } /** - * Set the computerName value. + * Set specifies the host OS name of the virtual machine. <br><br> **Max-length (Windows):** 15 characters <br><br> **Max-length (Linux):** 64 characters. <br><br> For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). * * @param computerName the computerName value to set * @return the OSProfile object itself. @@ -126,7 +126,7 @@ public OSProfile withComputerName(String computerName) { } /** - * Get the adminUsername value. + * Get specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @return the adminUsername value */ @@ -135,7 +135,7 @@ public String adminUsername() { } /** - * Set the adminUsername value. + * Set specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @param adminUsername the adminUsername value to set * @return the OSProfile object itself. @@ -146,7 +146,7 @@ public OSProfile withAdminUsername(String adminUsername) { } /** - * Get the adminPassword value. + * Get specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password). * * @return the adminPassword value */ @@ -155,7 +155,7 @@ public String adminPassword() { } /** - * Set the adminPassword value. + * Set specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password). * * @param adminPassword the adminPassword value to set * @return the OSProfile object itself. @@ -166,7 +166,7 @@ public OSProfile withAdminPassword(String adminPassword) { } /** - * Get the customData value. + * Get specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @return the customData value */ @@ -175,7 +175,7 @@ public String customData() { } /** - * Set the customData value. + * Set specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @param customData the customData value to set * @return the OSProfile object itself. @@ -186,7 +186,7 @@ public OSProfile withCustomData(String customData) { } /** - * Get the windowsConfiguration value. + * Get specifies Windows operating system settings on the virtual machine. * * @return the windowsConfiguration value */ @@ -195,7 +195,7 @@ public WindowsConfiguration windowsConfiguration() { } /** - * Set the windowsConfiguration value. + * Set specifies Windows operating system settings on the virtual machine. * * @param windowsConfiguration the windowsConfiguration value to set * @return the OSProfile object itself. @@ -206,7 +206,7 @@ public OSProfile withWindowsConfiguration(WindowsConfiguration windowsConfigurat } /** - * Get the linuxConfiguration value. + * Get specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @return the linuxConfiguration value */ @@ -215,7 +215,7 @@ public LinuxConfiguration linuxConfiguration() { } /** - * Set the linuxConfiguration value. + * Set specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @param linuxConfiguration the linuxConfiguration value to set * @return the OSProfile object itself. @@ -226,7 +226,7 @@ public OSProfile withLinuxConfiguration(LinuxConfiguration linuxConfiguration) { } /** - * Get the secrets value. + * Get specifies set of certificates that should be installed onto the virtual machine. * * @return the secrets value */ @@ -235,7 +235,7 @@ public List secrets() { } /** - * Set the secrets value. + * Set specifies set of certificates that should be installed onto the virtual machine. * * @param secrets the secrets value to set * @return the OSProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Plan.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Plan.java index 1397ea0974f..0f235f78fa6 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Plan.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Plan.java @@ -45,7 +45,7 @@ public class Plan { private String promotionCode; /** - * Get the name value. + * Get the plan ID. * * @return the name value */ @@ -54,7 +54,7 @@ public String name() { } /** - * Set the name value. + * Set the plan ID. * * @param name the name value to set * @return the Plan object itself. @@ -65,7 +65,7 @@ public Plan withName(String name) { } /** - * Get the publisher value. + * Get the publisher ID. * * @return the publisher value */ @@ -74,7 +74,7 @@ public String publisher() { } /** - * Set the publisher value. + * Set the publisher ID. * * @param publisher the publisher value to set * @return the Plan object itself. @@ -85,7 +85,7 @@ public Plan withPublisher(String publisher) { } /** - * Get the product value. + * Get specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. * * @return the product value */ @@ -94,7 +94,7 @@ public String product() { } /** - * Set the product value. + * Set specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. * * @param product the product value to set * @return the Plan object itself. @@ -105,7 +105,7 @@ public Plan withProduct(String product) { } /** - * Get the promotionCode value. + * Get the promotion code. * * @return the promotionCode value */ @@ -114,7 +114,7 @@ public String promotionCode() { } /** - * Set the promotionCode value. + * Set the promotion code. * * @param promotionCode the promotionCode value to set * @return the Plan object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/PurchasePlan.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/PurchasePlan.java index 13989d2720f..e5558f86665 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/PurchasePlan.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/PurchasePlan.java @@ -35,7 +35,7 @@ public class PurchasePlan { private String product; /** - * Get the publisher value. + * Get the publisher ID. * * @return the publisher value */ @@ -44,7 +44,7 @@ public String publisher() { } /** - * Set the publisher value. + * Set the publisher ID. * * @param publisher the publisher value to set * @return the PurchasePlan object itself. @@ -55,7 +55,7 @@ public PurchasePlan withPublisher(String publisher) { } /** - * Get the name value. + * Get the plan ID. * * @return the name value */ @@ -64,7 +64,7 @@ public String name() { } /** - * Set the name value. + * Set the plan ID. * * @param name the name value to set * @return the PurchasePlan object itself. @@ -75,7 +75,7 @@ public PurchasePlan withName(String name) { } /** - * Get the product value. + * Get specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. * * @return the product value */ @@ -84,7 +84,7 @@ public String product() { } /** - * Set the product value. + * Set specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. * * @param product the product value to set * @return the PurchasePlan object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RecommendedMachineConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RecommendedMachineConfiguration.java new file mode 100644 index 00000000000..19258d74d9b --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RecommendedMachineConfiguration.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the recommended machine configuration. + */ +public class RecommendedMachineConfiguration { + /** + * The vCPUs property. + */ + @JsonProperty(value = "vCPUs") + private ResourceRange vCPUs; + + /** + * The memory property. + */ + @JsonProperty(value = "memory") + private ResourceRange memory; + + /** + * Get the vCPUs value. + * + * @return the vCPUs value + */ + public ResourceRange vCPUs() { + return this.vCPUs; + } + + /** + * Set the vCPUs value. + * + * @param vCPUs the vCPUs value to set + * @return the RecommendedMachineConfiguration object itself. + */ + public RecommendedMachineConfiguration withVCPUs(ResourceRange vCPUs) { + this.vCPUs = vCPUs; + return this; + } + + /** + * Get the memory value. + * + * @return the memory value + */ + public ResourceRange memory() { + return this.memory; + } + + /** + * Set the memory value. + * + * @param memory the memory value to set + * @return the RecommendedMachineConfiguration object itself. + */ + public RecommendedMachineConfiguration withMemory(ResourceRange memory) { + this.memory = memory; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RegionalReplicationStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RegionalReplicationStatus.java new file mode 100644 index 00000000000..0651f072b9a --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RegionalReplicationStatus.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This is the regional replication status. + */ +public class RegionalReplicationStatus { + /** + * The region where the gallery image version is published to. + */ + @JsonProperty(value = "region") + private String region; + + /** + * This is the regional replication state. Possible values include: + * 'Unknown', 'Replicating', 'Completed', 'Failed'. + */ + @JsonProperty(value = "state") + private ReplicationState state; + + /** + * The details of the replication status. + */ + @JsonProperty(value = "details") + private String details; + + /** + * It indicates progress of the replication job. + */ + @JsonProperty(value = "progress") + private Integer progress; + + /** + * Get the region value. + * + * @return the region value + */ + public String region() { + return this.region; + } + + /** + * Set the region value. + * + * @param region the region value to set + * @return the RegionalReplicationStatus object itself. + */ + public RegionalReplicationStatus withRegion(String region) { + this.region = region; + return this; + } + + /** + * Get the state value. + * + * @return the state value + */ + public ReplicationState state() { + return this.state; + } + + /** + * Set the state value. + * + * @param state the state value to set + * @return the RegionalReplicationStatus object itself. + */ + public RegionalReplicationStatus withState(ReplicationState state) { + this.state = state; + return this; + } + + /** + * Get the details value. + * + * @return the details value + */ + public String details() { + return this.details; + } + + /** + * Set the details value. + * + * @param details the details value to set + * @return the RegionalReplicationStatus object itself. + */ + public RegionalReplicationStatus withDetails(String details) { + this.details = details; + return this; + } + + /** + * Get the progress value. + * + * @return the progress value + */ + public Integer progress() { + return this.progress; + } + + /** + * Set the progress value. + * + * @param progress the progress value to set + * @return the RegionalReplicationStatus object itself. + */ + public RegionalReplicationStatus withProgress(Integer progress) { + this.progress = progress; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationState.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationState.java new file mode 100644 index 00000000000..849cf4c5f3e --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationState.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ReplicationState. + */ +public enum ReplicationState { + /** Enum value Unknown. */ + UNKNOWN("Unknown"), + + /** Enum value Replicating. */ + REPLICATING("Replicating"), + + /** Enum value Completed. */ + COMPLETED("Completed"), + + /** Enum value Failed. */ + FAILED("Failed"); + + /** The actual serialized value for a ReplicationState instance. */ + private String value; + + ReplicationState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ReplicationState instance. + * + * @param value the serialized value to parse. + * @return the parsed ReplicationState object, or null if unable to parse. + */ + @JsonCreator + public static ReplicationState fromString(String value) { + ReplicationState[] items = ReplicationState.values(); + for (ReplicationState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationStatus.java new file mode 100644 index 00000000000..501723d6ff5 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationStatus.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * This is the replication status of the gallery image version. + */ +public class ReplicationStatus { + /** + * This is the aggregated replication status based on the regional + * replication status. Possible values include: 'Unknown', 'InProgress', + * 'Completed', 'Failed'. + */ + @JsonProperty(value = "aggregatedState") + private AggregatedReplicationState aggregatedState; + + /** + * This is a summary of replication status for each region. + */ + @JsonProperty(value = "summary") + private List summary; + + /** + * Get the aggregatedState value. + * + * @return the aggregatedState value + */ + public AggregatedReplicationState aggregatedState() { + return this.aggregatedState; + } + + /** + * Set the aggregatedState value. + * + * @param aggregatedState the aggregatedState value to set + * @return the ReplicationStatus object itself. + */ + public ReplicationStatus withAggregatedState(AggregatedReplicationState aggregatedState) { + this.aggregatedState = aggregatedState; + return this; + } + + /** + * Get the summary value. + * + * @return the summary value + */ + public List summary() { + return this.summary; + } + + /** + * Set the summary value. + * + * @param summary the summary value to set + * @return the ReplicationStatus object itself. + */ + public ReplicationStatus withSummary(List summary) { + this.summary = summary; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationStatusTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationStatusTypes.java new file mode 100644 index 00000000000..8a910c86736 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ReplicationStatusTypes.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ReplicationStatusTypes. + */ +public enum ReplicationStatusTypes { + /** Enum value ReplicationStatus. */ + REPLICATION_STATUS("ReplicationStatus"); + + /** The actual serialized value for a ReplicationStatusTypes instance. */ + private String value; + + ReplicationStatusTypes(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ReplicationStatusTypes instance. + * + * @param value the serialized value to parse. + * @return the parsed ReplicationStatusTypes object, or null if unable to parse. + */ + @JsonCreator + public static ReplicationStatusTypes fromString(String value) { + ReplicationStatusTypes[] items = ReplicationStatusTypes.values(); + for (ReplicationStatusTypes item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RequestRateByIntervalInput.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RequestRateByIntervalInput.java new file mode 100644 index 00000000000..c890083b299 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RequestRateByIntervalInput.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Api request input for LogAnalytics getRequestRateByInterval Api. + */ +public class RequestRateByIntervalInput extends LogAnalyticsInputBase { + /** + * Interval value in minutes used to create LogAnalytics call rate logs. + * Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', + * 'SixtyMins'. + */ + @JsonProperty(value = "intervalLength", required = true) + private IntervalInMins intervalLength; + + /** + * Get interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins'. + * + * @return the intervalLength value + */ + public IntervalInMins intervalLength() { + return this.intervalLength; + } + + /** + * Set interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins'. + * + * @param intervalLength the intervalLength value to set + * @return the RequestRateByIntervalInput object itself. + */ + public RequestRateByIntervalInput withIntervalLength(IntervalInMins intervalLength) { + this.intervalLength = intervalLength; + return this; + } + +} 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/ResourceRange.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceRange.java new file mode 100644 index 00000000000..7651b9b06b4 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceRange.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the resource range. + */ +public class ResourceRange { + /** + * The minimum number of the resource. + */ + @JsonProperty(value = "min") + private Integer min; + + /** + * The maximum number of the resource. + */ + @JsonProperty(value = "max") + private Integer max; + + /** + * Get the min value. + * + * @return the min value + */ + public Integer min() { + return this.min; + } + + /** + * Set the min value. + * + * @param min the min value to set + * @return the ResourceRange object itself. + */ + public ResourceRange withMin(Integer min) { + this.min = min; + return this; + } + + /** + * Get the max value. + * + * @return the max value + */ + public Integer max() { + return this.max; + } + + /** + * Set the max value. + * + * @param max the max value to set + * @return the ResourceRange object itself. + */ + public ResourceRange withMax(Integer max) { + this.max = max; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCapabilities.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCapabilities.java index f075babef4e..ba0b34afd36 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCapabilities.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCapabilities.java @@ -27,7 +27,7 @@ public class ResourceSkuCapabilities { private String value; /** - * Get the name value. + * Get an invariant to describe the feature. * * @return the name value */ @@ -36,7 +36,7 @@ public String name() { } /** - * Get the value value. + * Get an invariant if the feature is measured by quantity. * * @return the value value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCapacity.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCapacity.java index 49d2ac70cbf..7fb16cafbbd 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCapacity.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCapacity.java @@ -40,7 +40,7 @@ public class ResourceSkuCapacity { private ResourceSkuCapacityScaleType scaleType; /** - * Get the minimum value. + * Get the minimum capacity. * * @return the minimum value */ @@ -49,7 +49,7 @@ public Long minimum() { } /** - * Get the maximum value. + * Get the maximum capacity that can be set. * * @return the maximum value */ @@ -58,7 +58,7 @@ public Long maximum() { } /** - * Get the defaultProperty value. + * Get the default capacity. * * @return the defaultProperty value */ @@ -67,7 +67,7 @@ public Long defaultProperty() { } /** - * Get the scaleType value. + * Get the scale type applicable to the sku. Possible values include: 'Automatic', 'Manual', 'None'. * * @return the scaleType value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCosts.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCosts.java index 496b2876e43..6e04c044516 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCosts.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuCosts.java @@ -33,7 +33,7 @@ public class ResourceSkuCosts { private String extendedUnit; /** - * Get the meterID value. + * Get used for querying price from commerce. * * @return the meterID value */ @@ -42,7 +42,7 @@ public String meterID() { } /** - * Get the quantity value. + * Get the multiplier is needed to extend the base metered cost. * * @return the quantity value */ @@ -51,7 +51,7 @@ public Long quantity() { } /** - * Get the extendedUnit value. + * Get an invariant to show the extended unit. * * @return the extendedUnit value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuLocationInfo.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuLocationInfo.java index f858bb77738..d47f6ff9d7e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuLocationInfo.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuLocationInfo.java @@ -28,7 +28,7 @@ public class ResourceSkuLocationInfo { private List zones; /** - * Get the location value. + * Get location of the SKU. * * @return the location value */ @@ -37,7 +37,7 @@ public String location() { } /** - * Get the zones value. + * Get list of availability zones where the SKU is supported. * * @return the zones value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictionInfo.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictionInfo.java new file mode 100644 index 00000000000..ec57f0f2ee3 --- /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 locations where the SKU is restricted. + * + * @return the locations value + */ + public List locations() { + return this.locations; + } + + /** + * Get list of availability zones where the SKU is restricted. + * + * @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..f128f1f407c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictions.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ResourceSkuRestrictions.java @@ -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'. @@ -36,7 +42,7 @@ public class ResourceSkuRestrictions { private ResourceSkuRestrictionsReasonCode reasonCode; /** - * Get the type value. + * Get the type of restrictions. Possible values include: 'Location', 'Zone'. * * @return the type value */ @@ -45,7 +51,7 @@ public ResourceSkuRestrictionsType type() { } /** - * Get the values value. + * Get the value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. * * @return the values value */ @@ -54,7 +60,16 @@ public List values() { } /** - * Get the reasonCode value. + * Get the information about the restriction where the SKU cannot be used. + * + * @return the restrictionInfo value + */ + public ResourceSkuRestrictionInfo restrictionInfo() { + return this.restrictionInfo; + } + + /** + * Get the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription'. * * @return the reasonCode value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/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/RollbackStatusInfo.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollbackStatusInfo.java new file mode 100644 index 00000000000..41ab79c76ce --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollbackStatusInfo.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about rollback on failed VM instances after a OS Upgrade + * operation. + */ +public class RollbackStatusInfo { + /** + * The number of instances which have been successfully rolled back. + */ + @JsonProperty(value = "successfullyRolledbackInstanceCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer successfullyRolledbackInstanceCount; + + /** + * The number of instances which failed to rollback. + */ + @JsonProperty(value = "failedRolledbackInstanceCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer failedRolledbackInstanceCount; + + /** + * Error Details if OS rollback failed. + */ + @JsonProperty(value = "rollbackError", access = JsonProperty.Access.WRITE_ONLY) + private ApiError rollbackError; + + /** + * Get the number of instances which have been successfully rolled back. + * + * @return the successfullyRolledbackInstanceCount value + */ + public Integer successfullyRolledbackInstanceCount() { + return this.successfullyRolledbackInstanceCount; + } + + /** + * Get the number of instances which failed to rollback. + * + * @return the failedRolledbackInstanceCount value + */ + public Integer failedRolledbackInstanceCount() { + return this.failedRolledbackInstanceCount; + } + + /** + * Get error Details if OS rollback failed. + * + * @return the rollbackError value + */ + public ApiError rollbackError() { + return this.rollbackError; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradePolicy.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradePolicy.java index 1b11eb5fc54..3d66d15d05d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradePolicy.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradePolicy.java @@ -53,7 +53,7 @@ public class RollingUpgradePolicy { private String pauseTimeBetweenBatches; /** - * Get the maxBatchInstancePercent value. + * Get the maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%. * * @return the maxBatchInstancePercent value */ @@ -62,7 +62,7 @@ public Integer maxBatchInstancePercent() { } /** - * Set the maxBatchInstancePercent value. + * Set the maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%. * * @param maxBatchInstancePercent the maxBatchInstancePercent value to set * @return the RollingUpgradePolicy object itself. @@ -73,7 +73,7 @@ public RollingUpgradePolicy withMaxBatchInstancePercent(Integer maxBatchInstance } /** - * Get the maxUnhealthyInstancePercent value. + * Get the maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%. * * @return the maxUnhealthyInstancePercent value */ @@ -82,7 +82,7 @@ public Integer maxUnhealthyInstancePercent() { } /** - * Set the maxUnhealthyInstancePercent value. + * Set the maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%. * * @param maxUnhealthyInstancePercent the maxUnhealthyInstancePercent value to set * @return the RollingUpgradePolicy object itself. @@ -93,7 +93,7 @@ public RollingUpgradePolicy withMaxUnhealthyInstancePercent(Integer maxUnhealthy } /** - * Get the maxUnhealthyUpgradedInstancePercent value. + * Get the maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%. * * @return the maxUnhealthyUpgradedInstancePercent value */ @@ -102,7 +102,7 @@ public Integer maxUnhealthyUpgradedInstancePercent() { } /** - * Set the maxUnhealthyUpgradedInstancePercent value. + * Set the maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%. * * @param maxUnhealthyUpgradedInstancePercent the maxUnhealthyUpgradedInstancePercent value to set * @return the RollingUpgradePolicy object itself. @@ -113,7 +113,7 @@ public RollingUpgradePolicy withMaxUnhealthyUpgradedInstancePercent(Integer maxU } /** - * Get the pauseTimeBetweenBatches value. + * Get the wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S). * * @return the pauseTimeBetweenBatches value */ @@ -122,7 +122,7 @@ public String pauseTimeBetweenBatches() { } /** - * Set the pauseTimeBetweenBatches value. + * Set the wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S). * * @param pauseTimeBetweenBatches the pauseTimeBetweenBatches value to set * @return the RollingUpgradePolicy object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradeProgressInfo.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradeProgressInfo.java index 3a789fcd608..fdcfc3ba0cf 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradeProgressInfo.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradeProgressInfo.java @@ -40,7 +40,7 @@ public class RollingUpgradeProgressInfo { private Integer pendingInstanceCount; /** - * Get the successfulInstanceCount value. + * Get the number of instances that have been successfully upgraded. * * @return the successfulInstanceCount value */ @@ -49,7 +49,7 @@ public Integer successfulInstanceCount() { } /** - * Get the failedInstanceCount value. + * Get the number of instances that have failed to be upgraded successfully. * * @return the failedInstanceCount value */ @@ -58,7 +58,7 @@ public Integer failedInstanceCount() { } /** - * Get the inProgressInstanceCount value. + * Get the number of instances that are currently being upgraded. * * @return the inProgressInstanceCount value */ @@ -67,7 +67,7 @@ public Integer inProgressInstanceCount() { } /** - * Get the pendingInstanceCount value. + * Get the number of instances that have not yet begun to be upgraded. * * @return the pendingInstanceCount value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradeRunningStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradeRunningStatus.java index d90c22bf549..1bc1520c9f5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradeRunningStatus.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RollingUpgradeRunningStatus.java @@ -42,7 +42,7 @@ public class RollingUpgradeRunningStatus { private DateTime lastActionTime; /** - * Get the code value. + * Get code indicating the current status of the upgrade. Possible values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted'. * * @return the code value */ @@ -51,7 +51,7 @@ public RollingUpgradeStatusCode code() { } /** - * Get the startTime value. + * Get start time of the upgrade. * * @return the startTime value */ @@ -60,7 +60,7 @@ public DateTime startTime() { } /** - * Get the lastAction value. + * Get the last action performed on the rolling upgrade. Possible values include: 'Start', 'Cancel'. * * @return the lastAction value */ @@ -69,7 +69,7 @@ public RollingUpgradeActionType lastAction() { } /** - * Get the lastActionTime value. + * Get last action time of the upgrade. * * @return the lastActionTime value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandInput.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandInput.java new file mode 100644 index 00000000000..c527a58613c --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandInput.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Capture Virtual Machine parameters. + */ +public class RunCommandInput { + /** + * The run command id. + */ + @JsonProperty(value = "commandId", required = true) + private String commandId; + + /** + * Optional. The script to be executed. When this value is given, the + * given script will override the default script of the command. + */ + @JsonProperty(value = "script") + private List script; + + /** + * The run command parameters. + */ + @JsonProperty(value = "parameters") + private List parameters; + + /** + * Get the run command id. + * + * @return the commandId value + */ + public String commandId() { + return this.commandId; + } + + /** + * Set the run command id. + * + * @param commandId the commandId value to set + * @return the RunCommandInput object itself. + */ + public RunCommandInput withCommandId(String commandId) { + this.commandId = commandId; + return this; + } + + /** + * Get optional. The script to be executed. When this value is given, the given script will override the default script of the command. + * + * @return the script value + */ + public List script() { + return this.script; + } + + /** + * Set optional. The script to be executed. When this value is given, the given script will override the default script of the command. + * + * @param script the script value to set + * @return the RunCommandInput object itself. + */ + public RunCommandInput withScript(List script) { + this.script = script; + return this; + } + + /** + * Get the run command parameters. + * + * @return the parameters value + */ + public List parameters() { + return this.parameters; + } + + /** + * Set the run command parameters. + * + * @param parameters the parameters value to set + * @return the RunCommandInput object itself. + */ + public RunCommandInput withParameters(List parameters) { + this.parameters = parameters; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandInputParameter.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandInputParameter.java index 0ea5db5de6d..12b43520f68 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandInputParameter.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandInputParameter.java @@ -27,7 +27,7 @@ public class RunCommandInputParameter { private String value; /** - * Get the name value. + * Get the run command parameter name. * * @return the name value */ @@ -36,7 +36,7 @@ public String name() { } /** - * Set the name value. + * Set the run command parameter name. * * @param name the name value to set * @return the RunCommandInputParameter object itself. @@ -47,7 +47,7 @@ public RunCommandInputParameter withName(String name) { } /** - * Get the value value. + * Get the run command parameter value. * * @return the value value */ @@ -56,7 +56,7 @@ public String value() { } /** - * Set the value value. + * Set the run command parameter value. * * @param value the value value to set * @return the RunCommandInputParameter object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandParameterDefinition.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandParameterDefinition.java index a984919119c..488723675cb 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandParameterDefinition.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandParameterDefinition.java @@ -39,7 +39,7 @@ public class RunCommandParameterDefinition { private Boolean required; /** - * Get the name value. + * Get the run command parameter name. * * @return the name value */ @@ -48,7 +48,7 @@ public String name() { } /** - * Set the name value. + * Set the run command parameter name. * * @param name the name value to set * @return the RunCommandParameterDefinition object itself. @@ -59,7 +59,7 @@ public RunCommandParameterDefinition withName(String name) { } /** - * Get the type value. + * Get the run command parameter type. * * @return the type value */ @@ -68,7 +68,7 @@ public String type() { } /** - * Set the type value. + * Set the run command parameter type. * * @param type the type value to set * @return the RunCommandParameterDefinition object itself. @@ -79,7 +79,7 @@ public RunCommandParameterDefinition withType(String type) { } /** - * Get the defaultValue value. + * Get the run command parameter default value. * * @return the defaultValue value */ @@ -88,7 +88,7 @@ public String defaultValue() { } /** - * Set the defaultValue value. + * Set the run command parameter default value. * * @param defaultValue the defaultValue value to set * @return the RunCommandParameterDefinition object itself. @@ -99,7 +99,7 @@ public RunCommandParameterDefinition withDefaultValue(String defaultValue) { } /** - * Get the required value. + * Get the run command parameter required. * * @return the required value */ @@ -108,7 +108,7 @@ public Boolean required() { } /** - * Set the required value. + * Set the run command parameter required. * * @param required the required value to set * @return the RunCommandParameterDefinition object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandResult.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandResult.java new file mode 100644 index 00000000000..4e1b188fa29 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/RunCommandResult.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Run command operation response. + */ +@JsonFlatten +public class RunCommandResult { + /** + * Operation output data (raw JSON). + */ + @JsonProperty(value = "properties.output") + private Object output; + + /** + * Get operation output data (raw JSON). + * + * @return the output value + */ + public Object output() { + return this.output; + } + + /** + * Set operation output data (raw JSON). + * + * @param output the output value to set + * @return the RunCommandResult object itself. + */ + public RunCommandResult withOutput(Object output) { + this.output = output; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Sku.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Sku.java index 248ba652d28..20193f38b01 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Sku.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Sku.java @@ -35,7 +35,7 @@ public class Sku { private Long capacity; /** - * Get the name value. + * Get the sku name. * * @return the name value */ @@ -44,7 +44,7 @@ public String name() { } /** - * Set the name value. + * Set the sku name. * * @param name the name value to set * @return the Sku object itself. @@ -55,7 +55,7 @@ public Sku withName(String name) { } /** - * Get the tier value. + * Get specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**. * * @return the tier value */ @@ -64,7 +64,7 @@ public String tier() { } /** - * Set the tier value. + * Set specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**. * * @param tier the tier value to set * @return the Sku object itself. @@ -75,7 +75,7 @@ public Sku withTier(String tier) { } /** - * Get the capacity value. + * Get specifies the number of virtual machines in the scale set. * * @return the capacity value */ @@ -84,7 +84,7 @@ public Long capacity() { } /** - * Set the capacity value. + * Set specifies the number of virtual machines in the scale set. * * @param capacity the capacity value to set * @return the Sku object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotSku.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotSku.java new file mode 100644 index 00000000000..a4dc674d5d5 --- /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 sku name. Possible values include: 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS'. + * + * @return the name value + */ + public SnapshotStorageAccountTypes name() { + return this.name; + } + + /** + * Set the sku name. Possible values include: 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS'. + * + * @param name the name value to set + * @return the SnapshotSku object itself. + */ + public SnapshotSku withName(SnapshotStorageAccountTypes name) { + this.name = name; + return this; + } + + /** + * Get the sku tier. + * + * @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/SnapshotUpdate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotUpdate.java new file mode 100644 index 00000000000..985d7d24e4a --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SnapshotUpdate.java @@ -0,0 +1,154 @@ +/** + * 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.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Snapshot update resource. + */ +@JsonFlatten +public class SnapshotUpdate { + /** + * the Operating System type. Possible values include: 'Windows', 'Linux'. + */ + @JsonProperty(value = "properties.osType") + private OperatingSystemTypes osType; + + /** + * If creationData.createOption is Empty, this field is mandatory and it + * indicates the size of the VHD to create. If this field is present for + * updates or creation with other options, it indicates a resize. Resizes + * are only allowed if the disk is not attached to a running VM, and can + * only increase the disk's size. + */ + @JsonProperty(value = "properties.diskSizeGB") + private Integer diskSizeGB; + + /** + * Encryption settings for disk or snapshot. + */ + @JsonProperty(value = "properties.encryptionSettings") + private EncryptionSettings encryptionSettings; + + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The sku property. + */ + @JsonProperty(value = "sku") + private SnapshotSku sku; + + /** + * Get the Operating System type. Possible values include: 'Windows', 'Linux'. + * + * @return the osType value + */ + public OperatingSystemTypes osType() { + return this.osType; + } + + /** + * Set the Operating System type. Possible values include: 'Windows', 'Linux'. + * + * @param osType the osType value to set + * @return the SnapshotUpdate object itself. + */ + public SnapshotUpdate withOsType(OperatingSystemTypes osType) { + this.osType = osType; + return this; + } + + /** + * Get if creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. + * + * @return the diskSizeGB value + */ + public Integer diskSizeGB() { + return this.diskSizeGB; + } + + /** + * Set if creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. + * + * @param diskSizeGB the diskSizeGB value to set + * @return the SnapshotUpdate object itself. + */ + public SnapshotUpdate withDiskSizeGB(Integer diskSizeGB) { + this.diskSizeGB = diskSizeGB; + return this; + } + + /** + * Get encryption settings for disk or snapshot. + * + * @return the encryptionSettings value + */ + public EncryptionSettings encryptionSettings() { + return this.encryptionSettings; + } + + /** + * Set encryption settings for disk or snapshot. + * + * @param encryptionSettings the encryptionSettings value to set + * @return the SnapshotUpdate object itself. + */ + public SnapshotUpdate withEncryptionSettings(EncryptionSettings encryptionSettings) { + this.encryptionSettings = encryptionSettings; + return this; + } + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the SnapshotUpdate object itself. + */ + public SnapshotUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the sku value. + * + * @return the sku value + */ + public SnapshotSku sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the SnapshotUpdate object itself. + */ + public SnapshotUpdate withSku(SnapshotSku sku) { + this.sku = sku; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SourceVault.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SourceVault.java index 1b47488a9c7..833bdf8916c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SourceVault.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SourceVault.java @@ -22,7 +22,7 @@ public class SourceVault { private String id; /** - * Get the id value. + * Get resource Id. * * @return the id value */ @@ -31,7 +31,7 @@ public String id() { } /** - * Set the id value. + * Set resource Id. * * @param id the id value to set * @return the SourceVault object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SshConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SshConfiguration.java index c760d2688f6..29883925e5d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SshConfiguration.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SshConfiguration.java @@ -22,7 +22,7 @@ public class SshConfiguration { private List publicKeys; /** - * Get the publicKeys value. + * Get the list of SSH public keys used to authenticate with linux based VMs. * * @return the publicKeys value */ @@ -31,7 +31,7 @@ public List publicKeys() { } /** - * Set the publicKeys value. + * Set the list of SSH public keys used to authenticate with linux based VMs. * * @param publicKeys the publicKeys value to set * @return the SshConfiguration object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SshPublicKey.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SshPublicKey.java index 75213f2fbfe..40876d9b0ca 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SshPublicKey.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SshPublicKey.java @@ -34,7 +34,7 @@ public class SshPublicKey { private String keyData; /** - * Get the path value. + * Get specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys. * * @return the path value */ @@ -43,7 +43,7 @@ public String path() { } /** - * Set the path value. + * Set specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys. * * @param path the path value to set * @return the SshPublicKey object itself. @@ -54,7 +54,7 @@ public SshPublicKey withPath(String path) { } /** - * Get the keyData value. + * Get sSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @return the keyData value */ @@ -63,7 +63,7 @@ public String keyData() { } /** - * Set the keyData value. + * Set sSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @param keyData the keyData value to set * @return the SshPublicKey object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageAccountTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageAccountTypes.java index 5bb870970bd..0f30ca9c570 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageAccountTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageAccountTypes.java @@ -8,52 +8,34 @@ package com.microsoft.azure.management.compute; +import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for StorageAccountTypes. */ -public enum StorageAccountTypes { - /** Enum value Standard_LRS. */ - STANDARD_LRS("Standard_LRS"), +public final class StorageAccountTypes extends ExpandableStringEnum { + /** Static value Standard_LRS for StorageAccountTypes. */ + public static final StorageAccountTypes STANDARD_LRS = fromString("Standard_LRS"); - /** Enum value Premium_LRS. */ - PREMIUM_LRS("Premium_LRS"), - - /** Enum value StandardSSD_LRS. */ - STANDARD_SSD_LRS("StandardSSD_LRS"), - - /** Enum value Standard_ZRS. */ - STANDARD_ZRS("Standard_ZRS"); - - /** The actual serialized value for a StorageAccountTypes instance. */ - private String value; - - StorageAccountTypes(String value) { - this.value = value; - } + /** Static value Premium_LRS for StorageAccountTypes. */ + public static final StorageAccountTypes PREMIUM_LRS = fromString("Premium_LRS"); /** - * Parses a serialized value to a StorageAccountTypes instance. - * - * @param value the serialized value to parse. - * @return the parsed StorageAccountTypes object, or null if unable to parse. + * Creates or finds a StorageAccountTypes from its string representation. + * @param name a name to look for + * @return the corresponding StorageAccountTypes */ @JsonCreator - public static StorageAccountTypes fromString(String value) { - StorageAccountTypes[] items = StorageAccountTypes.values(); - for (StorageAccountTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static StorageAccountTypes fromString(String name) { + return fromString(name, StorageAccountTypes.class); } - @JsonValue - @Override - public String toString() { - return this.value; + /** + * @return known StorageAccountTypes values + */ + public static Collection values() { + return values(StorageAccountTypes.class); } -} \ No newline at end of file +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageProfile.java index 35b4d56e85a..0d2e1af9533 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/StorageProfile.java @@ -45,7 +45,7 @@ public class StorageProfile { private List dataDisks; /** - * Get the imageReference value. + * Get specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. * * @return the imageReference value */ @@ -54,7 +54,7 @@ public ImageReferenceInner imageReference() { } /** - * Set the imageReference value. + * Set specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. * * @param imageReference the imageReference value to set * @return the StorageProfile object itself. @@ -65,7 +65,7 @@ public StorageProfile withImageReference(ImageReferenceInner imageReference) { } /** - * Get the osDisk value. + * Get specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @return the osDisk value */ @@ -74,7 +74,7 @@ public OSDisk osDisk() { } /** - * Set the osDisk value. + * Set specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @param osDisk the osDisk value to set * @return the StorageProfile object itself. @@ -85,7 +85,7 @@ public StorageProfile withOsDisk(OSDisk osDisk) { } /** - * Get the dataDisks value. + * Get specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @return the dataDisks value */ @@ -94,7 +94,7 @@ public List dataDisks() { } /** - * Set the dataDisks value. + * Set specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @param dataDisks the dataDisks value to set * @return the StorageProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SubResourceReadOnly.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SubResourceReadOnly.java index 6220622f1b2..7e7864bed74 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SubResourceReadOnly.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/SubResourceReadOnly.java @@ -21,7 +21,7 @@ public class SubResourceReadOnly { private String id; /** - * Get the id value. + * Get resource Id. * * @return the id value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ThrottledRequestsInput.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ThrottledRequestsInput.java new file mode 100644 index 00000000000..4fa3cdc0439 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ThrottledRequestsInput.java @@ -0,0 +1,16 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + + +/** + * Api request input for LogAnalytics getThrottledRequests Api. + */ +public class ThrottledRequestsInput extends LogAnalyticsInputBase { +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpdateResource.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpdateResource.java index 17950d877ad..c8a4112c1ef 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpdateResource.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpdateResource.java @@ -22,7 +22,7 @@ public class UpdateResource { private Map tags; /** - * Get the tags value. + * Get resource tags. * * @return the tags value */ @@ -31,7 +31,7 @@ public Map tags() { } /** - * Set the tags value. + * Set resource tags. * * @param tags the tags value to set * @return the UpdateResource object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java new file mode 100644 index 00000000000..040c5a3fa5d --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.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; + +import com.microsoft.azure.management.compute.implementation.ImageReferenceInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes each OS upgrade on the Virtual Machine Scale Set. + */ +public class UpgradeOperationHistoricalStatusInfoProperties { + /** + * Information about the overall status of the upgrade operation. + */ + @JsonProperty(value = "runningStatus", access = JsonProperty.Access.WRITE_ONLY) + private UpgradeOperationHistoryStatus runningStatus; + + /** + * Counts of the VM's in each state. + */ + @JsonProperty(value = "progress", access = JsonProperty.Access.WRITE_ONLY) + private RollingUpgradeProgressInfo progress; + + /** + * Error Details for this upgrade if there are any. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private ApiError error; + + /** + * Invoker of the Upgrade Operation. Possible values include: 'Unknown', + * 'User', 'Platform'. + */ + @JsonProperty(value = "startedBy", access = JsonProperty.Access.WRITE_ONLY) + private UpgradeOperationInvoker startedBy; + + /** + * Image Reference details. + */ + @JsonProperty(value = "targetImageReference", access = JsonProperty.Access.WRITE_ONLY) + private ImageReferenceInner targetImageReference; + + /** + * Information about OS rollback if performed. + */ + @JsonProperty(value = "rollbackInfo", access = JsonProperty.Access.WRITE_ONLY) + private RollbackStatusInfo rollbackInfo; + + /** + * Get information about the overall status of the upgrade operation. + * + * @return the runningStatus value + */ + public UpgradeOperationHistoryStatus runningStatus() { + return this.runningStatus; + } + + /** + * Get counts of the VM's in each state. + * + * @return the progress value + */ + public RollingUpgradeProgressInfo progress() { + return this.progress; + } + + /** + * Get error Details for this upgrade if there are any. + * + * @return the error value + */ + public ApiError error() { + return this.error; + } + + /** + * Get invoker of the Upgrade Operation. Possible values include: 'Unknown', 'User', 'Platform'. + * + * @return the startedBy value + */ + public UpgradeOperationInvoker startedBy() { + return this.startedBy; + } + + /** + * Get image Reference details. + * + * @return the targetImageReference value + */ + public ImageReferenceInner targetImageReference() { + return this.targetImageReference; + } + + /** + * Get information about OS rollback if performed. + * + * @return the rollbackInfo value + */ + public RollbackStatusInfo rollbackInfo() { + return this.rollbackInfo; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoryStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoryStatus.java new file mode 100644 index 00000000000..e098a2e09c1 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoryStatus.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about the current running state of the overall upgrade. + */ +public class UpgradeOperationHistoryStatus { + /** + * Code indicating the current status of the upgrade. Possible values + * include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted'. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private UpgradeState code; + + /** + * Start time of the upgrade. + */ + @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startTime; + + /** + * End time of the upgrade. + */ + @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endTime; + + /** + * Get code indicating the current status of the upgrade. Possible values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted'. + * + * @return the code value + */ + public UpgradeState code() { + return this.code; + } + + /** + * Get start time of the upgrade. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Get end time of the upgrade. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationInvoker.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationInvoker.java new file mode 100644 index 00000000000..5347e60514b --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationInvoker.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for UpgradeOperationInvoker. + */ +public enum UpgradeOperationInvoker { + /** Enum value Unknown. */ + UNKNOWN("Unknown"), + + /** Enum value User. */ + USER("User"), + + /** Enum value Platform. */ + PLATFORM("Platform"); + + /** The actual serialized value for a UpgradeOperationInvoker instance. */ + private String value; + + UpgradeOperationInvoker(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a UpgradeOperationInvoker instance. + * + * @param value the serialized value to parse. + * @return the parsed UpgradeOperationInvoker object, or null if unable to parse. + */ + @JsonCreator + public static UpgradeOperationInvoker fromString(String value) { + UpgradeOperationInvoker[] items = UpgradeOperationInvoker.values(); + for (UpgradeOperationInvoker item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradePolicy.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradePolicy.java index a514197931e..97e16ae4a37 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradePolicy.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradePolicy.java @@ -41,7 +41,13 @@ public class UpgradePolicy { private Boolean automaticOSUpgrade; /** - * Get the mode value. + * Configuration parameters used for performing automatic OS Upgrade. + */ + @JsonProperty(value = "autoOSUpgradePolicy") + private AutoOSUpgradePolicy autoOSUpgradePolicy; + + /** + * Get specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time. Possible values include: 'Automatic', 'Manual', 'Rolling'. * * @return the mode value */ @@ -50,7 +56,7 @@ public UpgradeMode mode() { } /** - * Set the mode value. + * Set specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time. Possible values include: 'Automatic', 'Manual', 'Rolling'. * * @param mode the mode value to set * @return the UpgradePolicy object itself. @@ -61,7 +67,7 @@ public UpgradePolicy withMode(UpgradeMode mode) { } /** - * Get the rollingUpgradePolicy value. + * Get the configuration parameters used while performing a rolling upgrade. * * @return the rollingUpgradePolicy value */ @@ -70,7 +76,7 @@ public RollingUpgradePolicy rollingUpgradePolicy() { } /** - * Set the rollingUpgradePolicy value. + * Set the configuration parameters used while performing a rolling upgrade. * * @param rollingUpgradePolicy the rollingUpgradePolicy value to set * @return the UpgradePolicy object itself. @@ -81,7 +87,7 @@ public UpgradePolicy withRollingUpgradePolicy(RollingUpgradePolicy rollingUpgrad } /** - * Get the automaticOSUpgrade value. + * Get whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the image becomes available. * * @return the automaticOSUpgrade value */ @@ -90,7 +96,7 @@ public Boolean automaticOSUpgrade() { } /** - * Set the automaticOSUpgrade value. + * Set whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the image becomes available. * * @param automaticOSUpgrade the automaticOSUpgrade value to set * @return the UpgradePolicy object itself. @@ -100,4 +106,24 @@ public UpgradePolicy withAutomaticOSUpgrade(Boolean automaticOSUpgrade) { return this; } + /** + * Get configuration parameters used for performing automatic OS Upgrade. + * + * @return the autoOSUpgradePolicy value + */ + public AutoOSUpgradePolicy autoOSUpgradePolicy() { + return this.autoOSUpgradePolicy; + } + + /** + * Set configuration parameters used for performing automatic OS Upgrade. + * + * @param autoOSUpgradePolicy the autoOSUpgradePolicy value to set + * @return the UpgradePolicy object itself. + */ + public UpgradePolicy withAutoOSUpgradePolicy(AutoOSUpgradePolicy autoOSUpgradePolicy) { + this.autoOSUpgradePolicy = autoOSUpgradePolicy; + return this; + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeState.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeState.java new file mode 100644 index 00000000000..4c8c2239ed9 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeState.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for UpgradeState. + */ +public enum UpgradeState { + /** Enum value RollingForward. */ + ROLLING_FORWARD("RollingForward"), + + /** Enum value Cancelled. */ + CANCELLED("Cancelled"), + + /** Enum value Completed. */ + COMPLETED("Completed"), + + /** Enum value Faulted. */ + FAULTED("Faulted"); + + /** The actual serialized value for a UpgradeState instance. */ + private String value; + + UpgradeState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a UpgradeState instance. + * + * @param value the serialized value to parse. + * @return the parsed UpgradeState object, or null if unable to parse. + */ + @JsonCreator + public static UpgradeState fromString(String value) { + UpgradeState[] items = UpgradeState.values(); + for (UpgradeState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UsageName.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UsageName.java index e70e4eb272d..b01d4504d84 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UsageName.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UsageName.java @@ -27,7 +27,7 @@ public class UsageName { private String localizedValue; /** - * Get the value value. + * Get the name of the resource. * * @return the value value */ @@ -36,7 +36,7 @@ public String value() { } /** - * Set the value value. + * Set the name of the resource. * * @param value the value value to set * @return the UsageName object itself. @@ -47,7 +47,7 @@ public UsageName withValue(String value) { } /** - * Get the localizedValue value. + * Get the localized name of the resource. * * @return the localizedValue value */ @@ -56,7 +56,7 @@ public String localizedValue() { } /** - * Set the localizedValue value. + * Set the localized name of the resource. * * @param localizedValue the localizedValue value to set * @return the UsageName object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VaultCertificate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VaultCertificate.java index 52ca9c4d4e0..99105b96fbd 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VaultCertificate.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VaultCertificate.java @@ -43,7 +43,7 @@ public class VaultCertificate { private String certificateStore; /** - * Get the certificateUrl value. + * Get this is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>}. * * @return the certificateUrl value */ @@ -52,7 +52,7 @@ public String certificateUrl() { } /** - * Set the certificateUrl value. + * Set this is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>}. * * @param certificateUrl the certificateUrl value to set * @return the VaultCertificate object itself. @@ -63,7 +63,7 @@ public VaultCertificate withCertificateUrl(String certificateUrl) { } /** - * Get the certificateStore value. + * Get for Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbpring>.prv for private key. Both of these files are .pem formatted. * * @return the certificateStore value */ @@ -72,7 +72,7 @@ public String certificateStore() { } /** - * Set the certificateStore value. + * Set for Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbpring>.prv for private key. Both of these files are .pem formatted. * * @param certificateStore the certificateStore value to set * @return the VaultCertificate object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VaultSecretGroup.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VaultSecretGroup.java index ab528694c0a..3f12d7ca2a4 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VaultSecretGroup.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VaultSecretGroup.java @@ -31,7 +31,7 @@ public class VaultSecretGroup { private List vaultCertificates; /** - * Get the sourceVault value. + * Get the relative URL of the Key Vault containing all of the certificates in VaultCertificates. * * @return the sourceVault value */ @@ -40,7 +40,7 @@ public SubResource sourceVault() { } /** - * Set the sourceVault value. + * Set the relative URL of the Key Vault containing all of the certificates in VaultCertificates. * * @param sourceVault the sourceVault value to set * @return the VaultSecretGroup object itself. @@ -51,7 +51,7 @@ public VaultSecretGroup withSourceVault(SubResource sourceVault) { } /** - * Get the vaultCertificates value. + * Get the list of key vault references in SourceVault which contain certificates. * * @return the vaultCertificates value */ @@ -60,7 +60,7 @@ public List vaultCertificates() { } /** - * Set the vaultCertificates value. + * Set the list of key vault references in SourceVault which contain certificates. * * @param vaultCertificates the vaultCertificates value to set * @return the VaultSecretGroup object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualHardDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualHardDisk.java index b4cde002bf2..1f3c6b7d246 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualHardDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualHardDisk.java @@ -21,7 +21,7 @@ public class VirtualHardDisk { private String uri; /** - * Get the uri value. + * Get specifies the virtual hard disk's uri. * * @return the uri value */ @@ -30,7 +30,7 @@ public String uri() { } /** - * Set the uri value. + * Set specifies the virtual hard disk's uri. * * @param uri the uri value to set * @return the VirtualHardDisk object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineAgentInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineAgentInstanceView.java index a910f51fc87..56d76d72b40 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineAgentInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineAgentInstanceView.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.compute; import java.util.List; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -31,10 +32,10 @@ public class VirtualMachineAgentInstanceView { * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** - * Get the vmAgentVersion value. + * Get the VM Agent full version. * * @return the vmAgentVersion value */ @@ -43,7 +44,7 @@ public String vmAgentVersion() { } /** - * Set the vmAgentVersion value. + * Set the VM Agent full version. * * @param vmAgentVersion the vmAgentVersion value to set * @return the VirtualMachineAgentInstanceView object itself. @@ -54,7 +55,7 @@ public VirtualMachineAgentInstanceView withVmAgentVersion(String vmAgentVersion) } /** - * Get the extensionHandlers value. + * Get the virtual machine extension handler instance view. * * @return the extensionHandlers value */ @@ -63,7 +64,7 @@ public List extensionHandlers() { } /** - * Set the extensionHandlers value. + * Set the virtual machine extension handler instance view. * * @param extensionHandlers the extensionHandlers value to set * @return the VirtualMachineAgentInstanceView object itself. @@ -74,21 +75,21 @@ public VirtualMachineAgentInstanceView withExtensionHandlers(List statuses() { + public List statuses() { return this.statuses; } /** - * Set the statuses value. + * Set the resource status information. * * @param statuses the statuses value to set * @return the VirtualMachineAgentInstanceView object itself. */ - public VirtualMachineAgentInstanceView withStatuses(List statuses) { + public VirtualMachineAgentInstanceView withStatuses(List statuses) { this.statuses = statuses; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineCaptureParameters.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineCaptureParameters.java new file mode 100644 index 00000000000..c0b8e472a31 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineCaptureParameters.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Capture Virtual Machine parameters. + */ +public class VirtualMachineCaptureParameters { + /** + * The captured virtual hard disk's name prefix. + */ + @JsonProperty(value = "vhdPrefix", required = true) + private String vhdPrefix; + + /** + * The destination container name. + */ + @JsonProperty(value = "destinationContainerName", required = true) + private String destinationContainerName; + + /** + * Specifies whether to overwrite the destination virtual hard disk, in + * case of conflict. + */ + @JsonProperty(value = "overwriteVhds", required = true) + private boolean overwriteVhds; + + /** + * Get the captured virtual hard disk's name prefix. + * + * @return the vhdPrefix value + */ + public String vhdPrefix() { + return this.vhdPrefix; + } + + /** + * Set the captured virtual hard disk's name prefix. + * + * @param vhdPrefix the vhdPrefix value to set + * @return the VirtualMachineCaptureParameters object itself. + */ + public VirtualMachineCaptureParameters withVhdPrefix(String vhdPrefix) { + this.vhdPrefix = vhdPrefix; + return this; + } + + /** + * Get the destination container name. + * + * @return the destinationContainerName value + */ + public String destinationContainerName() { + return this.destinationContainerName; + } + + /** + * Set the destination container name. + * + * @param destinationContainerName the destinationContainerName value to set + * @return the VirtualMachineCaptureParameters object itself. + */ + public VirtualMachineCaptureParameters withDestinationContainerName(String destinationContainerName) { + this.destinationContainerName = destinationContainerName; + return this; + } + + /** + * Get specifies whether to overwrite the destination virtual hard disk, in case of conflict. + * + * @return the overwriteVhds value + */ + public boolean overwriteVhds() { + return this.overwriteVhds; + } + + /** + * Set specifies whether to overwrite the destination virtual hard disk, in case of conflict. + * + * @param overwriteVhds the overwriteVhds value to set + * @return the VirtualMachineCaptureParameters object itself. + */ + public VirtualMachineCaptureParameters withOverwriteVhds(boolean overwriteVhds) { + this.overwriteVhds = overwriteVhds; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineEvictionPolicyTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineEvictionPolicyTypes.java new file mode 100644 index 00000000000..21c3f09eeaa --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineEvictionPolicyTypes.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VirtualMachineEvictionPolicyTypes. + */ +public final class VirtualMachineEvictionPolicyTypes extends ExpandableStringEnum { + /** Static value Deallocate for VirtualMachineEvictionPolicyTypes. */ + public static final VirtualMachineEvictionPolicyTypes DEALLOCATE = fromString("Deallocate"); + + /** Static value Delete for VirtualMachineEvictionPolicyTypes. */ + public static final VirtualMachineEvictionPolicyTypes DELETE = fromString("Delete"); + + /** + * Creates or finds a VirtualMachineEvictionPolicyTypes from its string representation. + * @param name a name to look for + * @return the corresponding VirtualMachineEvictionPolicyTypes + */ + @JsonCreator + public static VirtualMachineEvictionPolicyTypes fromString(String name) { + return fromString(name, VirtualMachineEvictionPolicyTypes.class); + } + + /** + * @return known VirtualMachineEvictionPolicyTypes values + */ + public static Collection values() { + return values(VirtualMachineEvictionPolicyTypes.class); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionHandlerInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionHandlerInstanceView.java index 1623c25193b..022efb9102a 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionHandlerInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionHandlerInstanceView.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.compute; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -31,10 +32,10 @@ public class VirtualMachineExtensionHandlerInstanceView { * The extension handler status. */ @JsonProperty(value = "status") - private InstanceViewStatus status; + private InstanceViewStatusInner status; /** - * Get the type value. + * Get specifies the type of the extension; an example is "CustomScriptExtension". * * @return the type value */ @@ -43,7 +44,7 @@ public String type() { } /** - * Set the type value. + * Set specifies the type of the extension; an example is "CustomScriptExtension". * * @param type the type value to set * @return the VirtualMachineExtensionHandlerInstanceView object itself. @@ -54,7 +55,7 @@ public VirtualMachineExtensionHandlerInstanceView withType(String type) { } /** - * Get the typeHandlerVersion value. + * Get specifies the version of the script handler. * * @return the typeHandlerVersion value */ @@ -63,7 +64,7 @@ public String typeHandlerVersion() { } /** - * Set the typeHandlerVersion value. + * Set specifies the version of the script handler. * * @param typeHandlerVersion the typeHandlerVersion value to set * @return the VirtualMachineExtensionHandlerInstanceView object itself. @@ -74,21 +75,21 @@ public VirtualMachineExtensionHandlerInstanceView withTypeHandlerVersion(String } /** - * Get the status value. + * Get the extension handler status. * * @return the status value */ - public InstanceViewStatus status() { + public InstanceViewStatusInner status() { return this.status; } /** - * Set the status value. + * Set the extension handler status. * * @param status the status value to set * @return the VirtualMachineExtensionHandlerInstanceView object itself. */ - public VirtualMachineExtensionHandlerInstanceView withStatus(InstanceViewStatus status) { + public VirtualMachineExtensionHandlerInstanceView withStatus(InstanceViewStatusInner status) { this.status = status; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionInstanceView.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionInstanceView.java index 74926a3efc6..f2d570a6a4c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionInstanceView.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionInstanceView.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.compute; import java.util.List; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -38,16 +39,16 @@ public class VirtualMachineExtensionInstanceView { * The resource status information. */ @JsonProperty(value = "substatuses") - private List substatuses; + private List substatuses; /** * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** - * Get the name value. + * Get the virtual machine extension name. * * @return the name value */ @@ -56,7 +57,7 @@ public String name() { } /** - * Set the name value. + * Set the virtual machine extension name. * * @param name the name value to set * @return the VirtualMachineExtensionInstanceView object itself. @@ -67,7 +68,7 @@ public VirtualMachineExtensionInstanceView withName(String name) { } /** - * Get the type value. + * Get specifies the type of the extension; an example is "CustomScriptExtension". * * @return the type value */ @@ -76,7 +77,7 @@ public String type() { } /** - * Set the type value. + * Set specifies the type of the extension; an example is "CustomScriptExtension". * * @param type the type value to set * @return the VirtualMachineExtensionInstanceView object itself. @@ -87,7 +88,7 @@ public VirtualMachineExtensionInstanceView withType(String type) { } /** - * Get the typeHandlerVersion value. + * Get specifies the version of the script handler. * * @return the typeHandlerVersion value */ @@ -96,7 +97,7 @@ public String typeHandlerVersion() { } /** - * Set the typeHandlerVersion value. + * Set specifies the version of the script handler. * * @param typeHandlerVersion the typeHandlerVersion value to set * @return the VirtualMachineExtensionInstanceView object itself. @@ -107,41 +108,41 @@ public VirtualMachineExtensionInstanceView withTypeHandlerVersion(String typeHan } /** - * Get the substatuses value. + * Get the resource status information. * * @return the substatuses value */ - public List substatuses() { + public List substatuses() { return this.substatuses; } /** - * Set the substatuses value. + * Set the resource status information. * * @param substatuses the substatuses value to set * @return the VirtualMachineExtensionInstanceView object itself. */ - public VirtualMachineExtensionInstanceView withSubstatuses(List substatuses) { + public VirtualMachineExtensionInstanceView withSubstatuses(List substatuses) { this.substatuses = substatuses; return this; } /** - * Get the statuses value. + * Get the resource status information. * * @return the statuses value */ - public List statuses() { + public List statuses() { return this.statuses; } /** - * Set the statuses value. + * Set the resource status information. * * @param statuses the statuses value to set * @return the VirtualMachineExtensionInstanceView object itself. */ - public VirtualMachineExtensionInstanceView withStatuses(List statuses) { + public VirtualMachineExtensionInstanceView withStatuses(List statuses) { this.statuses = statuses; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionUpdate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionUpdate.java new file mode 100644 index 00000000000..4b9f6a72cd1 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionUpdate.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Describes a Virtual Machine Extension. + */ +@JsonFlatten +public class VirtualMachineExtensionUpdate extends UpdateResource { + /** + * How the extension handler should be forced to update even if the + * extension configuration has not changed. + */ + @JsonProperty(value = "properties.forceUpdateTag") + private String forceUpdateTag; + + /** + * The name of the extension handler publisher. + */ + @JsonProperty(value = "properties.publisher") + private String publisher; + + /** + * Specifies the type of the extension; an example is + * "CustomScriptExtension". + */ + @JsonProperty(value = "properties.type") + private String type; + + /** + * Specifies the version of the script handler. + */ + @JsonProperty(value = "properties.typeHandlerVersion") + private String typeHandlerVersion; + + /** + * Indicates whether the extension should use a newer minor version if one + * is available at deployment time. Once deployed, however, the extension + * will not upgrade minor versions unless redeployed, even with this + * property set to true. + */ + @JsonProperty(value = "properties.autoUpgradeMinorVersion") + private Boolean autoUpgradeMinorVersion; + + /** + * Json formatted public settings for the extension. + */ + @JsonProperty(value = "properties.settings") + private Object settings; + + /** + * The extension can contain either protectedSettings or + * protectedSettingsFromKeyVault or no protected settings at all. + */ + @JsonProperty(value = "properties.protectedSettings") + private Object protectedSettings; + + /** + * Get how the extension handler should be forced to update even if the extension configuration has not changed. + * + * @return the forceUpdateTag value + */ + public String forceUpdateTag() { + return this.forceUpdateTag; + } + + /** + * Set how the extension handler should be forced to update even if the extension configuration has not changed. + * + * @param forceUpdateTag the forceUpdateTag value to set + * @return the VirtualMachineExtensionUpdate object itself. + */ + public VirtualMachineExtensionUpdate withForceUpdateTag(String forceUpdateTag) { + this.forceUpdateTag = forceUpdateTag; + return this; + } + + /** + * Get the name of the extension handler publisher. + * + * @return the publisher value + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the name of the extension handler publisher. + * + * @param publisher the publisher value to set + * @return the VirtualMachineExtensionUpdate object itself. + */ + public VirtualMachineExtensionUpdate withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get specifies the type of the extension; an example is "CustomScriptExtension". + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set specifies the type of the extension; an example is "CustomScriptExtension". + * + * @param type the type value to set + * @return the VirtualMachineExtensionUpdate object itself. + */ + public VirtualMachineExtensionUpdate withType(String type) { + this.type = type; + return this; + } + + /** + * Get specifies the version of the script handler. + * + * @return the typeHandlerVersion value + */ + public String typeHandlerVersion() { + return this.typeHandlerVersion; + } + + /** + * Set specifies the version of the script handler. + * + * @param typeHandlerVersion the typeHandlerVersion value to set + * @return the VirtualMachineExtensionUpdate object itself. + */ + public VirtualMachineExtensionUpdate withTypeHandlerVersion(String typeHandlerVersion) { + this.typeHandlerVersion = typeHandlerVersion; + return this; + } + + /** + * Get indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + * + * @return the autoUpgradeMinorVersion value + */ + public Boolean autoUpgradeMinorVersion() { + return this.autoUpgradeMinorVersion; + } + + /** + * Set indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + * + * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set + * @return the VirtualMachineExtensionUpdate object itself. + */ + public VirtualMachineExtensionUpdate withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { + this.autoUpgradeMinorVersion = autoUpgradeMinorVersion; + return this; + } + + /** + * Get json formatted public settings for the extension. + * + * @return the settings value + */ + public Object settings() { + return this.settings; + } + + /** + * Set json formatted public settings for the extension. + * + * @param settings the settings value to set + * @return the VirtualMachineExtensionUpdate object itself. + */ + public VirtualMachineExtensionUpdate withSettings(Object settings) { + this.settings = settings; + return this; + } + + /** + * Get the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + * + * @return the protectedSettings value + */ + public Object protectedSettings() { + return this.protectedSettings; + } + + /** + * Set the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + * + * @param protectedSettings the protectedSettings value to set + * @return the VirtualMachineExtensionUpdate object itself. + */ + public VirtualMachineExtensionUpdate withProtectedSettings(Object protectedSettings) { + this.protectedSettings = protectedSettings; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineHealthStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineHealthStatus.java index 9a640f90c1b..174230ee83d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineHealthStatus.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineHealthStatus.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.compute; +import com.microsoft.azure.management.compute.implementation.InstanceViewStatusInner; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -18,14 +19,14 @@ public class VirtualMachineHealthStatus { * The health status information for the VM. */ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private InstanceViewStatus status; + private InstanceViewStatusInner status; /** - * Get the status value. + * Get the health status information for the VM. * * @return the status value */ - public InstanceViewStatus status() { + public InstanceViewStatusInner status() { return this.status; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineIdentity.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineIdentity.java index 8d734f6633a..201e6a5b06c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineIdentity.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineIdentity.java @@ -49,7 +49,7 @@ public class VirtualMachineIdentity { private List identityIds; /** - * Get the principalId value. + * Get the principal id of virtual machine identity. This property will only be provided for a system assigned identity. * * @return the principalId value */ @@ -58,7 +58,7 @@ public String principalId() { } /** - * Get the tenantId value. + * Get the tenant id associated with the virtual machine. This property will only be provided for a system assigned identity. * * @return the tenantId value */ @@ -67,7 +67,7 @@ public String tenantId() { } /** - * Get the type value. + * Get the type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. * * @return the type value */ @@ -76,7 +76,7 @@ public ResourceIdentityType type() { } /** - * Set the type value. + * Set the type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. * * @param type the type value to set * @return the VirtualMachineIdentity object itself. @@ -87,7 +87,7 @@ public VirtualMachineIdentity withType(ResourceIdentityType type) { } /** - * Get the identityIds value. + * Get the list of user identities associated with the Virtual Machine. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. * * @return the identityIds value */ @@ -96,7 +96,7 @@ public List identityIds() { } /** - * Set the identityIds value. + * Set the list of user identities associated with the Virtual Machine. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. * * @param identityIds the identityIds value to set * @return the VirtualMachineIdentity object itself. @@ -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..6ec8dde1e6b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetDataDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetDataDisk.java @@ -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'. @@ -60,7 +67,7 @@ public class VirtualMachineScaleSetDataDisk { private VirtualMachineScaleSetManagedDiskParameters managedDisk; /** - * Get the name value. + * Get the disk name. * * @return the name value */ @@ -69,7 +76,7 @@ public String name() { } /** - * Set the name value. + * Set the disk name. * * @param name the name value to set * @return the VirtualMachineScaleSetDataDisk object itself. @@ -80,7 +87,7 @@ public VirtualMachineScaleSetDataDisk withName(String name) { } /** - * Get the lun value. + * Get specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. * * @return the lun value */ @@ -89,7 +96,7 @@ public int lun() { } /** - * Set the lun value. + * Set specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. * * @param lun the lun value to set * @return the VirtualMachineScaleSetDataDisk object itself. @@ -100,7 +107,7 @@ public VirtualMachineScaleSetDataDisk withLun(int lun) { } /** - * Get the caching value. + * Get specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @return the caching value */ @@ -109,7 +116,7 @@ public CachingTypes caching() { } /** - * Set the caching value. + * Set specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @param caching the caching value to set * @return the VirtualMachineScaleSetDataDisk object itself. @@ -120,7 +127,27 @@ public VirtualMachineScaleSetDataDisk withCaching(CachingTypes caching) { } /** - * Get the createOption value. + * Get specifies whether writeAccelerator should be enabled or disabled on the disk. + * + * @return the writeAcceleratorEnabled value + */ + public Boolean writeAcceleratorEnabled() { + return this.writeAcceleratorEnabled; + } + + /** + * Set specifies whether writeAccelerator should be enabled or disabled on the disk. + * + * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set + * @return the VirtualMachineScaleSetDataDisk object itself. + */ + public VirtualMachineScaleSetDataDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) { + this.writeAcceleratorEnabled = writeAcceleratorEnabled; + return this; + } + + /** + * Get the create option. Possible values include: 'FromImage', 'Empty', 'Attach'. * * @return the createOption value */ @@ -129,7 +156,7 @@ public DiskCreateOptionTypes createOption() { } /** - * Set the createOption value. + * Set the create option. Possible values include: 'FromImage', 'Empty', 'Attach'. * * @param createOption the createOption value to set * @return the VirtualMachineScaleSetDataDisk object itself. @@ -140,7 +167,7 @@ public VirtualMachineScaleSetDataDisk withCreateOption(DiskCreateOptionTypes cre } /** - * Get the diskSizeGB value. + * Get specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @return the diskSizeGB value */ @@ -149,7 +176,7 @@ public Integer diskSizeGB() { } /** - * Set the diskSizeGB value. + * Set specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. * * @param diskSizeGB the diskSizeGB value to set * @return the VirtualMachineScaleSetDataDisk object itself. @@ -160,7 +187,7 @@ public VirtualMachineScaleSetDataDisk withDiskSizeGB(Integer diskSizeGB) { } /** - * Get the managedDisk value. + * Get the managed disk parameters. * * @return the managedDisk value */ @@ -169,7 +196,7 @@ public VirtualMachineScaleSetManagedDiskParameters managedDisk() { } /** - * Set the managedDisk value. + * Set the managed disk parameters. * * @param managedDisk the managedDisk value to set * @return the VirtualMachineScaleSetDataDisk object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetExtensionProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetExtensionProfile.java index 8eef3206af5..8282c3594ce 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetExtensionProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetExtensionProfile.java @@ -23,7 +23,7 @@ public class VirtualMachineScaleSetExtensionProfile { private List extensions; /** - * Get the extensions value. + * Get the virtual machine scale set child extension resources. * * @return the extensions value */ @@ -32,7 +32,7 @@ public List extensions() { } /** - * Set the extensions value. + * Set the virtual machine scale set child extension resources. * * @param extensions the extensions value to set * @return the VirtualMachineScaleSetExtensionProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetIdentity.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetIdentity.java index 73b7799774c..9bbb8d29542 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetIdentity.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetIdentity.java @@ -49,7 +49,7 @@ public class VirtualMachineScaleSetIdentity { private List identityIds; /** - * Get the principalId value. + * Get the principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity. * * @return the principalId value */ @@ -58,7 +58,7 @@ public String principalId() { } /** - * Get the tenantId value. + * Get the tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity. * * @return the tenantId value */ @@ -67,7 +67,7 @@ public String tenantId() { } /** - * Get the type value. + * Get the type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. * * @return the type value */ @@ -76,7 +76,7 @@ public ResourceIdentityType type() { } /** - * Set the type value. + * Set the type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. * * @param type the type value to set * @return the VirtualMachineScaleSetIdentity object itself. @@ -87,7 +87,7 @@ public VirtualMachineScaleSetIdentity withType(ResourceIdentityType type) { } /** - * Get the identityIds value. + * Get the list of user identities associated with the virtual machine scale set. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. * * @return the identityIds value */ @@ -96,7 +96,7 @@ public List identityIds() { } /** - * Set the identityIds value. + * Set the list of user identities associated with the virtual machine scale set. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. * * @param identityIds the identityIds value to set * @return the VirtualMachineScaleSetIdentity object itself. @@ -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/VirtualMachineScaleSetInstanceViewStatusesSummary.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetInstanceViewStatusesSummary.java index 3277a519652..ca07cc5bf1e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetInstanceViewStatusesSummary.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetInstanceViewStatusesSummary.java @@ -23,7 +23,7 @@ public class VirtualMachineScaleSetInstanceViewStatusesSummary { private List statusesSummary; /** - * Get the statusesSummary value. + * Get the extensions information. * * @return the statusesSummary value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetManagedDiskParameters.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetManagedDiskParameters.java index 5bf72ce6af2..944820d6050 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetManagedDiskParameters.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetManagedDiskParameters.java @@ -23,7 +23,7 @@ public class VirtualMachineScaleSetManagedDiskParameters { private StorageAccountTypes storageAccountType; /** - * Get the storageAccountType value. + * Get specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @return the storageAccountType value */ @@ -32,7 +32,7 @@ public StorageAccountTypes storageAccountType() { } /** - * Set the storageAccountType value. + * Set specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @param storageAccountType the storageAccountType value to set * @return the VirtualMachineScaleSetManagedDiskParameters object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetNetworkConfigurationDnsSettings.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetNetworkConfigurationDnsSettings.java index 3e1f067a16d..2640c7de4be 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetNetworkConfigurationDnsSettings.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetNetworkConfigurationDnsSettings.java @@ -23,7 +23,7 @@ public class VirtualMachineScaleSetNetworkConfigurationDnsSettings { private List dnsServers; /** - * Get the dnsServers value. + * Get list of DNS servers IP addresses. * * @return the dnsServers value */ @@ -32,7 +32,7 @@ public List dnsServers() { } /** - * Set the dnsServers value. + * Set list of DNS servers IP addresses. * * @param dnsServers the dnsServers value to set * @return the VirtualMachineScaleSetNetworkConfigurationDnsSettings object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetNetworkProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetNetworkProfile.java index 605bdde500d..d6c40407609 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetNetworkProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetNetworkProfile.java @@ -32,7 +32,7 @@ public class VirtualMachineScaleSetNetworkProfile { private List networkInterfaceConfigurations; /** - * Get the healthProbe value. + * Get a reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. * * @return the healthProbe value */ @@ -41,7 +41,7 @@ public ApiEntityReference healthProbe() { } /** - * Set the healthProbe value. + * Set a reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. * * @param healthProbe the healthProbe value to set * @return the VirtualMachineScaleSetNetworkProfile object itself. @@ -52,7 +52,7 @@ public VirtualMachineScaleSetNetworkProfile withHealthProbe(ApiEntityReference h } /** - * Get the networkInterfaceConfigurations value. + * Get the list of network configurations. * * @return the networkInterfaceConfigurations value */ @@ -61,7 +61,7 @@ public List networkInterfaceCon } /** - * Set the networkInterfaceConfigurations value. + * Set the list of network configurations. * * @param networkInterfaceConfigurations the networkInterfaceConfigurations value to set * @return the VirtualMachineScaleSetNetworkProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java index 5f3497e05b4..8671922827d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSDisk.java @@ -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** @@ -74,7 +81,7 @@ public class VirtualMachineScaleSetOSDisk { private VirtualMachineScaleSetManagedDiskParameters managedDisk; /** - * Get the name value. + * Get the disk name. * * @return the name value */ @@ -83,7 +90,7 @@ public String name() { } /** - * Set the name value. + * Set the disk name. * * @param name the name value to set * @return the VirtualMachineScaleSetOSDisk object itself. @@ -94,7 +101,7 @@ public VirtualMachineScaleSetOSDisk withName(String name) { } /** - * Get the caching value. + * Get specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @return the caching value */ @@ -103,7 +110,7 @@ public CachingTypes caching() { } /** - * Set the caching value. + * Set specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @param caching the caching value to set * @return the VirtualMachineScaleSetOSDisk object itself. @@ -114,7 +121,27 @@ public VirtualMachineScaleSetOSDisk withCaching(CachingTypes caching) { } /** - * Get the createOption value. + * Get specifies whether writeAccelerator should be enabled or disabled on the disk. + * + * @return the writeAcceleratorEnabled value + */ + public Boolean writeAcceleratorEnabled() { + return this.writeAcceleratorEnabled; + } + + /** + * Set specifies whether writeAccelerator should be enabled or disabled on the disk. + * + * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set + * @return the VirtualMachineScaleSetOSDisk object itself. + */ + public VirtualMachineScaleSetOSDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) { + this.writeAcceleratorEnabled = writeAcceleratorEnabled; + return this; + } + + /** + * Get specifies how the virtual machines in the scale set should be created.<br><br> The only allowed value is: **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'. * * @return the createOption value */ @@ -123,7 +150,7 @@ public DiskCreateOptionTypes createOption() { } /** - * Set the createOption value. + * Set specifies how the virtual machines in the scale set should be created.<br><br> The only allowed value is: **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'. * * @param createOption the createOption value to set * @return the VirtualMachineScaleSetOSDisk object itself. @@ -134,7 +161,7 @@ public VirtualMachineScaleSetOSDisk withCreateOption(DiskCreateOptionTypes creat } /** - * Get the osType value. + * Get this property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'. * * @return the osType value */ @@ -143,7 +170,7 @@ public OperatingSystemTypes osType() { } /** - * Set the osType value. + * Set this property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible values include: 'Windows', 'Linux'. * * @param osType the osType value to set * @return the VirtualMachineScaleSetOSDisk object itself. @@ -154,7 +181,7 @@ public VirtualMachineScaleSetOSDisk withOsType(OperatingSystemTypes osType) { } /** - * Get the image value. + * Get specifies information about the unmanaged user image to base the scale set on. * * @return the image value */ @@ -163,7 +190,7 @@ public VirtualHardDisk image() { } /** - * Set the image value. + * Set specifies information about the unmanaged user image to base the scale set on. * * @param image the image value to set * @return the VirtualMachineScaleSetOSDisk object itself. @@ -174,7 +201,7 @@ public VirtualMachineScaleSetOSDisk withImage(VirtualHardDisk image) { } /** - * Get the vhdContainers value. + * Get specifies the container urls that are used to store operating system disks for the scale set. * * @return the vhdContainers value */ @@ -183,7 +210,7 @@ public List vhdContainers() { } /** - * Set the vhdContainers value. + * Set specifies the container urls that are used to store operating system disks for the scale set. * * @param vhdContainers the vhdContainers value to set * @return the VirtualMachineScaleSetOSDisk object itself. @@ -194,7 +221,7 @@ public VirtualMachineScaleSetOSDisk withVhdContainers(List vhdContainers } /** - * Get the managedDisk value. + * Get the managed disk parameters. * * @return the managedDisk value */ @@ -203,7 +230,7 @@ public VirtualMachineScaleSetManagedDiskParameters managedDisk() { } /** - * Set the managedDisk value. + * Set the managed disk parameters. * * @param managedDisk the managedDisk value to set * @return the VirtualMachineScaleSetOSDisk object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSProfile.java index 65447a0db40..89534cd297b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetOSProfile.java @@ -102,7 +102,7 @@ public class VirtualMachineScaleSetOSProfile { private List secrets; /** - * Get the computerNamePrefix value. + * Get specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long. * * @return the computerNamePrefix value */ @@ -111,7 +111,7 @@ public String computerNamePrefix() { } /** - * Set the computerNamePrefix value. + * Set specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long. * * @param computerNamePrefix the computerNamePrefix value to set * @return the VirtualMachineScaleSetOSProfile object itself. @@ -122,7 +122,7 @@ public VirtualMachineScaleSetOSProfile withComputerNamePrefix(String computerNam } /** - * Get the adminUsername value. + * Get specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @return the adminUsername value */ @@ -131,7 +131,7 @@ public String adminUsername() { } /** - * Set the adminUsername value. + * Set specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @param adminUsername the adminUsername value to set * @return the VirtualMachineScaleSetOSProfile object itself. @@ -142,7 +142,7 @@ public VirtualMachineScaleSetOSProfile withAdminUsername(String adminUsername) { } /** - * Get the adminPassword value. + * Get specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password). * * @return the adminPassword value */ @@ -151,7 +151,7 @@ public String adminPassword() { } /** - * Set the adminPassword value. + * Set specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password). * * @param adminPassword the adminPassword value to set * @return the VirtualMachineScaleSetOSProfile object itself. @@ -162,7 +162,7 @@ public VirtualMachineScaleSetOSProfile withAdminPassword(String adminPassword) { } /** - * Get the customData value. + * Get specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @return the customData value */ @@ -171,7 +171,7 @@ public String customData() { } /** - * Set the customData value. + * Set specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @param customData the customData value to set * @return the VirtualMachineScaleSetOSProfile object itself. @@ -182,7 +182,7 @@ public VirtualMachineScaleSetOSProfile withCustomData(String customData) { } /** - * Get the windowsConfiguration value. + * Get specifies Windows operating system settings on the virtual machine. * * @return the windowsConfiguration value */ @@ -191,7 +191,7 @@ public WindowsConfiguration windowsConfiguration() { } /** - * Set the windowsConfiguration value. + * Set specifies Windows operating system settings on the virtual machine. * * @param windowsConfiguration the windowsConfiguration value to set * @return the VirtualMachineScaleSetOSProfile object itself. @@ -202,7 +202,7 @@ public VirtualMachineScaleSetOSProfile withWindowsConfiguration(WindowsConfigura } /** - * Get the linuxConfiguration value. + * Get specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @return the linuxConfiguration value */ @@ -211,7 +211,7 @@ public LinuxConfiguration linuxConfiguration() { } /** - * Set the linuxConfiguration value. + * Set specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * * @param linuxConfiguration the linuxConfiguration value to set * @return the VirtualMachineScaleSetOSProfile object itself. @@ -222,7 +222,7 @@ public VirtualMachineScaleSetOSProfile withLinuxConfiguration(LinuxConfiguration } /** - * Get the secrets value. + * Get specifies set of certificates that should be installed onto the virtual machines in the scale set. * * @return the secrets value */ @@ -231,7 +231,7 @@ public List secrets() { } /** - * Set the secrets value. + * Set specifies set of certificates that should be installed onto the virtual machines in the scale set. * * @param secrets the secrets value to set * @return the VirtualMachineScaleSetOSProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfiguration.java index 43f88625137..8254df14859 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfiguration.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfiguration.java @@ -36,7 +36,7 @@ public class VirtualMachineScaleSetPublicIPAddressConfiguration { private VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings dnsSettings; /** - * Get the name value. + * Get the publicIP address configuration name. * * @return the name value */ @@ -45,7 +45,7 @@ public String name() { } /** - * Set the name value. + * Set the publicIP address configuration name. * * @param name the name value to set * @return the VirtualMachineScaleSetPublicIPAddressConfiguration object itself. @@ -56,7 +56,7 @@ public VirtualMachineScaleSetPublicIPAddressConfiguration withName(String name) } /** - * Get the idleTimeoutInMinutes value. + * Get the idle timeout of the public IP address. * * @return the idleTimeoutInMinutes value */ @@ -65,7 +65,7 @@ public Integer idleTimeoutInMinutes() { } /** - * Set the idleTimeoutInMinutes value. + * Set the idle timeout of the public IP address. * * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set * @return the VirtualMachineScaleSetPublicIPAddressConfiguration object itself. @@ -76,7 +76,7 @@ public VirtualMachineScaleSetPublicIPAddressConfiguration withIdleTimeoutInMinut } /** - * Get the dnsSettings value. + * Get the dns settings to be applied on the publicIP addresses . * * @return the dnsSettings value */ @@ -85,7 +85,7 @@ public VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings dnsSettings } /** - * Set the dnsSettings value. + * Set the dns settings to be applied on the publicIP addresses . * * @param dnsSettings the dnsSettings value to set * @return the VirtualMachineScaleSetPublicIPAddressConfiguration object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.java index 20785ffacdd..f08b14280c1 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.java @@ -24,7 +24,7 @@ public class VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings { private String domainNameLabel; /** - * Get the domainNameLabel value. + * Get the Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources that will be created. * * @return the domainNameLabel value */ @@ -33,7 +33,7 @@ public String domainNameLabel() { } /** - * Set the domainNameLabel value. + * Set the Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources that will be created. * * @param domainNameLabel the domainNameLabel value to set * @return the VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetSkuCapacity.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetSkuCapacity.java index 21418d2c4c4..5c56f3024f5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetSkuCapacity.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetSkuCapacity.java @@ -40,7 +40,7 @@ public class VirtualMachineScaleSetSkuCapacity { private VirtualMachineScaleSetSkuScaleType scaleType; /** - * Get the minimum value. + * Get the minimum capacity. * * @return the minimum value */ @@ -49,7 +49,7 @@ public Long minimum() { } /** - * Get the maximum value. + * Get the maximum capacity that can be set. * * @return the maximum value */ @@ -58,7 +58,7 @@ public Long maximum() { } /** - * Get the defaultCapacity value. + * Get the default capacity. * * @return the defaultCapacity value */ @@ -67,7 +67,7 @@ public Long defaultCapacity() { } /** - * Get the scaleType value. + * Get the scale type applicable to the sku. Possible values include: 'Automatic', 'None'. * * @return the scaleType value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetStorageProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetStorageProfile.java index 70ea86fb48b..692352de817 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetStorageProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetStorageProfile.java @@ -45,7 +45,7 @@ public class VirtualMachineScaleSetStorageProfile { private List dataDisks; /** - * Get the imageReference value. + * Get specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. * * @return the imageReference value */ @@ -54,7 +54,7 @@ public ImageReferenceInner imageReference() { } /** - * Set the imageReference value. + * Set specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. * * @param imageReference the imageReference value to set * @return the VirtualMachineScaleSetStorageProfile object itself. @@ -65,7 +65,7 @@ public VirtualMachineScaleSetStorageProfile withImageReference(ImageReferenceInn } /** - * Get the osDisk value. + * Get specifies information about the operating system disk used by the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @return the osDisk value */ @@ -74,7 +74,7 @@ public VirtualMachineScaleSetOSDisk osDisk() { } /** - * Set the osDisk value. + * Set specifies information about the operating system disk used by the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @param osDisk the osDisk value to set * @return the VirtualMachineScaleSetStorageProfile object itself. @@ -85,7 +85,7 @@ public VirtualMachineScaleSetStorageProfile withOsDisk(VirtualMachineScaleSetOSD } /** - * Get the dataDisks value. + * Get specifies the parameters that are used to add data disks to the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @return the dataDisks value */ @@ -94,7 +94,7 @@ public List dataDisks() { } /** - * Set the dataDisks value. + * Set specifies the parameters that are used to add data disks to the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * * @param dataDisks the dataDisks value to set * @return the VirtualMachineScaleSetStorageProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdate.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdate.java new file mode 100644 index 00000000000..883e35c5229 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdate.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Describes a Virtual Machine Scale Set. + */ +@JsonFlatten +public class VirtualMachineScaleSetUpdate extends UpdateResource { + /** + * The virtual machine scale set sku. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * The purchase plan when deploying a virtual machine scale set from VM + * Marketplace images. + */ + @JsonProperty(value = "plan") + private Plan plan; + + /** + * The upgrade policy. + */ + @JsonProperty(value = "properties.upgradePolicy") + private UpgradePolicy upgradePolicy; + + /** + * The virtual machine profile. + */ + @JsonProperty(value = "properties.virtualMachineProfile") + private VirtualMachineScaleSetUpdateVMProfile virtualMachineProfile; + + /** + * Specifies whether the Virtual Machine Scale Set should be + * overprovisioned. + */ + @JsonProperty(value = "properties.overprovision") + private Boolean overprovision; + + /** + * When true this limits the scale set to a single placement group, of max + * size 100 virtual machines. + */ + @JsonProperty(value = "properties.singlePlacementGroup") + private Boolean singlePlacementGroup; + + /** + * The identity of the virtual machine scale set, if configured. + */ + @JsonProperty(value = "identity") + private VirtualMachineScaleSetIdentity identity; + + /** + * Get the virtual machine scale set sku. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the virtual machine scale set sku. + * + * @param sku the sku value to set + * @return the VirtualMachineScaleSetUpdate object itself. + */ + public VirtualMachineScaleSetUpdate withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the purchase plan when deploying a virtual machine scale set from VM Marketplace images. + * + * @return the plan value + */ + public Plan plan() { + return this.plan; + } + + /** + * Set the purchase plan when deploying a virtual machine scale set from VM Marketplace images. + * + * @param plan the plan value to set + * @return the VirtualMachineScaleSetUpdate object itself. + */ + public VirtualMachineScaleSetUpdate withPlan(Plan plan) { + this.plan = plan; + return this; + } + + /** + * Get the upgrade policy. + * + * @return the upgradePolicy value + */ + public UpgradePolicy upgradePolicy() { + return this.upgradePolicy; + } + + /** + * Set the upgrade policy. + * + * @param upgradePolicy the upgradePolicy value to set + * @return the VirtualMachineScaleSetUpdate object itself. + */ + public VirtualMachineScaleSetUpdate withUpgradePolicy(UpgradePolicy upgradePolicy) { + this.upgradePolicy = upgradePolicy; + return this; + } + + /** + * Get the virtual machine profile. + * + * @return the virtualMachineProfile value + */ + public VirtualMachineScaleSetUpdateVMProfile virtualMachineProfile() { + return this.virtualMachineProfile; + } + + /** + * Set the virtual machine profile. + * + * @param virtualMachineProfile the virtualMachineProfile value to set + * @return the VirtualMachineScaleSetUpdate object itself. + */ + public VirtualMachineScaleSetUpdate withVirtualMachineProfile(VirtualMachineScaleSetUpdateVMProfile virtualMachineProfile) { + this.virtualMachineProfile = virtualMachineProfile; + return this; + } + + /** + * Get specifies whether the Virtual Machine Scale Set should be overprovisioned. + * + * @return the overprovision value + */ + public Boolean overprovision() { + return this.overprovision; + } + + /** + * Set specifies whether the Virtual Machine Scale Set should be overprovisioned. + * + * @param overprovision the overprovision value to set + * @return the VirtualMachineScaleSetUpdate object itself. + */ + public VirtualMachineScaleSetUpdate withOverprovision(Boolean overprovision) { + this.overprovision = overprovision; + return this; + } + + /** + * Get when true this limits the scale set to a single placement group, of max size 100 virtual machines. + * + * @return the singlePlacementGroup value + */ + public Boolean singlePlacementGroup() { + return this.singlePlacementGroup; + } + + /** + * Set when true this limits the scale set to a single placement group, of max size 100 virtual machines. + * + * @param singlePlacementGroup the singlePlacementGroup value to set + * @return the VirtualMachineScaleSetUpdate object itself. + */ + public VirtualMachineScaleSetUpdate withSinglePlacementGroup(Boolean singlePlacementGroup) { + this.singlePlacementGroup = singlePlacementGroup; + return this; + } + + /** + * Get the identity of the virtual machine scale set, if configured. + * + * @return the identity value + */ + public VirtualMachineScaleSetIdentity identity() { + return this.identity; + } + + /** + * Set the identity of the virtual machine scale set, if configured. + * + * @param identity the identity value to set + * @return the VirtualMachineScaleSetUpdate object itself. + */ + public VirtualMachineScaleSetUpdate withIdentity(VirtualMachineScaleSetIdentity identity) { + this.identity = identity; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateNetworkProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateNetworkProfile.java index 89c70b933da..52a0588a023 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateNetworkProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateNetworkProfile.java @@ -23,7 +23,7 @@ public class VirtualMachineScaleSetUpdateNetworkProfile { private List networkInterfaceConfigurations; /** - * Get the networkInterfaceConfigurations value. + * Get the list of network configurations. * * @return the networkInterfaceConfigurations value */ @@ -32,7 +32,7 @@ public List networkInterf } /** - * Set the networkInterfaceConfigurations value. + * Set the list of network configurations. * * @param networkInterfaceConfigurations the networkInterfaceConfigurations value to set * @return the VirtualMachineScaleSetUpdateNetworkProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSDisk.java index b0cad4662c1..d7582a3f5f7 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSDisk.java @@ -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 @@ -44,7 +51,7 @@ public class VirtualMachineScaleSetUpdateOSDisk { private VirtualMachineScaleSetManagedDiskParameters managedDisk; /** - * Get the caching value. + * Get the caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @return the caching value */ @@ -53,7 +60,7 @@ public CachingTypes caching() { } /** - * Set the caching value. + * Set the caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. * * @param caching the caching value to set * @return the VirtualMachineScaleSetUpdateOSDisk object itself. @@ -64,7 +71,27 @@ public VirtualMachineScaleSetUpdateOSDisk withCaching(CachingTypes caching) { } /** - * Get the image value. + * Get specifies whether writeAccelerator should be enabled or disabled on the disk. + * + * @return the writeAcceleratorEnabled value + */ + public Boolean writeAcceleratorEnabled() { + return this.writeAcceleratorEnabled; + } + + /** + * Set specifies whether writeAccelerator should be enabled or disabled on the disk. + * + * @param writeAcceleratorEnabled the writeAcceleratorEnabled value to set + * @return the VirtualMachineScaleSetUpdateOSDisk object itself. + */ + public VirtualMachineScaleSetUpdateOSDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) { + this.writeAcceleratorEnabled = writeAcceleratorEnabled; + return this; + } + + /** + * Get the Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk should not exist. * * @return the image value */ @@ -73,7 +100,7 @@ public VirtualHardDisk image() { } /** - * Set the image value. + * Set the Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk should not exist. * * @param image the image value to set * @return the VirtualMachineScaleSetUpdateOSDisk object itself. @@ -84,7 +111,7 @@ public VirtualMachineScaleSetUpdateOSDisk withImage(VirtualHardDisk image) { } /** - * Get the vhdContainers value. + * Get the list of virtual hard disk container uris. * * @return the vhdContainers value */ @@ -93,7 +120,7 @@ public List vhdContainers() { } /** - * Set the vhdContainers value. + * Set the list of virtual hard disk container uris. * * @param vhdContainers the vhdContainers value to set * @return the VirtualMachineScaleSetUpdateOSDisk object itself. @@ -104,7 +131,7 @@ public VirtualMachineScaleSetUpdateOSDisk withVhdContainers(List vhdCont } /** - * Get the managedDisk value. + * Get the managed disk parameters. * * @return the managedDisk value */ @@ -113,7 +140,7 @@ public VirtualMachineScaleSetManagedDiskParameters managedDisk() { } /** - * Set the managedDisk value. + * Set the managed disk parameters. * * @param managedDisk the managedDisk value to set * @return the VirtualMachineScaleSetUpdateOSDisk object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSProfile.java index dcee27e6610..5610312d07a 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateOSProfile.java @@ -40,7 +40,7 @@ public class VirtualMachineScaleSetUpdateOSProfile { private List secrets; /** - * Get the customData value. + * Get a base-64 encoded string of custom data. * * @return the customData value */ @@ -49,7 +49,7 @@ public String customData() { } /** - * Set the customData value. + * Set a base-64 encoded string of custom data. * * @param customData the customData value to set * @return the VirtualMachineScaleSetUpdateOSProfile object itself. @@ -60,7 +60,7 @@ public VirtualMachineScaleSetUpdateOSProfile withCustomData(String customData) { } /** - * Get the windowsConfiguration value. + * Get the Windows Configuration of the OS profile. * * @return the windowsConfiguration value */ @@ -69,7 +69,7 @@ public WindowsConfiguration windowsConfiguration() { } /** - * Set the windowsConfiguration value. + * Set the Windows Configuration of the OS profile. * * @param windowsConfiguration the windowsConfiguration value to set * @return the VirtualMachineScaleSetUpdateOSProfile object itself. @@ -80,7 +80,7 @@ public VirtualMachineScaleSetUpdateOSProfile withWindowsConfiguration(WindowsCon } /** - * Get the linuxConfiguration value. + * Get the Linux Configuration of the OS profile. * * @return the linuxConfiguration value */ @@ -89,7 +89,7 @@ public LinuxConfiguration linuxConfiguration() { } /** - * Set the linuxConfiguration value. + * Set the Linux Configuration of the OS profile. * * @param linuxConfiguration the linuxConfiguration value to set * @return the VirtualMachineScaleSetUpdateOSProfile object itself. @@ -100,7 +100,7 @@ public VirtualMachineScaleSetUpdateOSProfile withLinuxConfiguration(LinuxConfigu } /** - * Get the secrets value. + * Get the List of certificates for addition to the VM. * * @return the secrets value */ @@ -109,7 +109,7 @@ public List secrets() { } /** - * Set the secrets value. + * Set the List of certificates for addition to the VM. * * @param secrets the secrets value to set * @return the VirtualMachineScaleSetUpdateOSProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.java index e8648f0dc10..073616e978c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.java @@ -36,7 +36,7 @@ public class VirtualMachineScaleSetUpdatePublicIPAddressConfiguration { private VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings dnsSettings; /** - * Get the name value. + * Get the publicIP address configuration name. * * @return the name value */ @@ -45,7 +45,7 @@ public String name() { } /** - * Set the name value. + * Set the publicIP address configuration name. * * @param name the name value to set * @return the VirtualMachineScaleSetUpdatePublicIPAddressConfiguration object itself. @@ -56,7 +56,7 @@ public VirtualMachineScaleSetUpdatePublicIPAddressConfiguration withName(String } /** - * Get the idleTimeoutInMinutes value. + * Get the idle timeout of the public IP address. * * @return the idleTimeoutInMinutes value */ @@ -65,7 +65,7 @@ public Integer idleTimeoutInMinutes() { } /** - * Set the idleTimeoutInMinutes value. + * Set the idle timeout of the public IP address. * * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set * @return the VirtualMachineScaleSetUpdatePublicIPAddressConfiguration object itself. @@ -76,7 +76,7 @@ public VirtualMachineScaleSetUpdatePublicIPAddressConfiguration withIdleTimeoutI } /** - * Get the dnsSettings value. + * Get the dns settings to be applied on the publicIP addresses . * * @return the dnsSettings value */ @@ -85,7 +85,7 @@ public VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings dnsSettings } /** - * Set the dnsSettings value. + * Set the dns settings to be applied on the publicIP addresses . * * @param dnsSettings the dnsSettings value to set * @return the VirtualMachineScaleSetUpdatePublicIPAddressConfiguration object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateStorageProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateStorageProfile.java index cb0f3dca337..97d8f9ee884 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateStorageProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateStorageProfile.java @@ -35,7 +35,7 @@ public class VirtualMachineScaleSetUpdateStorageProfile { private List dataDisks; /** - * Get the imageReference value. + * Get the image reference. * * @return the imageReference value */ @@ -44,7 +44,7 @@ public ImageReferenceInner imageReference() { } /** - * Set the imageReference value. + * Set the image reference. * * @param imageReference the imageReference value to set * @return the VirtualMachineScaleSetUpdateStorageProfile object itself. @@ -55,7 +55,7 @@ public VirtualMachineScaleSetUpdateStorageProfile withImageReference(ImageRefere } /** - * Get the osDisk value. + * Get the OS disk. * * @return the osDisk value */ @@ -64,7 +64,7 @@ public VirtualMachineScaleSetUpdateOSDisk osDisk() { } /** - * Set the osDisk value. + * Set the OS disk. * * @param osDisk the osDisk value to set * @return the VirtualMachineScaleSetUpdateStorageProfile object itself. @@ -75,7 +75,7 @@ public VirtualMachineScaleSetUpdateStorageProfile withOsDisk(VirtualMachineScale } /** - * Get the dataDisks value. + * Get the data disks. * * @return the dataDisks value */ @@ -84,7 +84,7 @@ public List dataDisks() { } /** - * Set the dataDisks value. + * Set the data disks. * * @param dataDisks the dataDisks value to set * @return the VirtualMachineScaleSetUpdateStorageProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateVMProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateVMProfile.java index 007b699a094..3a2911c9323 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateVMProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetUpdateVMProfile.java @@ -51,7 +51,7 @@ public class VirtualMachineScaleSetUpdateVMProfile { private String licenseType; /** - * Get the osProfile value. + * Get the virtual machine scale set OS profile. * * @return the osProfile value */ @@ -60,7 +60,7 @@ public VirtualMachineScaleSetUpdateOSProfile osProfile() { } /** - * Set the osProfile value. + * Set the virtual machine scale set OS profile. * * @param osProfile the osProfile value to set * @return the VirtualMachineScaleSetUpdateVMProfile object itself. @@ -71,7 +71,7 @@ public VirtualMachineScaleSetUpdateVMProfile withOsProfile(VirtualMachineScaleSe } /** - * Get the storageProfile value. + * Get the virtual machine scale set storage profile. * * @return the storageProfile value */ @@ -80,7 +80,7 @@ public VirtualMachineScaleSetUpdateStorageProfile storageProfile() { } /** - * Set the storageProfile value. + * Set the virtual machine scale set storage profile. * * @param storageProfile the storageProfile value to set * @return the VirtualMachineScaleSetUpdateVMProfile object itself. @@ -91,7 +91,7 @@ public VirtualMachineScaleSetUpdateVMProfile withStorageProfile(VirtualMachineSc } /** - * Get the networkProfile value. + * Get the virtual machine scale set network profile. * * @return the networkProfile value */ @@ -100,7 +100,7 @@ public VirtualMachineScaleSetUpdateNetworkProfile networkProfile() { } /** - * Set the networkProfile value. + * Set the virtual machine scale set network profile. * * @param networkProfile the networkProfile value to set * @return the VirtualMachineScaleSetUpdateVMProfile object itself. @@ -111,7 +111,7 @@ public VirtualMachineScaleSetUpdateVMProfile withNetworkProfile(VirtualMachineSc } /** - * Get the diagnosticsProfile value. + * Get the virtual machine scale set diagnostics profile. * * @return the diagnosticsProfile value */ @@ -120,7 +120,7 @@ public DiagnosticsProfile diagnosticsProfile() { } /** - * Set the diagnosticsProfile value. + * Set the virtual machine scale set diagnostics profile. * * @param diagnosticsProfile the diagnosticsProfile value to set * @return the VirtualMachineScaleSetUpdateVMProfile object itself. @@ -131,7 +131,7 @@ public VirtualMachineScaleSetUpdateVMProfile withDiagnosticsProfile(DiagnosticsP } /** - * Get the extensionProfile value. + * Get the virtual machine scale set extension profile. * * @return the extensionProfile value */ @@ -140,7 +140,7 @@ public VirtualMachineScaleSetExtensionProfile extensionProfile() { } /** - * Set the extensionProfile value. + * Set the virtual machine scale set extension profile. * * @param extensionProfile the extensionProfile value to set * @return the VirtualMachineScaleSetUpdateVMProfile object itself. @@ -151,7 +151,7 @@ public VirtualMachineScaleSetUpdateVMProfile withExtensionProfile(VirtualMachine } /** - * Get the licenseType value. + * Get the license type, which is for bring your own license scenario. * * @return the licenseType value */ @@ -160,7 +160,7 @@ public String licenseType() { } /** - * Set the licenseType value. + * Set the license type, which is for bring your own license scenario. * * @param licenseType the licenseType value to set * @return the VirtualMachineScaleSetUpdateVMProfile object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMExtensionsSummary.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMExtensionsSummary.java index 7622465c834..32cb2bc3028 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMExtensionsSummary.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMExtensionsSummary.java @@ -28,7 +28,7 @@ public class VirtualMachineScaleSetVMExtensionsSummary { private List statusesSummary; /** - * Get the name value. + * Get the extension name. * * @return the name value */ @@ -37,7 +37,7 @@ public String name() { } /** - * Get the statusesSummary value. + * Get the extensions information. * * @return the statusesSummary value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMInstanceIDs.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMInstanceIDs.java index 74a02bc0332..bdaa7933a82 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMInstanceIDs.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMInstanceIDs.java @@ -24,7 +24,7 @@ public class VirtualMachineScaleSetVMInstanceIDs { private List instanceIds; /** - * Get the instanceIds value. + * Get the virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * * @return the instanceIds value */ @@ -33,7 +33,7 @@ public List instanceIds() { } /** - * Set the instanceIds value. + * Set the virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * * @param instanceIds the instanceIds value to set * @return the VirtualMachineScaleSetVMInstanceIDs object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMInstanceRequiredIDs.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMInstanceRequiredIDs.java index 0ca421ce76b..c32c45d0be1 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMInstanceRequiredIDs.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMInstanceRequiredIDs.java @@ -22,7 +22,7 @@ public class VirtualMachineScaleSetVMInstanceRequiredIDs { private List instanceIds; /** - * Get the instanceIds value. + * Get the virtual machine scale set instance ids. * * @return the instanceIds value */ @@ -31,7 +31,7 @@ public List instanceIds() { } /** - * Set the instanceIds value. + * Set the virtual machine scale set instance ids. * * @param instanceIds the instanceIds value to set * @return the VirtualMachineScaleSetVMInstanceRequiredIDs object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java index 51b0c4f5371..c874432d836 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java @@ -64,7 +64,23 @@ public class VirtualMachineScaleSetVMProfile { private String licenseType; /** - * Get the osProfile value. + * 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; + + /** + * Specifies the eviction policy for virtual machines in a low priority + * scale set. <br><br>Minimum api-version: 2017-10-30-preview. + * Possible values include: 'Deallocate', 'Delete'. + */ + @JsonProperty(value = "evictionPolicy") + private VirtualMachineEvictionPolicyTypes evictionPolicy; + + /** + * Get specifies the operating system settings for the virtual machines in the scale set. * * @return the osProfile value */ @@ -73,7 +89,7 @@ public VirtualMachineScaleSetOSProfile osProfile() { } /** - * Set the osProfile value. + * Set specifies the operating system settings for the virtual machines in the scale set. * * @param osProfile the osProfile value to set * @return the VirtualMachineScaleSetVMProfile object itself. @@ -84,7 +100,7 @@ public VirtualMachineScaleSetVMProfile withOsProfile(VirtualMachineScaleSetOSPro } /** - * Get the storageProfile value. + * Get specifies the storage settings for the virtual machine disks. * * @return the storageProfile value */ @@ -93,7 +109,7 @@ public VirtualMachineScaleSetStorageProfile storageProfile() { } /** - * Set the storageProfile value. + * Set specifies the storage settings for the virtual machine disks. * * @param storageProfile the storageProfile value to set * @return the VirtualMachineScaleSetVMProfile object itself. @@ -104,7 +120,7 @@ public VirtualMachineScaleSetVMProfile withStorageProfile(VirtualMachineScaleSet } /** - * Get the networkProfile value. + * Get specifies properties of the network interfaces of the virtual machines in the scale set. * * @return the networkProfile value */ @@ -113,7 +129,7 @@ public VirtualMachineScaleSetNetworkProfile networkProfile() { } /** - * Set the networkProfile value. + * Set specifies properties of the network interfaces of the virtual machines in the scale set. * * @param networkProfile the networkProfile value to set * @return the VirtualMachineScaleSetVMProfile object itself. @@ -124,7 +140,7 @@ public VirtualMachineScaleSetVMProfile withNetworkProfile(VirtualMachineScaleSet } /** - * Get the diagnosticsProfile value. + * Get specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. * * @return the diagnosticsProfile value */ @@ -133,7 +149,7 @@ public DiagnosticsProfile diagnosticsProfile() { } /** - * Set the diagnosticsProfile value. + * Set specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. * * @param diagnosticsProfile the diagnosticsProfile value to set * @return the VirtualMachineScaleSetVMProfile object itself. @@ -144,7 +160,7 @@ public VirtualMachineScaleSetVMProfile withDiagnosticsProfile(DiagnosticsProfile } /** - * Get the extensionProfile value. + * Get specifies a collection of settings for extensions installed on virtual machines in the scale set. * * @return the extensionProfile value */ @@ -153,7 +169,7 @@ public VirtualMachineScaleSetExtensionProfile extensionProfile() { } /** - * Set the extensionProfile value. + * Set specifies a collection of settings for extensions installed on virtual machines in the scale set. * * @param extensionProfile the extensionProfile value to set * @return the VirtualMachineScaleSetVMProfile object itself. @@ -164,7 +180,7 @@ public VirtualMachineScaleSetVMProfile withExtensionProfile(VirtualMachineScaleS } /** - * Get the licenseType value. + * Get specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15. * * @return the licenseType value */ @@ -173,7 +189,7 @@ public String licenseType() { } /** - * Set the licenseType value. + * Set specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15. * * @param licenseType the licenseType value to set * @return the VirtualMachineScaleSetVMProfile object itself. @@ -183,4 +199,44 @@ public VirtualMachineScaleSetVMProfile withLicenseType(String licenseType) { return this; } + /** + * Get specifies the priority for the virtual machines in the scale set. <br><br>Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low'. + * + * @return the priority value + */ + public VirtualMachinePriorityTypes priority() { + return this.priority; + } + + /** + * Set specifies the priority for the virtual machines in the scale set. <br><br>Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low'. + * + * @param priority the priority value to set + * @return the VirtualMachineScaleSetVMProfile object itself. + */ + public VirtualMachineScaleSetVMProfile withPriority(VirtualMachinePriorityTypes priority) { + this.priority = priority; + return this; + } + + /** + * Get specifies the eviction policy for virtual machines in a low priority scale set. <br><br>Minimum api-version: 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'. + * + * @return the evictionPolicy value + */ + public VirtualMachineEvictionPolicyTypes evictionPolicy() { + return this.evictionPolicy; + } + + /** + * Set specifies the eviction policy for virtual machines in a low priority scale set. <br><br>Minimum api-version: 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'. + * + * @param evictionPolicy the evictionPolicy value to set + * @return the VirtualMachineScaleSetVMProfile object itself. + */ + public VirtualMachineScaleSetVMProfile withEvictionPolicy(VirtualMachineEvictionPolicyTypes evictionPolicy) { + this.evictionPolicy = evictionPolicy; + 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 zones; + + /** + * Get specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. + * + * @return the plan value + */ + public Plan plan() { + return this.plan; + } + + /** + * Set specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. + * + * @param plan the plan value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withPlan(Plan plan) { + this.plan = plan; + return this; + } + + /** + * Get specifies the hardware settings for the virtual machine. + * + * @return the hardwareProfile value + */ + public HardwareProfile hardwareProfile() { + return this.hardwareProfile; + } + + /** + * Set specifies the hardware settings for the virtual machine. + * + * @param hardwareProfile the hardwareProfile value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withHardwareProfile(HardwareProfile hardwareProfile) { + this.hardwareProfile = hardwareProfile; + return this; + } + + /** + * Get specifies the storage settings for the virtual machine disks. + * + * @return the storageProfile value + */ + public StorageProfile storageProfile() { + return this.storageProfile; + } + + /** + * Set specifies the storage settings for the virtual machine disks. + * + * @param storageProfile the storageProfile value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withStorageProfile(StorageProfile storageProfile) { + this.storageProfile = storageProfile; + return this; + } + + /** + * Get specifies the operating system settings for the virtual machine. + * + * @return the osProfile value + */ + public OSProfile osProfile() { + return this.osProfile; + } + + /** + * Set specifies the operating system settings for the virtual machine. + * + * @param osProfile the osProfile value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withOsProfile(OSProfile osProfile) { + this.osProfile = osProfile; + return this; + } + + /** + * Get specifies the network interfaces of the virtual machine. + * + * @return the networkProfile value + */ + public NetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Set specifies the network interfaces of the virtual machine. + * + * @param networkProfile the networkProfile value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withNetworkProfile(NetworkProfile networkProfile) { + this.networkProfile = networkProfile; + return this; + } + + /** + * Get specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. + * + * @return the diagnosticsProfile value + */ + public DiagnosticsProfile diagnosticsProfile() { + return this.diagnosticsProfile; + } + + /** + * Set specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. + * + * @param diagnosticsProfile the diagnosticsProfile value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withDiagnosticsProfile(DiagnosticsProfile diagnosticsProfile) { + this.diagnosticsProfile = diagnosticsProfile; + return this; + } + + /** + * Get specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintainance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. + * + * @return the availabilitySet value + */ + public SubResource availabilitySet() { + return this.availabilitySet; + } + + /** + * Set specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintainance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. + * + * @param availabilitySet the availabilitySet value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withAvailabilitySet(SubResource availabilitySet) { + this.availabilitySet = availabilitySet; + return this; + } + + /** + * Get the provisioning state, which only appears in the response. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the virtual machine instance view. + * + * @return the instanceView value + */ + public VirtualMachineInstanceViewInner instanceView() { + return this.instanceView; + } + + /** + * Get specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15. + * + * @return the licenseType value + */ + public String licenseType() { + return this.licenseType; + } + + /** + * Set specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15. + * + * @param licenseType the licenseType value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withLicenseType(String licenseType) { + this.licenseType = licenseType; + return this; + } + + /** + * Get specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands. + * + * @return the vmId value + */ + public String vmId() { + return this.vmId; + } + + /** + * Get the identity of the virtual machine, if configured. + * + * @return the identity value + */ + public VirtualMachineIdentity identity() { + return this.identity; + } + + /** + * Set the identity of the virtual machine, if configured. + * + * @param identity the identity value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withIdentity(VirtualMachineIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the virtual machine zones. + * + * @return the zones value + */ + public List zones() { + return this.zones; + } + + /** + * Set the virtual machine zones. + * + * @param zones the zones value to set + * @return the VirtualMachineUpdate object itself. + */ + public VirtualMachineUpdate withZones(List zones) { + this.zones = zones; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WinRMConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WinRMConfiguration.java index f3ea05a5f3f..8ad0917a52b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WinRMConfiguration.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WinRMConfiguration.java @@ -22,7 +22,7 @@ public class WinRMConfiguration { private List listeners; /** - * Get the listeners value. + * Get the list of Windows Remote Management listeners. * * @return the listeners value */ @@ -31,7 +31,7 @@ public List listeners() { } /** - * Set the listeners value. + * Set the list of Windows Remote Management listeners. * * @param listeners the listeners value to set * @return the WinRMConfiguration object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WinRMListener.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WinRMListener.java index 0a68b81ac17..98f6aa49ff0 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WinRMListener.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WinRMListener.java @@ -38,7 +38,7 @@ public class WinRMListener { private String certificateUrl; /** - * Get the protocol value. + * Get specifies the protocol of listener. <br><br> Possible values are: <br>**http** <br><br> **https**. Possible values include: 'Http', 'Https'. * * @return the protocol value */ @@ -47,7 +47,7 @@ public ProtocolTypes protocol() { } /** - * Set the protocol value. + * Set specifies the protocol of listener. <br><br> Possible values are: <br>**http** <br><br> **https**. Possible values include: 'Http', 'Https'. * * @param protocol the protocol value to set * @return the WinRMListener object itself. @@ -58,7 +58,7 @@ public WinRMListener withProtocol(ProtocolTypes protocol) { } /** - * Get the certificateUrl value. + * Get this is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>}. * * @return the certificateUrl value */ @@ -67,7 +67,7 @@ public String certificateUrl() { } /** - * Set the certificateUrl value. + * Set this is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>}. * * @param certificateUrl the certificateUrl value to set * @return the WinRMListener object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WindowsConfiguration.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WindowsConfiguration.java index eedd3449b0e..d72f07811ee 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WindowsConfiguration.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/WindowsConfiguration.java @@ -53,7 +53,7 @@ public class WindowsConfiguration { private WinRMConfiguration winRM; /** - * Get the provisionVMAgent value. + * Get indicates whether virtual machine agent should be provisioned on the virtual machine. <br><br> When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. * * @return the provisionVMAgent value */ @@ -62,7 +62,7 @@ public Boolean provisionVMAgent() { } /** - * Set the provisionVMAgent value. + * Set indicates whether virtual machine agent should be provisioned on the virtual machine. <br><br> When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. * * @param provisionVMAgent the provisionVMAgent value to set * @return the WindowsConfiguration object itself. @@ -73,7 +73,7 @@ public WindowsConfiguration withProvisionVMAgent(Boolean provisionVMAgent) { } /** - * Get the enableAutomaticUpdates value. + * Get indicates whether virtual machine is enabled for automatic updates. * * @return the enableAutomaticUpdates value */ @@ -82,7 +82,7 @@ public Boolean enableAutomaticUpdates() { } /** - * Set the enableAutomaticUpdates value. + * Set indicates whether virtual machine is enabled for automatic updates. * * @param enableAutomaticUpdates the enableAutomaticUpdates value to set * @return the WindowsConfiguration object itself. @@ -93,7 +93,7 @@ public WindowsConfiguration withEnableAutomaticUpdates(Boolean enableAutomaticUp } /** - * Get the timeZone value. + * Get specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". * * @return the timeZone value */ @@ -102,7 +102,7 @@ public String timeZone() { } /** - * Set the timeZone value. + * Set specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". * * @param timeZone the timeZone value to set * @return the WindowsConfiguration object itself. @@ -113,7 +113,7 @@ public WindowsConfiguration withTimeZone(String timeZone) { } /** - * Get the additionalUnattendContent value. + * Get specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. * * @return the additionalUnattendContent value */ @@ -122,7 +122,7 @@ public List additionalUnattendContent() { } /** - * Set the additionalUnattendContent value. + * Set specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. * * @param additionalUnattendContent the additionalUnattendContent value to set * @return the WindowsConfiguration object itself. @@ -133,7 +133,7 @@ public WindowsConfiguration withAdditionalUnattendContent(List statuses; + private List statuses; /** * Sku of the availability set. @@ -61,7 +60,7 @@ public class AvailabilitySetInner extends Resource { private Sku sku; /** - * Get the platformUpdateDomainCount value. + * Get update Domain count. * * @return the platformUpdateDomainCount value */ @@ -70,7 +69,7 @@ public Integer platformUpdateDomainCount() { } /** - * Set the platformUpdateDomainCount value. + * Set update Domain count. * * @param platformUpdateDomainCount the platformUpdateDomainCount value to set * @return the AvailabilitySetInner object itself. @@ -81,7 +80,7 @@ public AvailabilitySetInner withPlatformUpdateDomainCount(Integer platformUpdate } /** - * Get the platformFaultDomainCount value. + * Get fault Domain count. * * @return the platformFaultDomainCount value */ @@ -90,7 +89,7 @@ public Integer platformFaultDomainCount() { } /** - * Set the platformFaultDomainCount value. + * Set fault Domain count. * * @param platformFaultDomainCount the platformFaultDomainCount value to set * @return the AvailabilitySetInner object itself. @@ -101,7 +100,7 @@ public AvailabilitySetInner withPlatformFaultDomainCount(Integer platformFaultDo } /** - * Get the virtualMachines value. + * Get a list of references to all virtual machines in the availability set. * * @return the virtualMachines value */ @@ -110,7 +109,7 @@ public List virtualMachines() { } /** - * Set the virtualMachines value. + * Set a list of references to all virtual machines in the availability set. * * @param virtualMachines the virtualMachines value to set * @return the AvailabilitySetInner object itself. @@ -121,16 +120,16 @@ public AvailabilitySetInner withVirtualMachines(List virtualMachine } /** - * Get the statuses value. + * Get the resource status information. * * @return the statuses value */ - public List statuses() { + public List statuses() { return this.statuses; } /** - * Get the sku value. + * Get sku of the availability set. * * @return the sku value */ @@ -139,7 +138,7 @@ public Sku sku() { } /** - * Set the sku value. + * Set sku of the availability set. * * @param sku the sku value to set * @return the AvailabilitySetInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetUpdateInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetUpdateInner.java new file mode 100644 index 00000000000..2b2474840db --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetUpdateInner.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import java.util.List; +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.compute.InstanceViewStatus; +import com.microsoft.azure.management.compute.Sku; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.compute.UpdateResource; + +/** + * Specifies information about the availability set that the virtual machine + * should be assigned to. Only tags may be updated. + */ +@JsonFlatten +public class AvailabilitySetUpdateInner extends UpdateResource { + /** + * Update Domain count. + */ + @JsonProperty(value = "properties.platformUpdateDomainCount") + private Integer platformUpdateDomainCount; + + /** + * Fault Domain count. + */ + @JsonProperty(value = "properties.platformFaultDomainCount") + private Integer platformFaultDomainCount; + + /** + * A list of references to all virtual machines in the availability set. + */ + @JsonProperty(value = "properties.virtualMachines") + private List virtualMachines; + + /** + * The resource status information. + */ + @JsonProperty(value = "properties.statuses", access = JsonProperty.Access.WRITE_ONLY) + private List statuses; + + /** + * Sku of the availability set. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * Get the platformUpdateDomainCount value. + * + * @return the platformUpdateDomainCount value + */ + public Integer platformUpdateDomainCount() { + return this.platformUpdateDomainCount; + } + + /** + * Set the platformUpdateDomainCount value. + * + * @param platformUpdateDomainCount the platformUpdateDomainCount value to set + * @return the AvailabilitySetUpdateInner object itself. + */ + public AvailabilitySetUpdateInner withPlatformUpdateDomainCount(Integer platformUpdateDomainCount) { + this.platformUpdateDomainCount = platformUpdateDomainCount; + return this; + } + + /** + * Get the platformFaultDomainCount value. + * + * @return the platformFaultDomainCount value + */ + public Integer platformFaultDomainCount() { + return this.platformFaultDomainCount; + } + + /** + * Set the platformFaultDomainCount value. + * + * @param platformFaultDomainCount the platformFaultDomainCount value to set + * @return the AvailabilitySetUpdateInner object itself. + */ + public AvailabilitySetUpdateInner withPlatformFaultDomainCount(Integer platformFaultDomainCount) { + this.platformFaultDomainCount = platformFaultDomainCount; + return this; + } + + /** + * Get the virtualMachines value. + * + * @return the virtualMachines value + */ + public List virtualMachines() { + return this.virtualMachines; + } + + /** + * Set the virtualMachines value. + * + * @param virtualMachines the virtualMachines value to set + * @return the AvailabilitySetUpdateInner object itself. + */ + public AvailabilitySetUpdateInner withVirtualMachines(List virtualMachines) { + this.virtualMachines = virtualMachines; + return this; + } + + /** + * Get the statuses value. + * + * @return the statuses value + */ + public List statuses() { + return this.statuses; + } + + /** + * Get the sku value. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the AvailabilitySetUpdateInner object itself. + */ + public AvailabilitySetUpdateInner withSku(Sku sku) { + this.sku = sku; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java index df52c45b336..e2f0371f4a5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java @@ -13,6 +13,7 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.compute.AvailabilitySetUpdate; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -27,6 +28,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; @@ -38,7 +40,7 @@ * An instance of this class provides access to all the operations defined * in AvailabilitySets. */ -public class AvailabilitySetsInner implements InnerSupportsGet, InnerSupportsDelete { +public class AvailabilitySetsInner implements InnerSupportsGet, InnerSupportsDelete { /** The Retrofit service to perform REST calls. */ private AvailabilitySetsService service; /** The service client containing this operation class. */ @@ -64,6 +66,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 AvailabilitySetUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.AvailabilitySets delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", method = "DELETE", hasBody = true) 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); @@ -152,7 +158,7 @@ public Observable> createOrUpdateWithServi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.createOrUpdate(resourceGroupName, availabilitySetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -174,6 +180,98 @@ private ServiceResponse createOrUpdateDelegate(Response updateAsync(String resourceGroupName, String availabilitySetName, AvailabilitySetUpdate 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, AvailabilitySetUpdate 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, AvailabilitySetUpdate 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 = "2018-04-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. * @@ -182,10 +280,9 @@ private ServiceResponse createOrUpdateDelegate(Response deleteAsync(String resourceGroupName, String availabilitySetName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String availabilitySetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, availabilitySetName), serviceCallback); } @@ -207,12 +304,12 @@ public ServiceFuture deleteAsync(String resourceGr * @param resourceGroupName The name of the resource group. * @param availabilitySetName The name of the availability set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable deleteAsync(String resourceGroupName, String availabilitySetName) { - return deleteWithServiceResponseAsync(resourceGroupName, availabilitySetName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String availabilitySetName) { + return deleteWithServiceResponseAsync(resourceGroupName, availabilitySetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -224,9 +321,9 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String availabilitySetName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String availabilitySetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -236,13 +333,13 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.delete(resourceGroupName, availabilitySetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteDelegate(response); + ServiceResponse clientResponse = deleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -251,9 +348,9 @@ public Observable> call(Response deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -321,7 +418,7 @@ public Observable> getByResourceGroupWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, availabilitySetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -402,14 +499,18 @@ public Observable>> listByResourceGro if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { ServiceResponse> result = listByResourceGroupDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -487,14 +588,18 @@ public Observable>> listAvailableS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listAvailableSizes(resourceGroupName, availabilitySetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { ServiceResponse> result = listAvailableSizesDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java index 8513af73e93..4f0e7eb94b5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java @@ -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. */ @@ -159,6 +172,19 @@ public VirtualMachineExtensionsInner virtualMachineExtensions() { return this.virtualMachineExtensions; } + /** + * The VirtualMachinesInner object to access its operations. + */ + private VirtualMachinesInner virtualMachines; + + /** + * Gets the VirtualMachinesInner object to access its operations. + * @return the VirtualMachinesInner object. + */ + public VirtualMachinesInner virtualMachines() { + return this.virtualMachines; + } + /** * The VirtualMachineImagesInner object to access its operations. */ @@ -211,19 +237,6 @@ public ImagesInner images() { return this.images; } - /** - * The VirtualMachinesInner object to access its operations. - */ - private VirtualMachinesInner virtualMachines; - - /** - * Gets the VirtualMachinesInner object to access its operations. - * @return the VirtualMachinesInner object. - */ - public VirtualMachinesInner virtualMachines() { - return this.virtualMachines; - } - /** * The VirtualMachineScaleSetsInner object to access its operations. */ @@ -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,22 +401,25 @@ 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); + this.virtualMachines = new VirtualMachinesInner(restClient().retrofit(), this); this.virtualMachineImages = new VirtualMachineImagesInner(restClient().retrofit(), this); this.usages = new UsagesInner(restClient().retrofit(), this); this.virtualMachineSizes = new VirtualMachineSizesInner(restClient().retrofit(), this); this.images = new ImagesInner(restClient().retrofit(), this); - this.virtualMachines = new VirtualMachinesInner(restClient().retrofit(), this); this.virtualMachineScaleSets = new VirtualMachineScaleSetsInner(restClient().retrofit(), this); this.virtualMachineScaleSetExtensions = new VirtualMachineScaleSetExtensionsInner(restClient().retrofit(), this); this.virtualMachineScaleSetRollingUpgrades = new VirtualMachineScaleSetRollingUpgradesInner(restClient().retrofit(), this); 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..fffa7d9bd97 --- /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 of the compute operation. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Get the name of the compute operation. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the display name of the compute operation. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Get the display name of the resource the operation applies to. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Get the description of the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Get the resource provider for the operation. + * + * @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..79474841f54 --- /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 current deployment or provisioning state, which only appears in the response. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get properties of the orchestrator. + * + * @return the orchestratorProfile value + */ + public ContainerServiceOrchestratorProfile orchestratorProfile() { + return this.orchestratorProfile; + } + + /** + * Set properties of the orchestrator. + * + * @param orchestratorProfile the orchestratorProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withOrchestratorProfile(ContainerServiceOrchestratorProfile orchestratorProfile) { + this.orchestratorProfile = orchestratorProfile; + return this; + } + + /** + * Get properties for custom clusters. + * + * @return the customProfile value + */ + public ContainerServiceCustomProfile customProfile() { + return this.customProfile; + } + + /** + * Set properties for custom clusters. + * + * @param customProfile the customProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withCustomProfile(ContainerServiceCustomProfile customProfile) { + this.customProfile = customProfile; + return this; + } + + /** + * Get properties for cluster service principals. + * + * @return the servicePrincipalProfile value + */ + public ContainerServiceServicePrincipalProfile servicePrincipalProfile() { + return this.servicePrincipalProfile; + } + + /** + * Set properties for cluster service principals. + * + * @param servicePrincipalProfile the servicePrincipalProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withServicePrincipalProfile(ContainerServiceServicePrincipalProfile servicePrincipalProfile) { + this.servicePrincipalProfile = servicePrincipalProfile; + return this; + } + + /** + * Get properties of master agents. + * + * @return the masterProfile value + */ + public ContainerServiceMasterProfile masterProfile() { + return this.masterProfile; + } + + /** + * Set properties of master agents. + * + * @param masterProfile the masterProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withMasterProfile(ContainerServiceMasterProfile masterProfile) { + this.masterProfile = masterProfile; + return this; + } + + /** + * Get properties of the agent pool. + * + * @return the agentPoolProfiles value + */ + public List agentPoolProfiles() { + return this.agentPoolProfiles; + } + + /** + * Set properties of the agent pool. + * + * @param agentPoolProfiles the agentPoolProfiles value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withAgentPoolProfiles(List agentPoolProfiles) { + this.agentPoolProfiles = agentPoolProfiles; + return this; + } + + /** + * Get properties of Windows VMs. + * + * @return the windowsProfile value + */ + public ContainerServiceWindowsProfile windowsProfile() { + return this.windowsProfile; + } + + /** + * Set properties of Windows VMs. + * + * @param windowsProfile the windowsProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withWindowsProfile(ContainerServiceWindowsProfile windowsProfile) { + this.windowsProfile = windowsProfile; + return this; + } + + /** + * Get properties of Linux VMs. + * + * @return the linuxProfile value + */ + public ContainerServiceLinuxProfile linuxProfile() { + return this.linuxProfile; + } + + /** + * Set properties of Linux VMs. + * + * @param linuxProfile the linuxProfile value to set + * @return the ContainerServiceInner object itself. + */ + public ContainerServiceInner withLinuxProfile(ContainerServiceLinuxProfile linuxProfile) { + this.linuxProfile = linuxProfile; + return this; + } + + /** + * Get properties of the diagnostic agent. + * + * @return the diagnosticsProfile value + */ + public ContainerServiceDiagnosticsProfile diagnosticsProfile() { + return this.diagnosticsProfile; + } + + /** + * Set properties of the diagnostic agent. + * + * @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/DiskInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DiskInner.java index 8f587559f61..18deeff66dc 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DiskInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DiskInner.java @@ -83,7 +83,7 @@ public class DiskInner extends Resource { private String provisioningState; /** - * Get the managedBy value. + * Get a relative URI containing the ID of the VM that has the disk attached. * * @return the managedBy value */ @@ -112,7 +112,7 @@ public DiskInner withSku(DiskSku sku) { } /** - * Get the zones value. + * Get the Logical zone list for Disk. * * @return the zones value */ @@ -121,7 +121,7 @@ public List zones() { } /** - * Set the zones value. + * Set the Logical zone list for Disk. * * @param zones the zones value to set * @return the DiskInner object itself. @@ -132,7 +132,7 @@ public DiskInner withZones(List zones) { } /** - * Get the timeCreated value. + * Get the time when the disk was created. * * @return the timeCreated value */ @@ -141,7 +141,7 @@ public DateTime timeCreated() { } /** - * Get the osType value. + * Get the Operating System type. Possible values include: 'Windows', 'Linux'. * * @return the osType value */ @@ -150,7 +150,7 @@ public OperatingSystemTypes osType() { } /** - * Set the osType value. + * Set the Operating System type. Possible values include: 'Windows', 'Linux'. * * @param osType the osType value to set * @return the DiskInner object itself. @@ -161,7 +161,7 @@ public DiskInner withOsType(OperatingSystemTypes osType) { } /** - * Get the creationData value. + * Get disk source information. CreationData information cannot be changed after the disk has been created. * * @return the creationData value */ @@ -170,7 +170,7 @@ public CreationData creationData() { } /** - * Set the creationData value. + * Set disk source information. CreationData information cannot be changed after the disk has been created. * * @param creationData the creationData value to set * @return the DiskInner object itself. @@ -181,7 +181,7 @@ public DiskInner withCreationData(CreationData creationData) { } /** - * Get the diskSizeGB value. + * Get if creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. * * @return the diskSizeGB value */ @@ -190,7 +190,7 @@ public Integer diskSizeGB() { } /** - * Set the diskSizeGB value. + * Set if creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. * * @param diskSizeGB the diskSizeGB value to set * @return the DiskInner object itself. @@ -201,7 +201,7 @@ public DiskInner withDiskSizeGB(Integer diskSizeGB) { } /** - * Get the encryptionSettings value. + * Get encryption settings for disk or snapshot. * * @return the encryptionSettings value */ @@ -210,7 +210,7 @@ public EncryptionSettings encryptionSettings() { } /** - * Set the encryptionSettings value. + * Set encryption settings for disk or snapshot. * * @param encryptionSettings the encryptionSettings value to set * @return the DiskInner object itself. @@ -221,7 +221,7 @@ public DiskInner withEncryptionSettings(EncryptionSettings encryptionSettings) { } /** - * Get the provisioningState value. + * Get the disk provisioning state. * * @return the provisioningState value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java index e8d791f32d9..f7823911202 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java @@ -16,6 +16,8 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.compute.DiskUpdate; +import com.microsoft.azure.management.compute.GrantAccessData; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -44,7 +46,7 @@ * An instance of this class provides access to all the operations defined * in Disks. */ -public class DisksInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class DisksInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private DisksService service; /** The service client containing this operation class. */ @@ -76,11 +78,11 @@ interface DisksService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Disks update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body DiskUpdateInner disk, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body DiskUpdate disk, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Disks beginUpdate" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}") - Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body DiskUpdateInner disk, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body DiskUpdate disk, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Disks getByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}") @@ -104,11 +106,11 @@ interface DisksService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Disks grantAccess" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess") - Observable> grantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body GrantAccessDataInner grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> grantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body GrantAccessData grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Disks beginGrantAccess" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess") - Observable> beginGrantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body GrantAccessDataInner grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginGrantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("diskName") String diskName, @Query("api-version") String apiVersion, @Body GrantAccessData grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Disks revokeAccess" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess") @@ -132,7 +134,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 +149,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 +163,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 +181,7 @@ public DiskInner call(ServiceResponse response) { * Creates or updates a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -198,7 +200,7 @@ public Observable> createOrUpdateWithServiceResponseA throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -207,7 +209,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 +224,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 +238,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 +256,7 @@ public DiskInner call(ServiceResponse response) { * Creates or updates a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DiskInner object @@ -273,7 +275,7 @@ public Observable> beginCreateOrUpdateWithServiceResp throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -300,14 +302,14 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response updateAsync(String resourceGroupName, String diskName, DiskUpdateInner disk, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String diskName, DiskUpdate disk, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, diskName, disk), serviceCallback); } @@ -329,12 +331,12 @@ public ServiceFuture 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 */ - public Observable updateAsync(String resourceGroupName, String diskName, DiskUpdateInner disk) { + public Observable updateAsync(String resourceGroupName, String diskName, DiskUpdate disk) { return updateWithServiceResponseAsync(resourceGroupName, diskName, disk).map(new Func1, DiskInner>() { @Override public DiskInner call(ServiceResponse response) { @@ -347,12 +349,12 @@ 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 */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String diskName, DiskUpdateInner disk) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String diskName, DiskUpdate disk) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -366,7 +368,7 @@ public Observable> updateWithServiceResponseAsync(Str throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -375,14 +377,14 @@ 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 * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the DiskInner object if successful. */ - public DiskInner beginUpdate(String resourceGroupName, String diskName, DiskUpdateInner disk) { + public DiskInner beginUpdate(String resourceGroupName, String diskName, DiskUpdate disk) { return beginUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk).toBlocking().single().body(); } @@ -390,13 +392,13 @@ 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 * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateAsync(String resourceGroupName, String diskName, DiskUpdateInner disk, final ServiceCallback serviceCallback) { + public ServiceFuture beginUpdateAsync(String resourceGroupName, String diskName, DiskUpdate disk, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk), serviceCallback); } @@ -404,12 +406,12 @@ 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 */ - public Observable beginUpdateAsync(String resourceGroupName, String diskName, DiskUpdateInner disk) { + public Observable beginUpdateAsync(String resourceGroupName, String diskName, DiskUpdate disk) { return beginUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk).map(new Func1, DiskInner>() { @Override public DiskInner call(ServiceResponse response) { @@ -422,12 +424,12 @@ 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 */ - public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String diskName, DiskUpdateInner disk) { + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String diskName, DiskUpdate disk) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -441,7 +443,7 @@ public Observable> beginUpdateWithServiceResponseAsyn throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -468,7 +470,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 +484,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 +497,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 +514,7 @@ public DiskInner call(ServiceResponse response) { * Gets information about a disk. * * @param resourceGroupName The name of the resource group. - * @param diskName The name of the disk within the given subscription and resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DiskInner object */ @@ -526,7 +528,7 @@ public Observable> getByResourceGroupWithServiceRespo if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -552,26 +554,25 @@ private ServiceResponse getByResourceGroupDelegate(Response deleteAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); } @@ -579,14 +580,14 @@ public ServiceFuture 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 */ - public Observable deleteAsync(String resourceGroupName, String diskName) { - return deleteWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String diskName) { + return deleteWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -596,11 +597,11 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String diskName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -610,35 +611,34 @@ public Observable> deleteWithServi if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * 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 - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String diskName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, diskName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String diskName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, diskName).toBlocking().single().body(); } /** * 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 */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); } @@ -646,14 +646,14 @@ 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 + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String diskName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String diskName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -663,11 +663,11 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String diskName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -677,13 +677,13 @@ public Observable> beginDeleteWith if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginDelete(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -692,9 +692,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -792,7 +792,7 @@ public Observable>> listByResourceGroupSinglePag if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -897,7 +897,7 @@ public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -923,14 +923,14 @@ private ServiceResponse> listDelegate(Response grantAccessAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData, final ServiceCallback serviceCallback) { + public ServiceFuture grantAccessAsync(String resourceGroupName, String diskName, GrantAccessData grantAccessData, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(grantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData), serviceCallback); } @@ -952,12 +952,12 @@ public ServiceFuture 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 */ - public Observable grantAccessAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData) { + public Observable grantAccessAsync(String resourceGroupName, String diskName, GrantAccessData grantAccessData) { return grantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData).map(new Func1, AccessUriInner>() { @Override public AccessUriInner call(ServiceResponse response) { @@ -970,12 +970,12 @@ 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 */ - public Observable> grantAccessWithServiceResponseAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData) { + public Observable> grantAccessWithServiceResponseAsync(String resourceGroupName, String diskName, GrantAccessData grantAccessData) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -989,7 +989,7 @@ public Observable> grantAccessWithServiceRespons throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.grantAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -998,14 +998,14 @@ 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 * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the AccessUriInner object if successful. */ - public AccessUriInner beginGrantAccess(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData) { + public AccessUriInner beginGrantAccess(String resourceGroupName, String diskName, GrantAccessData grantAccessData) { return beginGrantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData).toBlocking().single().body(); } @@ -1013,13 +1013,13 @@ 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 * @return the {@link ServiceFuture} object */ - public ServiceFuture beginGrantAccessAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData, final ServiceCallback serviceCallback) { + public ServiceFuture beginGrantAccessAsync(String resourceGroupName, String diskName, GrantAccessData grantAccessData, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginGrantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData), serviceCallback); } @@ -1027,12 +1027,12 @@ 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 */ - public Observable beginGrantAccessAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData) { + public Observable beginGrantAccessAsync(String resourceGroupName, String diskName, GrantAccessData grantAccessData) { return beginGrantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData).map(new Func1, AccessUriInner>() { @Override public AccessUriInner call(ServiceResponse response) { @@ -1045,12 +1045,12 @@ 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 */ - public Observable> beginGrantAccessWithServiceResponseAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData) { + public Observable> beginGrantAccessWithServiceResponseAsync(String resourceGroupName, String diskName, GrantAccessData grantAccessData) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1064,7 +1064,7 @@ public Observable> beginGrantAccessWithServiceRe throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginGrantAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1091,26 +1091,25 @@ private ServiceResponse beginGrantAccessDelegate(Response revokeAccessAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { + public ServiceFuture revokeAccessAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(revokeAccessWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); } @@ -1118,14 +1117,14 @@ public ServiceFuture 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 */ - public Observable revokeAccessAsync(String resourceGroupName, String diskName) { - return revokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, OperationStatusResponseInner>() { + public Observable revokeAccessAsync(String resourceGroupName, String diskName) { + return revokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1135,11 +1134,11 @@ public OperationStatusResponseInner call(ServiceResponse> revokeAccessWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> revokeAccessWithServiceResponseAsync(String resourceGroupName, String diskName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1149,35 +1148,34 @@ public Observable> revokeAccessWit if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.revokeAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * 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 - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRevokeAccess(String resourceGroupName, String diskName) { - return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName).toBlocking().single().body(); + public void beginRevokeAccess(String resourceGroupName, String diskName) { + beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName).toBlocking().single().body(); } /** * 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 */ - public ServiceFuture beginRevokeAccessAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRevokeAccessAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); } @@ -1185,14 +1183,14 @@ 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 + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRevokeAccessAsync(String resourceGroupName, String diskName) { - return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRevokeAccessAsync(String resourceGroupName, String diskName) { + return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1202,11 +1200,11 @@ public OperationStatusResponseInner call(ServiceResponse> beginRevokeAccessWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> beginRevokeAccessWithServiceResponseAsync(String resourceGroupName, String diskName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1216,13 +1214,13 @@ public Observable> beginRevokeAcce if (diskName == null) { throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginRevokeAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRevokeAccessDelegate(response); + ServiceResponse clientResponse = beginRevokeAccessDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1231,9 +1229,9 @@ public Observable> call(Response beginRevokeAccessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRevokeAccessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleriesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleriesInner.java new file mode 100644 index 00000000000..450da91330d --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleriesInner.java @@ -0,0 +1,950 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Galleries. + */ +public class GalleriesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private GalleriesService service; + /** The service client containing this operation class. */ + private ComputeManagementClientImpl client; + + /** + * Initializes an instance of GalleriesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public GalleriesInner(Retrofit retrofit, ComputeManagementClientImpl client) { + this.service = retrofit.create(GalleriesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Galleries to be + * used by Retrofit to perform actually REST calls. + */ + interface GalleriesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Galleries createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Query("api-version") String apiVersion, @Body GalleryInner gallery, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Galleries beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Query("api-version") String apiVersion, @Body GalleryInner gallery, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Galleries getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Galleries delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Galleries beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Galleries listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Galleries list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Galleries listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Galleries listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param gallery Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryInner object if successful. + */ + public GalleryInner createOrUpdate(String resourceGroupName, String galleryName, GalleryInner gallery) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, gallery).toBlocking().last().body(); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param gallery Parameters supplied to the create or update gallery operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner gallery, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, gallery), serviceCallback); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param gallery Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner gallery) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, gallery).map(new Func1, GalleryInner>() { + @Override + public GalleryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param gallery Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, GalleryInner gallery) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (gallery == null) { + throw new IllegalArgumentException("Parameter gallery is required and cannot be null."); + } + Validator.validate(gallery); + final String apiVersion = "2018-06-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, gallery, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param gallery Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryInner object if successful. + */ + public GalleryInner beginCreateOrUpdate(String resourceGroupName, String galleryName, GalleryInner gallery) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, gallery).toBlocking().single().body(); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param gallery Parameters supplied to the create or update gallery operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner gallery, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, gallery), serviceCallback); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param gallery Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner gallery) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, gallery).map(new Func1, GalleryInner>() { + @Override + public GalleryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param gallery Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, GalleryInner gallery) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (gallery == null) { + throw new IllegalArgumentException("Parameter gallery is required and cannot be null."); + } + Validator.validate(gallery); + final String apiVersion = "2018-06-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, gallery, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves information about a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryInner object if successful. + */ + public GalleryInner getByResourceGroup(String resourceGroupName, String galleryName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, galleryName).toBlocking().single().body(); + } + + /** + * Retrieves information about a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String galleryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, galleryName), serviceCallback); + } + + /** + * Retrieves information about a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String galleryName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, galleryName).map(new Func1, GalleryInner>() { + @Override + public GalleryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves information about a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String galleryName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner delete(String resourceGroupName, String galleryName) { + return deleteWithServiceResponseAsync(resourceGroupName, galleryName).toBlocking().last().body(); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String galleryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, galleryName), serviceCallback); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String galleryName) { + return deleteWithServiceResponseAsync(resourceGroupName, galleryName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String galleryName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginDelete(String resourceGroupName, String galleryName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName).toBlocking().single().body(); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String galleryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName), serviceCallback); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginDeleteAsync(String resourceGroupName, String galleryName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String galleryName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List galleries under a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GalleryInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List galleries under a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List galleries under a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List galleries under a resource group. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List galleries under a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GalleryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List galleries under a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GalleryInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List galleries under a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List galleries under a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List galleries under a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List galleries under a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GalleryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List galleries under a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GalleryInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List galleries under a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List galleries under a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List galleries under a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List galleries under a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GalleryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List galleries under a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GalleryInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List galleries under a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List galleries under a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List galleries under a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List galleries under a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GalleryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageInner.java new file mode 100644 index 00000000000..4777b319852 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageInner.java @@ -0,0 +1,336 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.OperatingSystemTypes; +import com.microsoft.azure.management.compute.OperatingSystemStateTypes; +import org.joda.time.LocalDate; +import com.microsoft.azure.management.compute.GalleryImageIdentifier; +import com.microsoft.azure.management.compute.RecommendedMachineConfiguration; +import com.microsoft.azure.management.compute.Disallowed; +import com.microsoft.azure.management.compute.ImagePurchasePlan; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Specifies information about the gallery image that you want to create or + * update. + */ +@JsonFlatten +public class GalleryImageInner extends Resource { + /** + * The description of this gallery image resource. + */ + @JsonProperty(value = "properties.description") + private String description; + + /** + * The Eula agreement for the gallery image. + */ + @JsonProperty(value = "properties.eula") + private String eula; + + /** + * The privacy statement uri. + */ + @JsonProperty(value = "properties.privacyStatementUri") + private String privacyStatementUri; + + /** + * The release note uri. + */ + @JsonProperty(value = "properties.releaseNoteUri") + private String releaseNoteUri; + + /** + * This property allows you to specify the type of the OS that is included + * in the disk if creating a VM from user-image or a specialized VHD. + * <br><br> Possible values are: <br><br> + * **Windows** <br><br> **Linux**. Possible values include: + * 'Windows', 'Linux'. + */ + @JsonProperty(value = "properties.osType") + private OperatingSystemTypes osType; + + /** + * The OS State. Possible values include: 'Generalized', 'Specialized'. + */ + @JsonProperty(value = "properties.osState") + private OperatingSystemStateTypes osState; + + /** + * The end of life of this gallery image. + */ + @JsonProperty(value = "properties.endOfLifeDate") + private LocalDate endOfLifeDate; + + /** + * The identifier property. + */ + @JsonProperty(value = "properties.identifier") + private GalleryImageIdentifier identifier; + + /** + * The recommended property. + */ + @JsonProperty(value = "properties.recommended") + private RecommendedMachineConfiguration recommended; + + /** + * The disallowed property. + */ + @JsonProperty(value = "properties.disallowed") + private Disallowed disallowed; + + /** + * The purchasePlan property. + */ + @JsonProperty(value = "properties.purchasePlan") + private ImagePurchasePlan purchasePlan; + + /** + * The current state of the gallery image. + * The provisioning state, which only appears in the response. Possible + * values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + * 'Deleting', 'Migrating'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description value. + * + * @param description the description value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the eula value. + * + * @return the eula value + */ + public String eula() { + return this.eula; + } + + /** + * Set the eula value. + * + * @param eula the eula value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withEula(String eula) { + this.eula = eula; + return this; + } + + /** + * Get the privacyStatementUri value. + * + * @return the privacyStatementUri value + */ + public String privacyStatementUri() { + return this.privacyStatementUri; + } + + /** + * Set the privacyStatementUri value. + * + * @param privacyStatementUri the privacyStatementUri value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withPrivacyStatementUri(String privacyStatementUri) { + this.privacyStatementUri = privacyStatementUri; + return this; + } + + /** + * Get the releaseNoteUri value. + * + * @return the releaseNoteUri value + */ + public String releaseNoteUri() { + return this.releaseNoteUri; + } + + /** + * Set the releaseNoteUri value. + * + * @param releaseNoteUri the releaseNoteUri value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withReleaseNoteUri(String releaseNoteUri) { + this.releaseNoteUri = releaseNoteUri; + return this; + } + + /** + * Get the osType value. + * + * @return the osType value + */ + public OperatingSystemTypes osType() { + return this.osType; + } + + /** + * Set the osType value. + * + * @param osType the osType value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withOsType(OperatingSystemTypes osType) { + this.osType = osType; + return this; + } + + /** + * Get the osState value. + * + * @return the osState value + */ + public OperatingSystemStateTypes osState() { + return this.osState; + } + + /** + * Set the osState value. + * + * @param osState the osState value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withOsState(OperatingSystemStateTypes osState) { + this.osState = osState; + return this; + } + + /** + * Get the endOfLifeDate value. + * + * @return the endOfLifeDate value + */ + public LocalDate endOfLifeDate() { + return this.endOfLifeDate; + } + + /** + * Set the endOfLifeDate value. + * + * @param endOfLifeDate the endOfLifeDate value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withEndOfLifeDate(LocalDate endOfLifeDate) { + this.endOfLifeDate = endOfLifeDate; + return this; + } + + /** + * Get the identifier value. + * + * @return the identifier value + */ + public GalleryImageIdentifier identifier() { + return this.identifier; + } + + /** + * Set the identifier value. + * + * @param identifier the identifier value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withIdentifier(GalleryImageIdentifier identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get the recommended value. + * + * @return the recommended value + */ + public RecommendedMachineConfiguration recommended() { + return this.recommended; + } + + /** + * Set the recommended value. + * + * @param recommended the recommended value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withRecommended(RecommendedMachineConfiguration recommended) { + this.recommended = recommended; + return this; + } + + /** + * Get the disallowed value. + * + * @return the disallowed value + */ + public Disallowed disallowed() { + return this.disallowed; + } + + /** + * Set the disallowed value. + * + * @param disallowed the disallowed value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withDisallowed(Disallowed disallowed) { + this.disallowed = disallowed; + return this; + } + + /** + * Get the purchasePlan value. + * + * @return the purchasePlan value + */ + public ImagePurchasePlan purchasePlan() { + return this.purchasePlan; + } + + /** + * Set the purchasePlan value. + * + * @param purchasePlan the purchasePlan value to set + * @return the GalleryImageInner object itself. + */ + public GalleryImageInner withPurchasePlan(ImagePurchasePlan purchasePlan) { + this.purchasePlan = purchasePlan; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageListInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageListInner.java new file mode 100644 index 00000000000..bc333c54257 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageListInner.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The List Gallery Images operation response. + */ +public class GalleryImageListInner { + /** + * A list of gallery images. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /** + * The uri to fetch the next page of gallery images. Call ListNext() with + * this to fetch the next page of gallery images. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value value. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the GalleryImageListInner object itself. + */ + public GalleryImageListInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink value. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink value. + * + * @param nextLink the nextLink value to set + * @return the GalleryImageListInner object itself. + */ + public GalleryImageListInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionInner.java new file mode 100644 index 00000000000..ec8f3d824a3 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionInner.java @@ -0,0 +1,120 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.GalleryImageVersionPublishingProfile; +import com.microsoft.azure.management.compute.GalleryImageVersionStorageProfile; +import com.microsoft.azure.management.compute.ReplicationStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Specifies information about the gallery image version that you want to + * create or update. + */ +@JsonFlatten +public class GalleryImageVersionInner extends Resource { + /** + * The publishingProfile property. + */ + @JsonProperty(value = "properties.publishingProfile") + private GalleryImageVersionPublishingProfile publishingProfile; + + /** + * The current state of the gallery image version. + * The provisioning state, which only appears in the response. Possible + * values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + * 'Deleting', 'Migrating'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * The storageProfile property. + */ + @JsonProperty(value = "properties.storageProfile") + private GalleryImageVersionStorageProfile storageProfile; + + /** + * The replicationStatus property. + */ + @JsonProperty(value = "properties.replicationStatus") + private ReplicationStatus replicationStatus; + + /** + * Get the publishingProfile value. + * + * @return the publishingProfile value + */ + public GalleryImageVersionPublishingProfile publishingProfile() { + return this.publishingProfile; + } + + /** + * Set the publishingProfile value. + * + * @param publishingProfile the publishingProfile value to set + * @return the GalleryImageVersionInner object itself. + */ + public GalleryImageVersionInner withPublishingProfile(GalleryImageVersionPublishingProfile publishingProfile) { + this.publishingProfile = publishingProfile; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the storageProfile value. + * + * @return the storageProfile value + */ + public GalleryImageVersionStorageProfile storageProfile() { + return this.storageProfile; + } + + /** + * Set the storageProfile value. + * + * @param storageProfile the storageProfile value to set + * @return the GalleryImageVersionInner object itself. + */ + public GalleryImageVersionInner withStorageProfile(GalleryImageVersionStorageProfile storageProfile) { + this.storageProfile = storageProfile; + return this; + } + + /** + * Get the replicationStatus value. + * + * @return the replicationStatus value + */ + public ReplicationStatus replicationStatus() { + return this.replicationStatus; + } + + /** + * Set the replicationStatus value. + * + * @param replicationStatus the replicationStatus value to set + * @return the GalleryImageVersionInner object itself. + */ + public GalleryImageVersionInner withReplicationStatus(ReplicationStatus replicationStatus) { + this.replicationStatus = replicationStatus; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionListInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionListInner.java new file mode 100644 index 00000000000..fe50ccb2c8f --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionListInner.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The List Gallery Image version operation response. + */ +public class GalleryImageVersionListInner { + /** + * A list of gallery image versions. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /** + * The uri to fetch the next page of gallery image versions. Call + * ListNext() with this to fetch the next page of gallery image versions. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value value. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the GalleryImageVersionListInner object itself. + */ + public GalleryImageVersionListInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink value. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink value. + * + * @param nextLink the nextLink value to set + * @return the GalleryImageVersionListInner object itself. + */ + public GalleryImageVersionListInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionsInner.java new file mode 100644 index 00000000000..54917d60910 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImageVersionsInner.java @@ -0,0 +1,906 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.compute.ReplicationStatusTypes; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in GalleryImageVersions. + */ +public class GalleryImageVersionsInner { + /** The Retrofit service to perform REST calls. */ + private GalleryImageVersionsService service; + /** The service client containing this operation class. */ + private ComputeManagementClientImpl client; + + /** + * Initializes an instance of GalleryImageVersionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public GalleryImageVersionsInner(Retrofit retrofit, ComputeManagementClientImpl client) { + this.service = retrofit.create(GalleryImageVersionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for GalleryImageVersions to be + * used by Retrofit to perform actually REST calls. + */ + interface GalleryImageVersionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImageVersions createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Path("galleryImageVersionName") String galleryImageVersionName, @Query("api-version") String apiVersion, @Body GalleryImageVersionInner galleryImageVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImageVersions beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Path("galleryImageVersionName") String galleryImageVersionName, @Query("api-version") String apiVersion, @Body GalleryImageVersionInner galleryImageVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImageVersions get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Path("galleryImageVersionName") String galleryImageVersionName, @Query("$expand") ReplicationStatusTypes expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImageVersions delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Path("galleryImageVersionName") String galleryImageVersionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImageVersions beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Path("galleryImageVersionName") String galleryImageVersionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImageVersions listGalleryImageVersionsByGalleryImage" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions") + Observable> listGalleryImageVersionsByGalleryImage(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImageVersions listGalleryImageVersionsByGalleryImageNext" }) + @GET + Observable> listGalleryImageVersionsByGalleryImageNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryImageVersionInner object if successful. + */ + public GalleryImageVersionInner createOrUpdate(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, GalleryImageVersionInner galleryImageVersion) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion).toBlocking().last().body(); + } + + /** + * Create or update a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, GalleryImageVersionInner galleryImageVersion, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion), serviceCallback); + } + + /** + * Create or update a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, GalleryImageVersionInner galleryImageVersion) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion).map(new Func1, GalleryImageVersionInner>() { + @Override + public GalleryImageVersionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, GalleryImageVersionInner galleryImageVersion) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + if (galleryImageVersionName == null) { + throw new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null."); + } + if (galleryImageVersion == null) { + throw new IllegalArgumentException("Parameter galleryImageVersion is required and cannot be null."); + } + Validator.validate(galleryImageVersion); + final String apiVersion = "2018-06-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, apiVersion, galleryImageVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryImageVersionInner object if successful. + */ + public GalleryImageVersionInner beginCreateOrUpdate(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, GalleryImageVersionInner galleryImageVersion) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion).toBlocking().single().body(); + } + + /** + * Create or update a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, GalleryImageVersionInner galleryImageVersion, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion), serviceCallback); + } + + /** + * Create or update a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageVersionInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, GalleryImageVersionInner galleryImageVersion) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion).map(new Func1, GalleryImageVersionInner>() { + @Override + public GalleryImageVersionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageVersionInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, GalleryImageVersionInner galleryImageVersion) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + if (galleryImageVersionName == null) { + throw new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null."); + } + if (galleryImageVersion == null) { + throw new IllegalArgumentException("Parameter galleryImageVersion is required and cannot be null."); + } + Validator.validate(galleryImageVersion); + final String apiVersion = "2018-06-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, apiVersion, galleryImageVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves information about a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryImageVersionInner object if successful. + */ + public GalleryImageVersionInner get(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + return getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName).toBlocking().single().body(); + } + + /** + * Retrieves information about a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName), serviceCallback); + } + + /** + * Retrieves information about a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageVersionInner object + */ + public Observable getAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + return getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName).map(new Func1, GalleryImageVersionInner>() { + @Override + public GalleryImageVersionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves information about a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageVersionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + if (galleryImageVersionName == null) { + throw new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + final ReplicationStatusTypes expand = null; + return service.get(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Retrieves information about a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param expand The expand expression to apply on the operation. Possible values include: 'ReplicationStatus' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryImageVersionInner object if successful. + */ + public GalleryImageVersionInner get(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, ReplicationStatusTypes expand) { + return getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, expand).toBlocking().single().body(); + } + + /** + * Retrieves information about a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param expand The expand expression to apply on the operation. Possible values include: 'ReplicationStatus' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, ReplicationStatusTypes expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, expand), serviceCallback); + } + + /** + * Retrieves information about a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param expand The expand expression to apply on the operation. Possible values include: 'ReplicationStatus' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageVersionInner object + */ + public Observable getAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, ReplicationStatusTypes expand) { + return getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, expand).map(new Func1, GalleryImageVersionInner>() { + @Override + public GalleryImageVersionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves information about a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param expand The expand expression to apply on the operation. Possible values include: 'ReplicationStatus' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageVersionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, ReplicationStatusTypes expand) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + if (galleryImageVersionName == null) { + throw new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.get(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner delete(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + return deleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName).toBlocking().last().body(); + } + + /** + * Delete a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName), serviceCallback); + } + + /** + * Delete a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + return deleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + if (galleryImageVersionName == null) { + throw new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginDelete(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName).toBlocking().single().body(); + } + + /** + * Delete a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName), serviceCallback); + } + + /** + * Delete a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginDeleteAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a gallery image version. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImageVersionName The name of the gallery image version. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, String galleryImageVersionName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + if (galleryImageVersionName == null) { + throw new IllegalArgumentException("Parameter galleryImageVersionName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List gallery image versions under a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GalleryImageVersionInner> object if successful. + */ + public PagedList listGalleryImageVersionsByGalleryImage(final String resourceGroupName, final String galleryName, final String galleryImageName) { + ServiceResponse> response = listGalleryImageVersionsByGalleryImageSinglePageAsync(resourceGroupName, galleryName, galleryImageName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGalleryImageVersionsByGalleryImageNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List gallery image versions under a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listGalleryImageVersionsByGalleryImageAsync(final String resourceGroupName, final String galleryName, final String galleryImageName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGalleryImageVersionsByGalleryImageSinglePageAsync(resourceGroupName, galleryName, galleryImageName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGalleryImageVersionsByGalleryImageNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List gallery image versions under a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryImageVersionInner> object + */ + public Observable> listGalleryImageVersionsByGalleryImageAsync(final String resourceGroupName, final String galleryName, final String galleryImageName) { + return listGalleryImageVersionsByGalleryImageWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List gallery image versions under a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryImageVersionInner> object + */ + public Observable>> listGalleryImageVersionsByGalleryImageWithServiceResponseAsync(final String resourceGroupName, final String galleryName, final String galleryImageName) { + return listGalleryImageVersionsByGalleryImageSinglePageAsync(resourceGroupName, galleryName, galleryImageName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listGalleryImageVersionsByGalleryImageNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List gallery image versions under a gallery image. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param galleryName The name of the gallery. + ServiceResponse> * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GalleryImageVersionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGalleryImageVersionsByGalleryImageSinglePageAsync(final String resourceGroupName, final String galleryName, final String galleryImageName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.listGalleryImageVersionsByGalleryImage(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGalleryImageVersionsByGalleryImageDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGalleryImageVersionsByGalleryImageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List gallery image versions under a gallery image. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GalleryImageVersionInner> object if successful. + */ + public PagedList listGalleryImageVersionsByGalleryImageNext(final String nextPageLink) { + ServiceResponse> response = listGalleryImageVersionsByGalleryImageNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGalleryImageVersionsByGalleryImageNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List gallery image versions under a gallery image. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listGalleryImageVersionsByGalleryImageNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGalleryImageVersionsByGalleryImageNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGalleryImageVersionsByGalleryImageNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List gallery image versions under a gallery image. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryImageVersionInner> object + */ + public Observable> listGalleryImageVersionsByGalleryImageNextAsync(final String nextPageLink) { + return listGalleryImageVersionsByGalleryImageNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List gallery image versions under a gallery image. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryImageVersionInner> object + */ + public Observable>> listGalleryImageVersionsByGalleryImageNextWithServiceResponseAsync(final String nextPageLink) { + return listGalleryImageVersionsByGalleryImageNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listGalleryImageVersionsByGalleryImageNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List gallery image versions under a gallery image. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GalleryImageVersionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGalleryImageVersionsByGalleryImageNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listGalleryImageVersionsByGalleryImageNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGalleryImageVersionsByGalleryImageNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGalleryImageVersionsByGalleryImageNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImagesInner.java new file mode 100644 index 00000000000..3215171dd98 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryImagesInner.java @@ -0,0 +1,766 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in GalleryImages. + */ +public class GalleryImagesInner { + /** The Retrofit service to perform REST calls. */ + private GalleryImagesService service; + /** The service client containing this operation class. */ + private ComputeManagementClientImpl client; + + /** + * Initializes an instance of GalleryImagesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public GalleryImagesInner(Retrofit retrofit, ComputeManagementClientImpl client) { + this.service = retrofit.create(GalleryImagesService.class); + this.client = client; + } + + /** + * The interface defining all the services for GalleryImages to be + * used by Retrofit to perform actually REST calls. + */ + interface GalleryImagesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImages createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Query("api-version") String apiVersion, @Body GalleryImageInner galleryImage, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImages beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Query("api-version") String apiVersion, @Body GalleryImageInner galleryImage, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImages get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImages delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImages beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImages listGalleryImagesByGallery" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images") + Observable> listGalleryImagesByGallery(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImages listGalleryImagesByGalleryNext" }) + @GET + Observable> listGalleryImagesByGalleryNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryImageInner object if successful. + */ + public GalleryImageInner createOrUpdate(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).toBlocking().last().body(); + } + + /** + * Create or update a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage), serviceCallback); + } + + /** + * Create or update a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).map(new Func1, GalleryImageInner>() { + @Override + public GalleryImageInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + if (galleryImage == null) { + throw new IllegalArgumentException("Parameter galleryImage is required and cannot be null."); + } + Validator.validate(galleryImage); + final String apiVersion = "2018-06-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, galleryImage, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryImageInner object if successful. + */ + public GalleryImageInner beginCreateOrUpdate(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).toBlocking().single().body(); + } + + /** + * Create or update a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage), serviceCallback); + } + + /** + * Create or update a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).map(new Func1, GalleryImageInner>() { + @Override + public GalleryImageInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + if (galleryImage == null) { + throw new IllegalArgumentException("Parameter galleryImage is required and cannot be null."); + } + Validator.validate(galleryImage); + final String apiVersion = "2018-06-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, galleryImage, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves information about a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryImageInner object if successful. + */ + public GalleryImageInner get(String resourceGroupName, String galleryName, String galleryImageName) { + return getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).toBlocking().single().body(); + } + + /** + * Retrieves information about a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String galleryName, String galleryImageName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName), serviceCallback); + } + + /** + * Retrieves information about a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageInner object + */ + public Observable getAsync(String resourceGroupName, String galleryName, String galleryImageName) { + return getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).map(new Func1, GalleryImageInner>() { + @Override + public GalleryImageInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves information about a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryImageInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.get(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner delete(String resourceGroupName, String galleryName, String galleryImageName) { + return deleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).toBlocking().last().body(); + } + + /** + * Delete a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String galleryName, String galleryImageName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName), serviceCallback); + } + + /** + * Delete a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String galleryName, String galleryImageName) { + return deleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OperationStatusResponseInner object if successful. + */ + public OperationStatusResponseInner beginDelete(String resourceGroupName, String galleryName, String galleryImageName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).toBlocking().single().body(); + } + + /** + * Delete a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String galleryName, String galleryImageName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName), serviceCallback); + } + + /** + * Delete a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable beginDeleteAsync(String resourceGroupName, String galleryName, String galleryImageName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).map(new Func1, OperationStatusResponseInner>() { + @Override + public OperationStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a gallery image. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param galleryImageName The name of the gallery image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OperationStatusResponseInner object + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (galleryImageName == null) { + throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List gallery images under a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GalleryImageInner> object if successful. + */ + public PagedList listGalleryImagesByGallery(final String resourceGroupName, final String galleryName) { + ServiceResponse> response = listGalleryImagesByGallerySinglePageAsync(resourceGroupName, galleryName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGalleryImagesByGalleryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List gallery images under a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listGalleryImagesByGalleryAsync(final String resourceGroupName, final String galleryName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGalleryImagesByGallerySinglePageAsync(resourceGroupName, galleryName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGalleryImagesByGalleryNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List gallery images under a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryImageInner> object + */ + public Observable> listGalleryImagesByGalleryAsync(final String resourceGroupName, final String galleryName) { + return listGalleryImagesByGalleryWithServiceResponseAsync(resourceGroupName, galleryName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List gallery images under a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryImageInner> object + */ + public Observable>> listGalleryImagesByGalleryWithServiceResponseAsync(final String resourceGroupName, final String galleryName) { + return listGalleryImagesByGallerySinglePageAsync(resourceGroupName, galleryName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listGalleryImagesByGalleryNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List gallery images under a gallery. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GalleryImageInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGalleryImagesByGallerySinglePageAsync(final String resourceGroupName, final String galleryName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.listGalleryImagesByGallery(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGalleryImagesByGalleryDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGalleryImagesByGalleryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List gallery images under a gallery. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GalleryImageInner> object if successful. + */ + public PagedList listGalleryImagesByGalleryNext(final String nextPageLink) { + ServiceResponse> response = listGalleryImagesByGalleryNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listGalleryImagesByGalleryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List gallery images under a gallery. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listGalleryImagesByGalleryNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGalleryImagesByGalleryNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGalleryImagesByGalleryNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List gallery images under a gallery. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryImageInner> object + */ + public Observable> listGalleryImagesByGalleryNextAsync(final String nextPageLink) { + return listGalleryImagesByGalleryNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List gallery images under a gallery. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GalleryImageInner> object + */ + public Observable>> listGalleryImagesByGalleryNextWithServiceResponseAsync(final String nextPageLink) { + return listGalleryImagesByGalleryNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listGalleryImagesByGalleryNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List gallery images under a gallery. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GalleryImageInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listGalleryImagesByGalleryNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listGalleryImagesByGalleryNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGalleryImagesByGalleryNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGalleryImagesByGalleryNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryInner.java new file mode 100644 index 00000000000..5f8447b3066 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GalleryInner.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.GalleryIdentifier; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Specifies information about the gallery that you want to create or update. + */ +@JsonFlatten +public class GalleryInner extends Resource { + /** + * The description of this gallery resource. + */ + @JsonProperty(value = "properties.description") + private String description; + + /** + * The identifier property. + */ + @JsonProperty(value = "properties.identifier") + private GalleryIdentifier identifier; + + /** + * The current state of the gallery. + * The provisioning state, which only appears in the response. Possible + * values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + * 'Deleting', 'Migrating'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Get the description value. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description value. + * + * @param description the description value to set + * @return the GalleryInner object itself. + */ + public GalleryInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the identifier value. + * + * @return the identifier value + */ + public GalleryIdentifier identifier() { + return this.identifier; + } + + /** + * Set the identifier value. + * + * @param identifier the identifier value to set + * @return the GalleryInner object itself. + */ + public GalleryInner withIdentifier(GalleryIdentifier identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GallerysInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GallerysInner.java new file mode 100644 index 00000000000..1a202640638 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/GallerysInner.java @@ -0,0 +1,661 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Gallerys. + */ +public class GallerysInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private GallerysService service; + /** The service client containing this operation class. */ + private ComputeManagementClientImpl client; + + /** + * Initializes an instance of GallerysInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public GallerysInner(Retrofit retrofit, ComputeManagementClientImpl client) { + this.service = retrofit.create(GallerysService.class); + this.client = client; + } + + /** + * The interface defining all the services for Gallerys to be + * used by Retrofit to perform actually REST calls. + */ + interface GallerysService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Gallerys createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Query("api-version") String apiVersion, @Body GalleryInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Gallerys beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Query("api-version") String apiVersion, @Body GalleryInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Gallerys getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Gallerys delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Gallerys beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Gallerys listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Gallerys list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param parameters Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryInner object if successful. + */ + public GalleryInner createOrUpdate(String resourceGroupName, String galleryName, GalleryInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, parameters).toBlocking().last().body(); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param parameters Parameters supplied to the create or update gallery operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, parameters), serviceCallback); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param parameters Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, parameters).map(new Func1, GalleryInner>() { + @Override + public GalleryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param parameters Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, GalleryInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-06-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param parameters Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryInner object if successful. + */ + public GalleryInner beginCreateOrUpdate(String resourceGroupName, String galleryName, GalleryInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, parameters).toBlocking().single().body(); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param parameters Parameters supplied to the create or update gallery operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, parameters), serviceCallback); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param parameters Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, GalleryInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, parameters).map(new Func1, GalleryInner>() { + @Override + public GalleryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param parameters Parameters supplied to the create or update gallery operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, GalleryInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-06-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves information about a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the GalleryInner object if successful. + */ + public GalleryInner getByResourceGroup(String resourceGroupName, String galleryName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, galleryName).toBlocking().single().body(); + } + + /** + * Retrieves information about a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String galleryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, galleryName), serviceCallback); + } + + /** + * Retrieves information about a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String galleryName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, galleryName).map(new Func1, GalleryInner>() { + @Override + public GalleryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves information about a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the GalleryInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String galleryName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String galleryName) { + deleteWithServiceResponseAsync(resourceGroupName, galleryName).toBlocking().last().body(); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String galleryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, galleryName), serviceCallback); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String galleryName) { + return deleteWithServiceResponseAsync(resourceGroupName, galleryName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String galleryName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String galleryName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName).toBlocking().single().body(); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String galleryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName), serviceCallback); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String galleryName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a gallery. + * + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the gallery. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String galleryName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (galleryName == null) { + throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List galleries under a resource group. + * + * @param resourceGroupName The name of the resource group. + * @return the PagedList object if successful. + */ + public PagedList listByResourceGroup(String resourceGroupName) { + PageImpl page = new PageImpl<>(); + page.setItems(listByResourceGroupWithServiceResponseAsync(resourceGroupName).toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * List galleries under a resource group. + * + * @param resourceGroupName The name of the resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(String resourceGroupName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByResourceGroupWithServiceResponseAsync(resourceGroupName), serviceCallback); + } + + /** + * List galleries under a resource group. + * + * @param resourceGroupName The name of the resource group. + * @return the observable to the List<GalleryInner> object + */ + public Observable> listByResourceGroupAsync(String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl page = new PageImpl<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * List galleries under a resource group. + * + * @param resourceGroupName The name of the resource group. + * @return the observable to the List<GalleryInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List galleries under a subscription. + * + * @return the PagedList object if successful. + */ + public PagedList list() { + PageImpl page = new PageImpl<>(); + page.setItems(listWithServiceResponseAsync().toBlocking().single().body()); + page.setNextPageLink(null); + return new PagedList(page) { + @Override + public Page nextPage(String nextPageLink) { + return null; + } + }; + } + + /** + * List galleries under a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); + } + + /** + * List galleries under a subscription. + * + * @return the observable to the List<GalleryInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync().map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + PageImpl page = new PageImpl<>(); + page.setItems(response.body()); + return page; + } + }); + } + + /** + * List galleries under a subscription. + * + * @return the observable to the List<GalleryInner> object + */ + public Observable>> listWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageInner.java index 4662339b5ed..bf47794fae3 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageInner.java @@ -40,7 +40,7 @@ public class ImageInner extends Resource { private String provisioningState; /** - * Get the sourceVirtualMachine value. + * Get the source virtual machine from which Image is created. * * @return the sourceVirtualMachine value */ @@ -49,7 +49,7 @@ public SubResource sourceVirtualMachine() { } /** - * Set the sourceVirtualMachine value. + * Set the source virtual machine from which Image is created. * * @param sourceVirtualMachine the sourceVirtualMachine value to set * @return the ImageInner object itself. @@ -60,7 +60,7 @@ public ImageInner withSourceVirtualMachine(SubResource sourceVirtualMachine) { } /** - * Get the storageProfile value. + * Get specifies the storage settings for the virtual machine disks. * * @return the storageProfile value */ @@ -69,7 +69,7 @@ public ImageStorageProfile storageProfile() { } /** - * Set the storageProfile value. + * Set specifies the storage settings for the virtual machine disks. * * @param storageProfile the storageProfile value to set * @return the ImageInner object itself. @@ -80,7 +80,7 @@ public ImageInner withStorageProfile(ImageStorageProfile storageProfile) { } /** - * Get the provisioningState value. + * Get the provisioning state. * * @return the provisioningState value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageReferenceInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageReferenceInner.java index 7ec601feaac..5fcf2ffcb0e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageReferenceInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageReferenceInner.java @@ -50,7 +50,7 @@ public class ImageReferenceInner extends SubResource { private String version; /** - * Get the publisher value. + * Get the image publisher. * * @return the publisher value */ @@ -59,7 +59,7 @@ public String publisher() { } /** - * Set the publisher value. + * Set the image publisher. * * @param publisher the publisher value to set * @return the ImageReferenceInner object itself. @@ -70,7 +70,7 @@ public ImageReferenceInner withPublisher(String publisher) { } /** - * Get the offer value. + * Get specifies the offer of the platform image or marketplace image used to create the virtual machine. * * @return the offer value */ @@ -79,7 +79,7 @@ public String offer() { } /** - * Set the offer value. + * Set specifies the offer of the platform image or marketplace image used to create the virtual machine. * * @param offer the offer value to set * @return the ImageReferenceInner object itself. @@ -90,7 +90,7 @@ public ImageReferenceInner withOffer(String offer) { } /** - * Get the sku value. + * Get the image SKU. * * @return the sku value */ @@ -99,7 +99,7 @@ public String sku() { } /** - * Set the sku value. + * Set the image SKU. * * @param sku the sku value to set * @return the ImageReferenceInner object itself. @@ -110,7 +110,7 @@ public ImageReferenceInner withSku(String sku) { } /** - * Get the version value. + * Get specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. * * @return the version value */ @@ -119,7 +119,7 @@ public String version() { } /** - * Set the version value. + * Set specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. * * @param version the version value to set * @return the ImageReferenceInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageUpdateInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageUpdateInner.java new file mode 100644 index 00000000000..2c00425ba57 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageUpdateInner.java @@ -0,0 +1,89 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.compute.ImageStorageProfile; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.compute.UpdateResource; + +/** + * The source user image virtual hard disk. Only tags may be updated. + */ +@JsonFlatten +public class ImageUpdateInner extends UpdateResource { + /** + * The source virtual machine from which Image is created. + */ + @JsonProperty(value = "properties.sourceVirtualMachine") + private SubResource sourceVirtualMachine; + + /** + * Specifies the storage settings for the virtual machine disks. + */ + @JsonProperty(value = "properties.storageProfile") + private ImageStorageProfile storageProfile; + + /** + * The provisioning state. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Get the sourceVirtualMachine value. + * + * @return the sourceVirtualMachine value + */ + public SubResource sourceVirtualMachine() { + return this.sourceVirtualMachine; + } + + /** + * Set the sourceVirtualMachine value. + * + * @param sourceVirtualMachine the sourceVirtualMachine value to set + * @return the ImageUpdateInner object itself. + */ + public ImageUpdateInner withSourceVirtualMachine(SubResource sourceVirtualMachine) { + this.sourceVirtualMachine = sourceVirtualMachine; + return this; + } + + /** + * Get the storageProfile value. + * + * @return the storageProfile value + */ + public ImageStorageProfile storageProfile() { + return this.storageProfile; + } + + /** + * Set the storageProfile value. + * + * @param storageProfile the storageProfile value to set + * @return the ImageUpdateInner object itself. + */ + public ImageUpdateInner withStorageProfile(ImageStorageProfile storageProfile) { + this.storageProfile = storageProfile; + return this; + } + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java index 9c65769dfac..755ce287a84 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java @@ -16,6 +16,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.compute.ImageUpdate; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -30,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.PUT; import retrofit2.http.Query; @@ -42,7 +44,7 @@ * An instance of this class provides access to all the operations defined * in Images. */ -public class ImagesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class ImagesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private ImagesService service; /** The service client containing this operation class. */ @@ -72,6 +74,14 @@ interface ImagesService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("imageName") String imageName, @Path("subscriptionId") String subscriptionId, @Body ImageInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Images update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("imageName") String imageName, @Path("subscriptionId") String subscriptionId, @Body ImageUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Images beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}") + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("imageName") String imageName, @Path("subscriptionId") String subscriptionId, @Body ImageUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Images delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", method = "DELETE", hasBody = true) 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); @@ -172,7 +182,7 @@ public Observable> createOrUpdateWithServiceResponse throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -247,7 +257,7 @@ public Observable> beginCreateOrUpdateWithServiceRes throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -270,6 +280,174 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response updateAsync(String resourceGroupName, String imageName, ImageUpdate 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, ImageUpdate 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, ImageUpdate 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 = "2018-04-01"; + Observable> observable = service.update(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * 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, ImageUpdate 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, ImageUpdate 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, ImageUpdate 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, ImageUpdate 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 = "2018-04-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. * @@ -278,10 +456,9 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response deleteAsync(String resourceGroupName, String imageName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String imageName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, imageName), serviceCallback); } @@ -305,10 +482,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String imageName) { - return deleteWithServiceResponseAsync(resourceGroupName, imageName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String imageName) { + return deleteWithServiceResponseAsync(resourceGroupName, imageName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -322,7 +499,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String imageName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String imageName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -332,9 +509,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, imageName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -345,10 +522,9 @@ public Observable> deleteWithServi * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String imageName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, imageName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String imageName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, imageName).toBlocking().single().body(); } /** @@ -360,7 +536,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String imageName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String imageName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, imageName), serviceCallback); } @@ -370,12 +546,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param resourceGroupName The name of the resource group. * @param imageName The name of the image. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String imageName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, imageName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String imageName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, imageName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -387,9 +563,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String imageName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String imageName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -399,13 +575,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, imageName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -414,9 +590,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -485,7 +661,7 @@ public Observable> getByResourceGroupWithServiceResp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, imageName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -567,7 +743,7 @@ public Observable> getByResourceGroupWithServiceResp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, imageName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -680,7 +856,7 @@ public Observable>> listByResourceGroupSinglePa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -785,7 +961,7 @@ public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/InstanceViewStatusInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/InstanceViewStatusInner.java new file mode 100644 index 00000000000..eb52e5abe99 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/InstanceViewStatusInner.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.StatusLevelTypes; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Instance view status. + */ +public class InstanceViewStatusInner { + /** + * The status code. + */ + @JsonProperty(value = "code") + private String code; + + /** + * The level code. Possible values include: 'Info', 'Warning', 'Error'. + */ + @JsonProperty(value = "level") + private StatusLevelTypes level; + + /** + * The short localizable label for the status. + */ + @JsonProperty(value = "displayStatus") + private String displayStatus; + + /** + * The detailed status message, including for alerts and error messages. + */ + @JsonProperty(value = "message") + private String message; + + /** + * The time of the status. + */ + @JsonProperty(value = "time") + private DateTime time; + + /** + * Get the status code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the status code. + * + * @param code the code value to set + * @return the InstanceViewStatusInner object itself. + */ + public InstanceViewStatusInner withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the level code. Possible values include: 'Info', 'Warning', 'Error'. + * + * @return the level value + */ + public StatusLevelTypes level() { + return this.level; + } + + /** + * Set the level code. Possible values include: 'Info', 'Warning', 'Error'. + * + * @param level the level value to set + * @return the InstanceViewStatusInner object itself. + */ + public InstanceViewStatusInner withLevel(StatusLevelTypes level) { + this.level = level; + return this; + } + + /** + * Get the short localizable label for the status. + * + * @return the displayStatus value + */ + public String displayStatus() { + return this.displayStatus; + } + + /** + * Set the short localizable label for the status. + * + * @param displayStatus the displayStatus value to set + * @return the InstanceViewStatusInner object itself. + */ + public InstanceViewStatusInner withDisplayStatus(String displayStatus) { + this.displayStatus = displayStatus; + return this; + } + + /** + * Get the detailed status message, including for alerts and error messages. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the detailed status message, including for alerts and error messages. + * + * @param message the message value to set + * @return the InstanceViewStatusInner object itself. + */ + public InstanceViewStatusInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the time of the status. + * + * @return the time value + */ + public DateTime time() { + return this.time; + } + + /** + * Set the time of the status. + * + * @param time the time value to set + * @return the InstanceViewStatusInner object itself. + */ + public InstanceViewStatusInner withTime(DateTime time) { + this.time = time; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java new file mode 100644 index 00000000000..d4f5a1599a3 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java @@ -0,0 +1,384 @@ +/** + * 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.azure.management.compute.RequestRateByIntervalInput; +import com.microsoft.azure.management.compute.ThrottledRequestsInput; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +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 RequestRateByIntervalInput parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.LogAnalytics beginExportRequestRateByInterval" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval") + Observable> beginExportRequestRateByInterval(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Body RequestRateByIntervalInput parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.LogAnalytics exportThrottledRequests" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests") + Observable> exportThrottledRequests(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Body ThrottledRequestsInput parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.LogAnalytics beginExportThrottledRequests" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests") + Observable> beginExportThrottledRequests(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Body ThrottledRequestsInput 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, RequestRateByIntervalInput 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, RequestRateByIntervalInput 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, RequestRateByIntervalInput 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, RequestRateByIntervalInput 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 = "2018-04-01"; + Observable> observable = service.exportRequestRateByInterval(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * 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, RequestRateByIntervalInput 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, RequestRateByIntervalInput 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, RequestRateByIntervalInput 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, RequestRateByIntervalInput 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 = "2018-04-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, ThrottledRequestsInput 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, ThrottledRequestsInput 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, ThrottledRequestsInput 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, ThrottledRequestsInput 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 = "2018-04-01"; + Observable> observable = service.exportThrottledRequests(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * 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, ThrottledRequestsInput 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, ThrottledRequestsInput 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, ThrottledRequestsInput 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, ThrottledRequestsInput 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 = "2018-04-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..46707892610 --- /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 { + /** + * LogAnalyticsOutput. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private LogAnalyticsOutput properties; + + /** + * Get logAnalyticsOutput. + * + * @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/ManagedDiskParametersInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ManagedDiskParametersInner.java index f5a1963720c..0d83f24a107 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ManagedDiskParametersInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ManagedDiskParametersInner.java @@ -25,7 +25,7 @@ public class ManagedDiskParametersInner extends SubResource { private StorageAccountTypes storageAccountType; /** - * Get the storageAccountType value. + * Get specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @return the storageAccountType value */ @@ -34,7 +34,7 @@ public StorageAccountTypes storageAccountType() { } /** - * Set the storageAccountType value. + * Set specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'. * * @param storageAccountType the storageAccountType value to set * @return the ManagedDiskParametersInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/NetworkInterfaceReferenceInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/NetworkInterfaceReferenceInner.java index 72874d16db3..08da4736f4f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/NetworkInterfaceReferenceInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/NetworkInterfaceReferenceInner.java @@ -25,7 +25,7 @@ public class NetworkInterfaceReferenceInner extends SubResource { private Boolean primary; /** - * Get the primary value. + * Get specifies the primary network interface in case the virtual machine has more than 1 network interface. * * @return the primary value */ @@ -34,7 +34,7 @@ public Boolean primary() { } /** - * Set the primary value. + * Set specifies the primary network interface in case the virtual machine has more than 1 network interface. * * @param primary the primary value to set * @return the NetworkInterfaceReferenceInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java new file mode 100644 index 00000000000..88d162435d5 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java @@ -0,0 +1,132 @@ +/** + * 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 = "2018-04-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); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException { + 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..76acea3a38f --- /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 whether the recovery walk was performed. + * + * @return the walkPerformed value + */ + public Boolean walkPerformed() { + return this.walkPerformed; + } + + /** + * Get the next update domain that needs to be walked. Null means walk spanning all update domains has been completed. + * + * @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/ResourceSkuInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ResourceSkuInner.java index 7635321cb74..3227cb45746 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ResourceSkuInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ResourceSkuInner.java @@ -103,7 +103,7 @@ public class ResourceSkuInner { private List restrictions; /** - * Get the resourceType value. + * Get the type of resource the SKU applies to. * * @return the resourceType value */ @@ -112,7 +112,7 @@ public String resourceType() { } /** - * Get the name value. + * Get the name of SKU. * * @return the name value */ @@ -121,7 +121,7 @@ public String name() { } /** - * Get the tier value. + * Get specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**. * * @return the tier value */ @@ -130,7 +130,7 @@ public String tier() { } /** - * Get the size value. + * Get the Size of the SKU. * * @return the size value */ @@ -139,7 +139,7 @@ public String size() { } /** - * Get the family value. + * Get the Family of this particular SKU. * * @return the family value */ @@ -148,7 +148,7 @@ public String family() { } /** - * Get the kind value. + * Get the Kind of resources that are supported in this SKU. * * @return the kind value */ @@ -157,7 +157,7 @@ public String kind() { } /** - * Get the capacity value. + * Get specifies the number of virtual machines in the scale set. * * @return the capacity value */ @@ -166,7 +166,7 @@ public ResourceSkuCapacity capacity() { } /** - * Get the locations value. + * Get the set of locations that the SKU is available. * * @return the locations value */ @@ -175,7 +175,7 @@ public List locations() { } /** - * Get the locationInfo value. + * Get a list of locations and availability zones in those locations where the SKU is available. * * @return the locationInfo value */ @@ -184,7 +184,7 @@ public List locationInfo() { } /** - * Get the apiVersions value. + * Get the api versions that support this SKU. * * @return the apiVersions value */ @@ -193,7 +193,7 @@ public List apiVersions() { } /** - * Get the costs value. + * Get metadata for retrieving price info. * * @return the costs value */ @@ -202,7 +202,7 @@ public List costs() { } /** - * Get the capabilities value. + * Get a name value pair to describe the capability. * * @return the capabilities value */ @@ -211,7 +211,7 @@ public List capabilities() { } /** - * Get the restrictions value. + * Get the restrictions because of which SKU cannot be used. This is empty if there are no restrictions. * * @return the restrictions value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RollingUpgradeStatusInfoInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RollingUpgradeStatusInfoInner.java index 433da4122a0..4e401fe7757 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RollingUpgradeStatusInfoInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RollingUpgradeStatusInfoInner.java @@ -47,7 +47,7 @@ public class RollingUpgradeStatusInfoInner extends Resource { private ApiError error; /** - * Get the policy value. + * Get the rolling upgrade policies applied for this upgrade. * * @return the policy value */ @@ -56,7 +56,7 @@ public RollingUpgradePolicy policy() { } /** - * Get the runningStatus value. + * Get information about the current running state of the overall upgrade. * * @return the runningStatus value */ @@ -65,7 +65,7 @@ public RollingUpgradeRunningStatus runningStatus() { } /** - * Get the progress value. + * Get information about the number of virtual machine instances in each upgrade state. * * @return the progress value */ @@ -74,7 +74,7 @@ public RollingUpgradeProgressInfo progress() { } /** - * Get the error value. + * Get error details for this upgrade, if there are any. * * @return the error value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RunCommandDocumentBaseInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RunCommandDocumentBaseInner.java index 80c586b0cfd..d5261f10412 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RunCommandDocumentBaseInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RunCommandDocumentBaseInner.java @@ -46,7 +46,7 @@ public class RunCommandDocumentBaseInner { private String description; /** - * Get the schema value. + * Get the VM run command schema. * * @return the schema value */ @@ -55,7 +55,7 @@ public String schema() { } /** - * Set the schema value. + * Set the VM run command schema. * * @param schema the schema value to set * @return the RunCommandDocumentBaseInner object itself. @@ -66,7 +66,7 @@ public RunCommandDocumentBaseInner withSchema(String schema) { } /** - * Get the id value. + * Get the VM run command id. * * @return the id value */ @@ -75,7 +75,7 @@ public String id() { } /** - * Set the id value. + * Set the VM run command id. * * @param id the id value to set * @return the RunCommandDocumentBaseInner object itself. @@ -86,7 +86,7 @@ public RunCommandDocumentBaseInner withId(String id) { } /** - * Get the osType value. + * Get the Operating System type. Possible values include: 'Windows', 'Linux'. * * @return the osType value */ @@ -95,7 +95,7 @@ public OperatingSystemTypes osType() { } /** - * Set the osType value. + * Set the Operating System type. Possible values include: 'Windows', 'Linux'. * * @param osType the osType value to set * @return the RunCommandDocumentBaseInner object itself. @@ -106,7 +106,7 @@ public RunCommandDocumentBaseInner withOsType(OperatingSystemTypes osType) { } /** - * Get the label value. + * Get the VM run command label. * * @return the label value */ @@ -115,7 +115,7 @@ public String label() { } /** - * Set the label value. + * Set the VM run command label. * * @param label the label value to set * @return the RunCommandDocumentBaseInner object itself. @@ -126,7 +126,7 @@ public RunCommandDocumentBaseInner withLabel(String label) { } /** - * Get the description value. + * Get the VM run command description. * * @return the description value */ @@ -135,7 +135,7 @@ public String description() { } /** - * Set the description value. + * Set the VM run command description. * * @param description the description value to set * @return the RunCommandDocumentBaseInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RunCommandDocumentInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RunCommandDocumentInner.java index c7c5af6f28e..a8b06b0d60d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RunCommandDocumentInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/RunCommandDocumentInner.java @@ -29,7 +29,7 @@ public class RunCommandDocumentInner extends RunCommandDocumentBaseInner { private List parameters; /** - * Get the script value. + * Get the script to be executed. * * @return the script value */ @@ -38,7 +38,7 @@ public List script() { } /** - * Set the script value. + * Set the script to be executed. * * @param script the script value to set * @return the RunCommandDocumentInner object itself. @@ -49,7 +49,7 @@ public RunCommandDocumentInner withScript(List script) { } /** - * Get the parameters value. + * Get the parameters used by the script. * * @return the parameters value */ @@ -58,7 +58,7 @@ public List parameters() { } /** - * Set the parameters value. + * Set the parameters used by the script. * * @param parameters the parameters value to set * @return the RunCommandDocumentInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java index ddc0ed006e4..8fb631216b3 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotInner.java @@ -8,7 +8,7 @@ package com.microsoft.azure.management.compute.implementation; -import com.microsoft.azure.management.compute.DiskSku; +import com.microsoft.azure.management.compute.SnapshotSku; import org.joda.time.DateTime; import com.microsoft.azure.management.compute.OperatingSystemTypes; import com.microsoft.azure.management.compute.CreationData; @@ -32,7 +32,7 @@ public class SnapshotInner extends Resource { * The sku property. */ @JsonProperty(value = "sku") - private DiskSku sku; + private SnapshotSku sku; /** * The time when the disk was created. @@ -76,7 +76,7 @@ public class SnapshotInner extends Resource { private String provisioningState; /** - * Get the managedBy value. + * Get unused. Always Null. * * @return the managedBy value */ @@ -89,7 +89,7 @@ public String managedBy() { * * @return the sku value */ - public DiskSku sku() { + public SnapshotSku sku() { return this.sku; } @@ -99,13 +99,13 @@ public DiskSku sku() { * @param sku the sku value to set * @return the SnapshotInner object itself. */ - public SnapshotInner withSku(DiskSku sku) { + public SnapshotInner withSku(SnapshotSku sku) { this.sku = sku; return this; } /** - * Get the timeCreated value. + * Get the time when the disk was created. * * @return the timeCreated value */ @@ -114,7 +114,7 @@ public DateTime timeCreated() { } /** - * Get the osType value. + * Get the Operating System type. Possible values include: 'Windows', 'Linux'. * * @return the osType value */ @@ -123,7 +123,7 @@ public OperatingSystemTypes osType() { } /** - * Set the osType value. + * Set the Operating System type. Possible values include: 'Windows', 'Linux'. * * @param osType the osType value to set * @return the SnapshotInner object itself. @@ -134,7 +134,7 @@ public SnapshotInner withOsType(OperatingSystemTypes osType) { } /** - * Get the creationData value. + * Get disk source information. CreationData information cannot be changed after the disk has been created. * * @return the creationData value */ @@ -143,7 +143,7 @@ public CreationData creationData() { } /** - * Set the creationData value. + * Set disk source information. CreationData information cannot be changed after the disk has been created. * * @param creationData the creationData value to set * @return the SnapshotInner object itself. @@ -154,7 +154,7 @@ public SnapshotInner withCreationData(CreationData creationData) { } /** - * Get the diskSizeGB value. + * Get if creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. * * @return the diskSizeGB value */ @@ -163,7 +163,7 @@ public Integer diskSizeGB() { } /** - * Set the diskSizeGB value. + * Set if creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. * * @param diskSizeGB the diskSizeGB value to set * @return the SnapshotInner object itself. @@ -174,7 +174,7 @@ public SnapshotInner withDiskSizeGB(Integer diskSizeGB) { } /** - * Get the encryptionSettings value. + * Get encryption settings for disk or snapshot. * * @return the encryptionSettings value */ @@ -183,7 +183,7 @@ public EncryptionSettings encryptionSettings() { } /** - * Set the encryptionSettings value. + * Set encryption settings for disk or snapshot. * * @param encryptionSettings the encryptionSettings value to set * @return the SnapshotInner object itself. @@ -194,7 +194,7 @@ public SnapshotInner withEncryptionSettings(EncryptionSettings encryptionSetting } /** - * Get the provisioningState value. + * Get the disk provisioning state. * * @return the provisioningState value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java index 160d3e70deb..c2cf34357fc 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java @@ -16,6 +16,8 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.compute.GrantAccessData; +import com.microsoft.azure.management.compute.SnapshotUpdate; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -44,7 +46,7 @@ * An instance of this class provides access to all the operations defined * in Snapshots. */ -public class SnapshotsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class SnapshotsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private SnapshotsService service; /** The service client containing this operation class. */ @@ -76,11 +78,11 @@ interface SnapshotsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Snapshots update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}") - Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("snapshotName") String snapshotName, @Query("api-version") String apiVersion, @Body SnapshotUpdateInner snapshot, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("snapshotName") String snapshotName, @Query("api-version") String apiVersion, @Body SnapshotUpdate snapshot, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Snapshots beginUpdate" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}") - Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("snapshotName") String snapshotName, @Query("api-version") String apiVersion, @Body SnapshotUpdateInner snapshot, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("snapshotName") String snapshotName, @Query("api-version") String apiVersion, @Body SnapshotUpdate snapshot, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Snapshots getByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}") @@ -104,11 +106,11 @@ interface SnapshotsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Snapshots grantAccess" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess") - Observable> grantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("snapshotName") String snapshotName, @Query("api-version") String apiVersion, @Body GrantAccessDataInner grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> grantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("snapshotName") String snapshotName, @Query("api-version") String apiVersion, @Body GrantAccessData grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Snapshots beginGrantAccess" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess") - Observable> beginGrantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("snapshotName") String snapshotName, @Query("api-version") String apiVersion, @Body GrantAccessDataInner grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginGrantAccess(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("snapshotName") String snapshotName, @Query("api-version") String apiVersion, @Body GrantAccessData grantAccessData, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.Snapshots revokeAccess" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess") @@ -132,7 +134,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 +149,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 +163,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 +181,7 @@ public SnapshotInner call(ServiceResponse response) { * Creates or updates a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request @@ -198,7 +200,7 @@ public Observable> createOrUpdateWithServiceRespo throw new IllegalArgumentException("Parameter snapshot is required and cannot be null."); } Validator.validate(snapshot); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -207,7 +209,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 +224,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 +238,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 +256,7 @@ public SnapshotInner call(ServiceResponse response) { * Creates or updates a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SnapshotInner object @@ -273,7 +275,7 @@ public Observable> beginCreateOrUpdateWithService throw new IllegalArgumentException("Parameter snapshot is required and cannot be null."); } Validator.validate(snapshot); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -300,14 +302,14 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response updateAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String snapshotName, SnapshotUpdate snapshot, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot), serviceCallback); } @@ -329,12 +331,12 @@ public ServiceFuture 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 */ - public Observable updateAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot) { + public Observable updateAsync(String resourceGroupName, String snapshotName, SnapshotUpdate snapshot) { return updateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot).map(new Func1, SnapshotInner>() { @Override public SnapshotInner call(ServiceResponse response) { @@ -347,12 +349,12 @@ 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 */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String snapshotName, SnapshotUpdate snapshot) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -366,7 +368,7 @@ public Observable> updateWithServiceResponseAsync throw new IllegalArgumentException("Parameter snapshot is required and cannot be null."); } Validator.validate(snapshot); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -375,14 +377,14 @@ 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 * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SnapshotInner object if successful. */ - public SnapshotInner beginUpdate(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot) { + public SnapshotInner beginUpdate(String resourceGroupName, String snapshotName, SnapshotUpdate snapshot) { return beginUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot).toBlocking().single().body(); } @@ -390,13 +392,13 @@ 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 * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot, final ServiceCallback serviceCallback) { + public ServiceFuture beginUpdateAsync(String resourceGroupName, String snapshotName, SnapshotUpdate snapshot, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot), serviceCallback); } @@ -404,12 +406,12 @@ 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 */ - public Observable beginUpdateAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot) { + public Observable beginUpdateAsync(String resourceGroupName, String snapshotName, SnapshotUpdate snapshot) { return beginUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot).map(new Func1, SnapshotInner>() { @Override public SnapshotInner call(ServiceResponse response) { @@ -422,12 +424,12 @@ 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 */ - public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot) { + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String snapshotName, SnapshotUpdate snapshot) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -441,7 +443,7 @@ public Observable> beginUpdateWithServiceResponse throw new IllegalArgumentException("Parameter snapshot is required and cannot be null."); } Validator.validate(snapshot); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -468,7 +470,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 +514,7 @@ public SnapshotInner call(ServiceResponse response) { * Gets information about a snapshot. * * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot within the given subscription and resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SnapshotInner object */ @@ -526,7 +528,7 @@ public Observable> getByResourceGroupWithServiceR if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -552,26 +554,25 @@ private ServiceResponse getByResourceGroupDelegate(Response deleteAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); } @@ -579,14 +580,14 @@ public ServiceFuture 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 */ - public Observable deleteAsync(String resourceGroupName, String snapshotName) { - return deleteWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String snapshotName) { + return deleteWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -596,11 +597,11 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -610,35 +611,34 @@ public Observable> deleteWithServi if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * 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 - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String snapshotName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String snapshotName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().single().body(); } /** * 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 */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); } @@ -646,14 +646,14 @@ 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 + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String snapshotName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String snapshotName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -663,11 +663,11 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -677,13 +677,13 @@ public Observable> beginDeleteWith if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginDelete(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -692,9 +692,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -792,7 +792,7 @@ public Observable>> listByResourceGroupSingl if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -897,7 +897,7 @@ public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -923,14 +923,14 @@ private ServiceResponse> listDelegate(Response grantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData, final ServiceCallback serviceCallback) { + public ServiceFuture grantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(grantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAccessData), serviceCallback); } @@ -952,12 +952,12 @@ public ServiceFuture 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 */ - public Observable grantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData) { + public Observable grantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData) { return grantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAccessData).map(new Func1, AccessUriInner>() { @Override public AccessUriInner call(ServiceResponse response) { @@ -970,12 +970,12 @@ 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 */ - public Observable> grantAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData) { + public Observable> grantAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -989,7 +989,7 @@ public Observable> grantAccessWithServiceRespons throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.grantAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -998,14 +998,14 @@ 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 * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the AccessUriInner object if successful. */ - public AccessUriInner beginGrantAccess(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData) { + public AccessUriInner beginGrantAccess(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData) { return beginGrantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAccessData).toBlocking().single().body(); } @@ -1013,13 +1013,13 @@ 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 * @return the {@link ServiceFuture} object */ - public ServiceFuture beginGrantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData, final ServiceCallback serviceCallback) { + public ServiceFuture beginGrantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginGrantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAccessData), serviceCallback); } @@ -1027,12 +1027,12 @@ 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 */ - public Observable beginGrantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData) { + public Observable beginGrantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData) { return beginGrantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAccessData).map(new Func1, AccessUriInner>() { @Override public AccessUriInner call(ServiceResponse response) { @@ -1045,12 +1045,12 @@ 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 */ - public Observable> beginGrantAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData) { + public Observable> beginGrantAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1064,7 +1064,7 @@ public Observable> beginGrantAccessWithServiceRe throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginGrantAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1091,26 +1091,25 @@ private ServiceResponse beginGrantAccessDelegate(Response revokeAccessAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { + public ServiceFuture revokeAccessAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(revokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); } @@ -1118,14 +1117,14 @@ public ServiceFuture 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 */ - public Observable revokeAccessAsync(String resourceGroupName, String snapshotName) { - return revokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, OperationStatusResponseInner>() { + public Observable revokeAccessAsync(String resourceGroupName, String snapshotName) { + return revokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1135,11 +1134,11 @@ public OperationStatusResponseInner call(ServiceResponse> revokeAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> revokeAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1149,35 +1148,34 @@ public Observable> revokeAccessWit if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; Observable> observable = service.revokeAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * 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 - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRevokeAccess(String resourceGroupName, String snapshotName) { - return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().single().body(); + public void beginRevokeAccess(String resourceGroupName, String snapshotName) { + beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().single().body(); } /** * 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 */ - public ServiceFuture beginRevokeAccessAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRevokeAccessAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); } @@ -1185,14 +1183,14 @@ 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 + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRevokeAccessAsync(String resourceGroupName, String snapshotName) { - return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRevokeAccessAsync(String resourceGroupName, String snapshotName) { + return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1202,11 +1200,11 @@ public OperationStatusResponseInner call(ServiceResponse> beginRevokeAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> beginRevokeAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1216,13 +1214,13 @@ public Observable> beginRevokeAcce if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.beginRevokeAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRevokeAccessDelegate(response); + ServiceResponse clientResponse = beginRevokeAccessDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1231,9 +1229,9 @@ public Observable> call(Response beginRevokeAccessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRevokeAccessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ThrottledRequestsInputInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ThrottledRequestsInputInner.java new file mode 100644 index 00000000000..34a71d127f5 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ThrottledRequestsInputInner.java @@ -0,0 +1,17 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.LogAnalyticsInputBase; + +/** + * Api request input for LogAnalytics getThrottledRequests Api. + */ +public class ThrottledRequestsInputInner extends LogAnalyticsInputBase { +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UpgradeOperationHistoricalStatusInfoInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UpgradeOperationHistoricalStatusInfoInner.java new file mode 100644 index 00000000000..b828db2abc1 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UpgradeOperationHistoricalStatusInfoInner.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.UpgradeOperationHistoricalStatusInfoProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Virtual Machine Scale Set OS Upgrade History operation response. + */ +public class UpgradeOperationHistoricalStatusInfoInner { + /** + * Information about the properties of the upgrade operation. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private UpgradeOperationHistoricalStatusInfoProperties properties; + + /** + * Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Resource location. + */ + @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) + private String location; + + /** + * Get information about the properties of the upgrade operation. + * + * @return the properties value + */ + public UpgradeOperationHistoricalStatusInfoProperties properties() { + return this.properties; + } + + /** + * Get resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get resource location. + * + * @return the location value + */ + public String location() { + return this.location; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsageInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsageInner.java index 71d78eadc2a..eff6355dbf3 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsageInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsageInner.java @@ -41,13 +41,16 @@ public class UsageInner { /** * Creates an instance of UsageInner class. + * @param currentValue the current usage of the resource. + * @param limit the maximum permitted usage of the resource. + * @param name the name of the type of usage. */ public UsageInner() { unit = "Count"; } /** - * Get the unit value. + * Get an enum describing the unit of usage measurement. * * @return the unit value */ @@ -56,7 +59,7 @@ public String unit() { } /** - * Set the unit value. + * Set an enum describing the unit of usage measurement. * * @param unit the unit value to set * @return the UsageInner object itself. @@ -67,7 +70,7 @@ public UsageInner withUnit(String unit) { } /** - * Get the currentValue value. + * Get the current usage of the resource. * * @return the currentValue value */ @@ -76,7 +79,7 @@ public int currentValue() { } /** - * Set the currentValue value. + * Set the current usage of the resource. * * @param currentValue the currentValue value to set * @return the UsageInner object itself. @@ -87,7 +90,7 @@ public UsageInner withCurrentValue(int currentValue) { } /** - * Get the limit value. + * Get the maximum permitted usage of the resource. * * @return the limit value */ @@ -96,7 +99,7 @@ public long limit() { } /** - * Set the limit value. + * Set the maximum permitted usage of the resource. * * @param limit the limit value to set * @return the UsageInner object itself. @@ -107,7 +110,7 @@ public UsageInner withLimit(long limit) { } /** - * Get the name value. + * Get the name of the type of usage. * * @return the name value */ @@ -116,7 +119,7 @@ public UsageName name() { } /** - * Set the name value. + * Set the name of the type of usage. * * @param name the name value to set * @return the UsageInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java index c3d91764761..aaeba3646e9 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java @@ -157,7 +157,7 @@ public Observable>> listSinglePageAsync(final S if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineCaptureResultInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineCaptureResultInner.java index fc79bfbd422..6c6dc22ec15 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineCaptureResultInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineCaptureResultInner.java @@ -8,39 +8,72 @@ package com.microsoft.azure.management.compute.implementation; +import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.SubResource; /** - * Resource Id. + * Output of virtual machine capture operation. */ -@JsonFlatten public class VirtualMachineCaptureResultInner extends SubResource { /** - * Operation output data (raw JSON). + * the schema of the captured virtual machine. */ - @JsonProperty(value = "properties.output") - private Object output; + @JsonProperty(value = "$schema", access = JsonProperty.Access.WRITE_ONLY) + private String schema; /** - * Get the output value. + * the version of the content. + */ + @JsonProperty(value = "contentVersion", access = JsonProperty.Access.WRITE_ONLY) + private String contentVersion; + + /** + * parameters of the captured virtual machine. + */ + @JsonProperty(value = "parameters", access = JsonProperty.Access.WRITE_ONLY) + private Object parameters; + + /** + * a list of resource items of the captured virtual machine. + */ + @JsonProperty(value = "resources", access = JsonProperty.Access.WRITE_ONLY) + private List resources; + + /** + * Get the schema of the captured virtual machine. + * + * @return the schema value + */ + public String schema() { + return this.schema; + } + + /** + * Get the version of the content. + * + * @return the contentVersion value + */ + public String contentVersion() { + return this.contentVersion; + } + + /** + * Get parameters of the captured virtual machine. * - * @return the output value + * @return the parameters value */ - public Object output() { - return this.output; + public Object parameters() { + return this.parameters; } /** - * Set the output value. + * Get a list of resource items of the captured virtual machine. * - * @param output the output value to set - * @return the VirtualMachineCaptureResultInner object itself. + * @return the resources value */ - public VirtualMachineCaptureResultInner withOutput(Object output) { - this.output = output; - return this; + public List resources() { + return this.resources; } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageInner.java index b673c7d5771..01d3ca4e013 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageInner.java @@ -52,7 +52,7 @@ public class VirtualMachineExtensionImageInner extends Resource { private Boolean supportsMultipleExtensions; /** - * Get the operatingSystem value. + * Get the operating system this extension supports. * * @return the operatingSystem value */ @@ -61,7 +61,7 @@ public String operatingSystem() { } /** - * Set the operatingSystem value. + * Set the operating system this extension supports. * * @param operatingSystem the operatingSystem value to set * @return the VirtualMachineExtensionImageInner object itself. @@ -72,7 +72,7 @@ public VirtualMachineExtensionImageInner withOperatingSystem(String operatingSys } /** - * Get the computeRole value. + * Get the type of role (IaaS or PaaS) this extension supports. * * @return the computeRole value */ @@ -81,7 +81,7 @@ public String computeRole() { } /** - * Set the computeRole value. + * Set the type of role (IaaS or PaaS) this extension supports. * * @param computeRole the computeRole value to set * @return the VirtualMachineExtensionImageInner object itself. @@ -92,7 +92,7 @@ public VirtualMachineExtensionImageInner withComputeRole(String computeRole) { } /** - * Get the handlerSchema value. + * Get the schema defined by publisher, where extension consumers should provide settings in a matching schema. * * @return the handlerSchema value */ @@ -101,7 +101,7 @@ public String handlerSchema() { } /** - * Set the handlerSchema value. + * Set the schema defined by publisher, where extension consumers should provide settings in a matching schema. * * @param handlerSchema the handlerSchema value to set * @return the VirtualMachineExtensionImageInner object itself. @@ -112,7 +112,7 @@ public VirtualMachineExtensionImageInner withHandlerSchema(String handlerSchema) } /** - * Get the vmScaleSetEnabled value. + * Get whether the extension can be used on xRP VMScaleSets. By default existing extensions are usable on scalesets, but there might be cases where a publisher wants to explicitly indicate the extension is only enabled for CRP VMs but not VMSS. * * @return the vmScaleSetEnabled value */ @@ -121,7 +121,7 @@ public Boolean vmScaleSetEnabled() { } /** - * Set the vmScaleSetEnabled value. + * Set whether the extension can be used on xRP VMScaleSets. By default existing extensions are usable on scalesets, but there might be cases where a publisher wants to explicitly indicate the extension is only enabled for CRP VMs but not VMSS. * * @param vmScaleSetEnabled the vmScaleSetEnabled value to set * @return the VirtualMachineExtensionImageInner object itself. @@ -132,7 +132,7 @@ public VirtualMachineExtensionImageInner withVmScaleSetEnabled(Boolean vmScaleSe } /** - * Get the supportsMultipleExtensions value. + * Get whether the handler can support multiple extensions. * * @return the supportsMultipleExtensions value */ @@ -141,7 +141,7 @@ public Boolean supportsMultipleExtensions() { } /** - * Set the supportsMultipleExtensions value. + * Set whether the handler can support multiple extensions. * * @param supportsMultipleExtensions the supportsMultipleExtensions value to set * @return the VirtualMachineExtensionImageInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java index 821c88e1a11..1d1bb26c2a5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java @@ -142,7 +142,7 @@ public Observable> getWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(location, publisherName, type, version, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -226,7 +226,7 @@ public Observable>> list if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listTypes(location, publisherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -317,7 +317,7 @@ public Observable>> list if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String filter = null; final Integer top = null; final String orderby = null; @@ -416,7 +416,7 @@ public Observable>> list if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listVersions(location, publisherName, type, this.client.subscriptionId(), filter, top, orderby, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionInner.java index 10a9b16caa9..f8871c56081 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionInner.java @@ -79,7 +79,7 @@ public class VirtualMachineExtensionInner extends Resource { private VirtualMachineExtensionInstanceView instanceView; /** - * Get the forceUpdateTag value. + * Get how the extension handler should be forced to update even if the extension configuration has not changed. * * @return the forceUpdateTag value */ @@ -88,7 +88,7 @@ public String forceUpdateTag() { } /** - * Set the forceUpdateTag value. + * Set how the extension handler should be forced to update even if the extension configuration has not changed. * * @param forceUpdateTag the forceUpdateTag value to set * @return the VirtualMachineExtensionInner object itself. @@ -99,7 +99,7 @@ public VirtualMachineExtensionInner withForceUpdateTag(String forceUpdateTag) { } /** - * Get the publisher value. + * Get the name of the extension handler publisher. * * @return the publisher value */ @@ -108,7 +108,7 @@ public String publisher() { } /** - * Set the publisher value. + * Set the name of the extension handler publisher. * * @param publisher the publisher value to set * @return the VirtualMachineExtensionInner object itself. @@ -119,7 +119,7 @@ public VirtualMachineExtensionInner withPublisher(String publisher) { } /** - * Get the virtualMachineExtensionType value. + * Get specifies the type of the extension; an example is "CustomScriptExtension". * * @return the virtualMachineExtensionType value */ @@ -128,7 +128,7 @@ public String virtualMachineExtensionType() { } /** - * Set the virtualMachineExtensionType value. + * Set specifies the type of the extension; an example is "CustomScriptExtension". * * @param virtualMachineExtensionType the virtualMachineExtensionType value to set * @return the VirtualMachineExtensionInner object itself. @@ -139,7 +139,7 @@ public VirtualMachineExtensionInner withVirtualMachineExtensionType(String virtu } /** - * Get the typeHandlerVersion value. + * Get specifies the version of the script handler. * * @return the typeHandlerVersion value */ @@ -148,7 +148,7 @@ public String typeHandlerVersion() { } /** - * Set the typeHandlerVersion value. + * Set specifies the version of the script handler. * * @param typeHandlerVersion the typeHandlerVersion value to set * @return the VirtualMachineExtensionInner object itself. @@ -159,7 +159,7 @@ public VirtualMachineExtensionInner withTypeHandlerVersion(String typeHandlerVer } /** - * Get the autoUpgradeMinorVersion value. + * Get indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. * * @return the autoUpgradeMinorVersion value */ @@ -168,7 +168,7 @@ public Boolean autoUpgradeMinorVersion() { } /** - * Set the autoUpgradeMinorVersion value. + * Set indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. * * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set * @return the VirtualMachineExtensionInner object itself. @@ -179,7 +179,7 @@ public VirtualMachineExtensionInner withAutoUpgradeMinorVersion(Boolean autoUpgr } /** - * Get the settings value. + * Get json formatted public settings for the extension. * * @return the settings value */ @@ -188,7 +188,7 @@ public Object settings() { } /** - * Set the settings value. + * Set json formatted public settings for the extension. * * @param settings the settings value to set * @return the VirtualMachineExtensionInner object itself. @@ -199,7 +199,7 @@ public VirtualMachineExtensionInner withSettings(Object settings) { } /** - * Get the protectedSettings value. + * Get the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. * * @return the protectedSettings value */ @@ -208,7 +208,7 @@ public Object protectedSettings() { } /** - * Set the protectedSettings value. + * Set the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. * * @param protectedSettings the protectedSettings value to set * @return the VirtualMachineExtensionInner object itself. @@ -219,7 +219,7 @@ public VirtualMachineExtensionInner withProtectedSettings(Object protectedSettin } /** - * Get the provisioningState value. + * Get the provisioning state, which only appears in the response. * * @return the provisioningState value */ @@ -228,7 +228,7 @@ public String provisioningState() { } /** - * Get the instanceView value. + * Get the virtual machine extension instance view. * * @return the instanceView value */ @@ -237,7 +237,7 @@ public VirtualMachineExtensionInstanceView instanceView() { } /** - * Set the instanceView value. + * Set the virtual machine extension instance view. * * @param instanceView the instanceView value to set * @return the VirtualMachineExtensionInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionUpdateInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionUpdateInner.java new file mode 100644 index 00000000000..84ad2bf4707 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionUpdateInner.java @@ -0,0 +1,208 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.compute.UpdateResource; + +/** + * Describes a Virtual Machine Extension. + */ +@JsonFlatten +public class VirtualMachineExtensionUpdateInner extends UpdateResource { + /** + * How the extension handler should be forced to update even if the + * extension configuration has not changed. + */ + @JsonProperty(value = "properties.forceUpdateTag") + private String forceUpdateTag; + + /** + * The name of the extension handler publisher. + */ + @JsonProperty(value = "properties.publisher") + private String publisher; + + /** + * Specifies the type of the extension; an example is + * "CustomScriptExtension". + */ + @JsonProperty(value = "properties.type") + private String type; + + /** + * Specifies the version of the script handler. + */ + @JsonProperty(value = "properties.typeHandlerVersion") + private String typeHandlerVersion; + + /** + * Indicates whether the extension should use a newer minor version if one + * is available at deployment time. Once deployed, however, the extension + * will not upgrade minor versions unless redeployed, even with this + * property set to true. + */ + @JsonProperty(value = "properties.autoUpgradeMinorVersion") + private Boolean autoUpgradeMinorVersion; + + /** + * Json formatted public settings for the extension. + */ + @JsonProperty(value = "properties.settings") + private Object settings; + + /** + * The extension can contain either protectedSettings or + * protectedSettingsFromKeyVault or no protected settings at all. + */ + @JsonProperty(value = "properties.protectedSettings") + private Object protectedSettings; + + /** + * Get the forceUpdateTag value. + * + * @return the forceUpdateTag value + */ + public String forceUpdateTag() { + return this.forceUpdateTag; + } + + /** + * Set the forceUpdateTag value. + * + * @param forceUpdateTag the forceUpdateTag value to set + * @return the VirtualMachineExtensionUpdateInner object itself. + */ + public VirtualMachineExtensionUpdateInner withForceUpdateTag(String forceUpdateTag) { + this.forceUpdateTag = forceUpdateTag; + return this; + } + + /** + * Get the publisher value. + * + * @return the publisher value + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher value. + * + * @param publisher the publisher value to set + * @return the VirtualMachineExtensionUpdateInner object itself. + */ + public VirtualMachineExtensionUpdateInner withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get the type value. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the VirtualMachineExtensionUpdateInner object itself. + */ + public VirtualMachineExtensionUpdateInner withType(String type) { + this.type = type; + return this; + } + + /** + * Get the typeHandlerVersion value. + * + * @return the typeHandlerVersion value + */ + public String typeHandlerVersion() { + return this.typeHandlerVersion; + } + + /** + * Set the typeHandlerVersion value. + * + * @param typeHandlerVersion the typeHandlerVersion value to set + * @return the VirtualMachineExtensionUpdateInner object itself. + */ + public VirtualMachineExtensionUpdateInner withTypeHandlerVersion(String typeHandlerVersion) { + this.typeHandlerVersion = typeHandlerVersion; + return this; + } + + /** + * Get the autoUpgradeMinorVersion value. + * + * @return the autoUpgradeMinorVersion value + */ + public Boolean autoUpgradeMinorVersion() { + return this.autoUpgradeMinorVersion; + } + + /** + * Set the autoUpgradeMinorVersion value. + * + * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set + * @return the VirtualMachineExtensionUpdateInner object itself. + */ + public VirtualMachineExtensionUpdateInner withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { + this.autoUpgradeMinorVersion = autoUpgradeMinorVersion; + return this; + } + + /** + * Get the settings value. + * + * @return the settings value + */ + public Object settings() { + return this.settings; + } + + /** + * Set the settings value. + * + * @param settings the settings value to set + * @return the VirtualMachineExtensionUpdateInner object itself. + */ + public VirtualMachineExtensionUpdateInner withSettings(Object settings) { + this.settings = settings; + return this; + } + + /** + * Get the protectedSettings value. + * + * @return the protectedSettings value + */ + public Object protectedSettings() { + return this.protectedSettings; + } + + /** + * Set the protectedSettings value. + * + * @param protectedSettings the protectedSettings value to set + * @return the VirtualMachineExtensionUpdateInner object itself. + */ + public VirtualMachineExtensionUpdateInner withProtectedSettings(Object protectedSettings) { + this.protectedSettings = protectedSettings; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java index d305cd8be81..9ab5d94e57f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java @@ -11,6 +11,7 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.compute.VirtualMachineExtensionUpdate; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; @@ -22,6 +23,7 @@ import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; +import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -63,6 +65,14 @@ interface VirtualMachineExtensionsService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineExtensionInner extensionParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineExtensions update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineExtensionUpdate extensionParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineExtensions beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}") + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineExtensionUpdate extensionParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineExtensions delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", method = "DELETE", hasBody = true) Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -81,7 +91,7 @@ interface VirtualMachineExtensionsService { * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -97,7 +107,7 @@ public VirtualMachineExtensionInner createOrUpdate(String resourceGroupName, Str * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -112,7 +122,7 @@ public ServiceFuture createOrUpdateAsync(String re * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -131,7 +141,7 @@ public VirtualMachineExtensionInner call(ServiceResponse> createOrUpdateW throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -163,7 +173,7 @@ public Observable> createOrUpdateW * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -179,7 +189,7 @@ public VirtualMachineExtensionInner beginCreateOrUpdate(String resourceGroupName * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -194,7 +204,7 @@ public ServiceFuture beginCreateOrUpdateAsync(Stri * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be create or updated. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -213,7 +223,7 @@ public VirtualMachineExtensionInner call(ServiceResponse> beginCreateOrUp throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -259,6 +269,187 @@ private ServiceResponse beginCreateOrUpdateDelegat .build(response); } + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineExtensionInner object if successful. + */ + public VirtualMachineExtensionInner update(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters) { + return updateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).toBlocking().last().body(); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters), serviceCallback); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters) { + return updateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).map(new Func1, VirtualMachineExtensionInner>() { + @Override + public VirtualMachineExtensionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmName == null) { + throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); + } + if (vmExtensionName == null) { + throw new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (extensionParameters == null) { + throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); + } + Validator.validate(extensionParameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.update(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineExtensionInner object if successful. + */ + public VirtualMachineExtensionInner beginUpdate(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).toBlocking().single().body(); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters), serviceCallback); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).map(new Func1, VirtualMachineExtensionInner>() { + @Override + public VirtualMachineExtensionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to update the extension. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmName == null) { + throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); + } + if (vmExtensionName == null) { + throw new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (extensionParameters == null) { + throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); + } + Validator.validate(extensionParameters); + final String apiVersion = "2018-04-01"; + return service.beginUpdate(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * The operation to delete the extension. * @@ -268,10 +459,9 @@ private ServiceResponse beginCreateOrUpdateDelegat * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner delete(String resourceGroupName, String vmName, String vmExtensionName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).toBlocking().last().body(); + public void delete(String resourceGroupName, String vmName, String vmExtensionName) { + deleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).toBlocking().last().body(); } /** @@ -284,7 +474,7 @@ public OperationStatusResponseInner delete(String resourceGroupName, String vmNa * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String vmName, String vmExtensionName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String vmName, String vmExtensionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName), serviceCallback); } @@ -297,10 +487,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String vmName, String vmExtensionName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String vmName, String vmExtensionName) { + return deleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -315,7 +505,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -328,9 +518,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -342,10 +532,9 @@ public Observable> deleteWithServi * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String vmName, String vmExtensionName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String vmName, String vmExtensionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).toBlocking().single().body(); } /** @@ -358,7 +547,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmName, String vmExtensionName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmName, String vmExtensionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName), serviceCallback); } @@ -369,12 +558,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param vmName The name of the virtual machine where the extension should be deleted. * @param vmExtensionName The name of the virtual machine extension. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String vmName, String vmExtensionName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String vmName, String vmExtensionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -387,9 +576,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmName, String vmExtensionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -402,13 +591,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -417,9 +606,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -495,7 +684,7 @@ public Observable> getWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.get(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -584,7 +773,7 @@ public Observable> getWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsListResultInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsListResultInner.java new file mode 100644 index 00000000000..d7552310e2d --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsListResultInner.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The List Extension operation response. + */ +public class VirtualMachineExtensionsListResultInner { + /** + * The list of extensions. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the list of extensions. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the list of extensions. + * + * @param value the value value to set + * @return the VirtualMachineExtensionsListResultInner object itself. + */ + public VirtualMachineExtensionsListResultInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImageResourceInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImageResourceInner.java index bf9d4d0f0e9..9c18ab1e9b0 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImageResourceInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImageResourceInner.java @@ -37,7 +37,7 @@ public class VirtualMachineImageResourceInner extends SubResource { private Map tags; /** - * Get the name value. + * Get the name of the resource. * * @return the name value */ @@ -46,7 +46,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource. * * @param name the name value to set * @return the VirtualMachineImageResourceInner object itself. @@ -57,7 +57,7 @@ public VirtualMachineImageResourceInner withName(String name) { } /** - * Get the location value. + * Get the supported Azure location of the resource. * * @return the location value */ @@ -66,7 +66,7 @@ public String location() { } /** - * Set the location value. + * Set the supported Azure location of the resource. * * @param location the location value to set * @return the VirtualMachineImageResourceInner object itself. @@ -77,7 +77,7 @@ public VirtualMachineImageResourceInner withLocation(String location) { } /** - * Get the tags value. + * Get specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). * * @return the tags value */ @@ -86,7 +86,7 @@ public Map tags() { } /** - * Set the tags value. + * Set specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). * * @param tags the tags value to set * @return the VirtualMachineImageResourceInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java index ddda82d3f99..ac0a3f4df8f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java @@ -157,7 +157,7 @@ public Observable> getWithServiceRespo if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(location, publisherName, offer, skus, version, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -255,7 +255,7 @@ public Observable>> listW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String filter = null; final Integer top = null; final String orderby = null; @@ -361,7 +361,7 @@ public Observable>> listW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(location, publisherName, offer, skus, this.client.subscriptionId(), filter, top, orderby, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -445,7 +445,7 @@ public Observable>> listO if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listOffers(location, publisherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -522,7 +522,7 @@ public Observable>> listP if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listPublishers(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -613,7 +613,7 @@ public Observable>> listS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listSkus(location, publisherName, offer, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInner.java index 23869e06831..f6ce5056050 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInner.java @@ -18,7 +18,6 @@ import java.util.List; import com.microsoft.azure.management.compute.VirtualMachineIdentity; import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.management.compute.VirtualMachineInstanceView; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.Resource; @@ -97,7 +96,7 @@ public class VirtualMachineInner extends Resource { * The virtual machine instance view. */ @JsonProperty(value = "properties.instanceView", access = JsonProperty.Access.WRITE_ONLY) - private VirtualMachineInstanceView instanceView; + private VirtualMachineInstanceViewInner instanceView; /** * Specifies that the image or disk that is being used was licensed @@ -141,7 +140,7 @@ public class VirtualMachineInner extends Resource { private List zones; /** - * Get the plan value. + * Get specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. * * @return the plan value */ @@ -150,7 +149,7 @@ public Plan plan() { } /** - * Set the plan value. + * Set specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. * * @param plan the plan value to set * @return the VirtualMachineInner object itself. @@ -161,7 +160,7 @@ public VirtualMachineInner withPlan(Plan plan) { } /** - * Get the hardwareProfile value. + * Get specifies the hardware settings for the virtual machine. * * @return the hardwareProfile value */ @@ -170,7 +169,7 @@ public HardwareProfile hardwareProfile() { } /** - * Set the hardwareProfile value. + * Set specifies the hardware settings for the virtual machine. * * @param hardwareProfile the hardwareProfile value to set * @return the VirtualMachineInner object itself. @@ -181,7 +180,7 @@ public VirtualMachineInner withHardwareProfile(HardwareProfile hardwareProfile) } /** - * Get the storageProfile value. + * Get specifies the storage settings for the virtual machine disks. * * @return the storageProfile value */ @@ -190,7 +189,7 @@ public StorageProfile storageProfile() { } /** - * Set the storageProfile value. + * Set specifies the storage settings for the virtual machine disks. * * @param storageProfile the storageProfile value to set * @return the VirtualMachineInner object itself. @@ -201,7 +200,7 @@ public VirtualMachineInner withStorageProfile(StorageProfile storageProfile) { } /** - * Get the osProfile value. + * Get specifies the operating system settings for the virtual machine. * * @return the osProfile value */ @@ -210,7 +209,7 @@ public OSProfile osProfile() { } /** - * Set the osProfile value. + * Set specifies the operating system settings for the virtual machine. * * @param osProfile the osProfile value to set * @return the VirtualMachineInner object itself. @@ -221,7 +220,7 @@ public VirtualMachineInner withOsProfile(OSProfile osProfile) { } /** - * Get the networkProfile value. + * Get specifies the network interfaces of the virtual machine. * * @return the networkProfile value */ @@ -230,7 +229,7 @@ public NetworkProfile networkProfile() { } /** - * Set the networkProfile value. + * Set specifies the network interfaces of the virtual machine. * * @param networkProfile the networkProfile value to set * @return the VirtualMachineInner object itself. @@ -241,7 +240,7 @@ public VirtualMachineInner withNetworkProfile(NetworkProfile networkProfile) { } /** - * Get the diagnosticsProfile value. + * Get specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. * * @return the diagnosticsProfile value */ @@ -250,7 +249,7 @@ public DiagnosticsProfile diagnosticsProfile() { } /** - * Set the diagnosticsProfile value. + * Set specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. * * @param diagnosticsProfile the diagnosticsProfile value to set * @return the VirtualMachineInner object itself. @@ -261,7 +260,7 @@ public VirtualMachineInner withDiagnosticsProfile(DiagnosticsProfile diagnostics } /** - * Get the availabilitySet value. + * Get specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintainance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. * * @return the availabilitySet value */ @@ -270,7 +269,7 @@ public SubResource availabilitySet() { } /** - * Set the availabilitySet value. + * Set specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintainance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. * * @param availabilitySet the availabilitySet value to set * @return the VirtualMachineInner object itself. @@ -281,7 +280,7 @@ public VirtualMachineInner withAvailabilitySet(SubResource availabilitySet) { } /** - * Get the provisioningState value. + * Get the provisioning state, which only appears in the response. * * @return the provisioningState value */ @@ -290,16 +289,16 @@ public String provisioningState() { } /** - * Get the instanceView value. + * Get the virtual machine instance view. * * @return the instanceView value */ - public VirtualMachineInstanceView instanceView() { + public VirtualMachineInstanceViewInner instanceView() { return this.instanceView; } /** - * Get the licenseType value. + * Get specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15. * * @return the licenseType value */ @@ -308,7 +307,7 @@ public String licenseType() { } /** - * Set the licenseType value. + * Set specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15. * * @param licenseType the licenseType value to set * @return the VirtualMachineInner object itself. @@ -319,7 +318,7 @@ public VirtualMachineInner withLicenseType(String licenseType) { } /** - * Get the vmId value. + * Get specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands. * * @return the vmId value */ @@ -328,7 +327,7 @@ public String vmId() { } /** - * Get the resources value. + * Get the virtual machine child extension resources. * * @return the resources value */ @@ -337,7 +336,7 @@ public List resources() { } /** - * Get the identity value. + * Get the identity of the virtual machine, if configured. * * @return the identity value */ @@ -346,7 +345,7 @@ public VirtualMachineIdentity identity() { } /** - * Set the identity value. + * Set the identity of the virtual machine, if configured. * * @param identity the identity value to set * @return the VirtualMachineInner object itself. @@ -357,7 +356,7 @@ public VirtualMachineInner withIdentity(VirtualMachineIdentity identity) { } /** - * Get the zones value. + * Get the virtual machine zones. * * @return the zones value */ @@ -366,7 +365,7 @@ public List zones() { } /** - * Set the zones value. + * Set the virtual machine zones. * * @param zones the zones value to set * @return the VirtualMachineInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java new file mode 100644 index 00000000000..390eaf31a3b --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineInstanceViewInner.java @@ -0,0 +1,340 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.VirtualMachineAgentInstanceView; +import com.microsoft.azure.management.compute.MaintenanceRedeployStatus; +import java.util.List; +import com.microsoft.azure.management.compute.DiskInstanceView; +import com.microsoft.azure.management.compute.VirtualMachineExtensionInstanceView; +import com.microsoft.azure.management.compute.BootDiagnosticsInstanceView; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The instance view of a virtual machine. + */ +public class VirtualMachineInstanceViewInner { + /** + * Specifies the update domain of the virtual machine. + */ + @JsonProperty(value = "platformUpdateDomain") + private Integer platformUpdateDomain; + + /** + * Specifies the fault domain of the virtual machine. + */ + @JsonProperty(value = "platformFaultDomain") + private Integer platformFaultDomain; + + /** + * The computer name assigned to the virtual machine. + */ + @JsonProperty(value = "computerName") + private String computerName; + + /** + * The Operating System running on the virtual machine. + */ + @JsonProperty(value = "osName") + private String osName; + + /** + * The version of Operating System running on the virtual machine. + */ + @JsonProperty(value = "osVersion") + private String osVersion; + + /** + * The Remote desktop certificate thumbprint. + */ + @JsonProperty(value = "rdpThumbPrint") + private String rdpThumbPrint; + + /** + * The VM Agent running on the virtual machine. + */ + @JsonProperty(value = "vmAgent") + private VirtualMachineAgentInstanceView vmAgent; + + /** + * The Maintenance Operation status on the virtual machine. + */ + @JsonProperty(value = "maintenanceRedeployStatus") + private MaintenanceRedeployStatus maintenanceRedeployStatus; + + /** + * The virtual machine disk information. + */ + @JsonProperty(value = "disks") + private List disks; + + /** + * The extensions information. + */ + @JsonProperty(value = "extensions") + private List extensions; + + /** + * Boot Diagnostics is a debugging feature which allows you to view Console + * Output and Screenshot to diagnose VM status. <br><br> For + * Linux Virtual Machines, you can easily view the output of your console + * log. <br><br> For both Windows and Linux virtual machines, + * Azure also enables you to see a screenshot of the VM from the + * hypervisor. + */ + @JsonProperty(value = "bootDiagnostics") + private BootDiagnosticsInstanceView bootDiagnostics; + + /** + * The resource status information. + */ + @JsonProperty(value = "statuses") + private List statuses; + + /** + * Get specifies the update domain of the virtual machine. + * + * @return the platformUpdateDomain value + */ + public Integer platformUpdateDomain() { + return this.platformUpdateDomain; + } + + /** + * Set specifies the update domain of the virtual machine. + * + * @param platformUpdateDomain the platformUpdateDomain value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withPlatformUpdateDomain(Integer platformUpdateDomain) { + this.platformUpdateDomain = platformUpdateDomain; + return this; + } + + /** + * Get specifies the fault domain of the virtual machine. + * + * @return the platformFaultDomain value + */ + public Integer platformFaultDomain() { + return this.platformFaultDomain; + } + + /** + * Set specifies the fault domain of the virtual machine. + * + * @param platformFaultDomain the platformFaultDomain value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withPlatformFaultDomain(Integer platformFaultDomain) { + this.platformFaultDomain = platformFaultDomain; + return this; + } + + /** + * Get the computer name assigned to the virtual machine. + * + * @return the computerName value + */ + public String computerName() { + return this.computerName; + } + + /** + * Set the computer name assigned to the virtual machine. + * + * @param computerName the computerName value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withComputerName(String computerName) { + this.computerName = computerName; + return this; + } + + /** + * Get the Operating System running on the virtual machine. + * + * @return the osName value + */ + public String osName() { + return this.osName; + } + + /** + * Set the Operating System running on the virtual machine. + * + * @param osName the osName value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withOsName(String osName) { + this.osName = osName; + return this; + } + + /** + * Get the version of Operating System running on the virtual machine. + * + * @return the osVersion value + */ + public String osVersion() { + return this.osVersion; + } + + /** + * Set the version of Operating System running on the virtual machine. + * + * @param osVersion the osVersion value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withOsVersion(String osVersion) { + this.osVersion = osVersion; + return this; + } + + /** + * Get the Remote desktop certificate thumbprint. + * + * @return the rdpThumbPrint value + */ + public String rdpThumbPrint() { + return this.rdpThumbPrint; + } + + /** + * Set the Remote desktop certificate thumbprint. + * + * @param rdpThumbPrint the rdpThumbPrint value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withRdpThumbPrint(String rdpThumbPrint) { + this.rdpThumbPrint = rdpThumbPrint; + return this; + } + + /** + * Get the VM Agent running on the virtual machine. + * + * @return the vmAgent value + */ + public VirtualMachineAgentInstanceView vmAgent() { + return this.vmAgent; + } + + /** + * Set the VM Agent running on the virtual machine. + * + * @param vmAgent the vmAgent value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withVmAgent(VirtualMachineAgentInstanceView vmAgent) { + this.vmAgent = vmAgent; + return this; + } + + /** + * Get the Maintenance Operation status on the virtual machine. + * + * @return the maintenanceRedeployStatus value + */ + public MaintenanceRedeployStatus maintenanceRedeployStatus() { + return this.maintenanceRedeployStatus; + } + + /** + * Set the Maintenance Operation status on the virtual machine. + * + * @param maintenanceRedeployStatus the maintenanceRedeployStatus value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withMaintenanceRedeployStatus(MaintenanceRedeployStatus maintenanceRedeployStatus) { + this.maintenanceRedeployStatus = maintenanceRedeployStatus; + return this; + } + + /** + * Get the virtual machine disk information. + * + * @return the disks value + */ + public List disks() { + return this.disks; + } + + /** + * Set the virtual machine disk information. + * + * @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 information. + * + * @return the extensions value + */ + public List extensions() { + return this.extensions; + } + + /** + * Set the extensions information. + * + * @param extensions the extensions value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withExtensions(List extensions) { + this.extensions = extensions; + return this; + } + + /** + * Get boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> For Linux Virtual Machines, you can easily view the output of your console log. <br><br> For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor. + * + * @return the bootDiagnostics value + */ + public BootDiagnosticsInstanceView bootDiagnostics() { + return this.bootDiagnostics; + } + + /** + * Set boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> For Linux Virtual Machines, you can easily view the output of your console log. <br><br> For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor. + * + * @param bootDiagnostics the bootDiagnostics value to set + * @return the VirtualMachineInstanceViewInner object itself. + */ + public VirtualMachineInstanceViewInner withBootDiagnostics(BootDiagnosticsInstanceView bootDiagnostics) { + this.bootDiagnostics = bootDiagnostics; + return this; + } + + /** + * Get the resource status information. + * + * @return the statuses value + */ + public List statuses() { + return this.statuses; + } + + /** + * Set the resource status information. + * + * @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..c4f988300f5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineRunCommandsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineRunCommandsInner.java @@ -162,7 +162,7 @@ public Observable>> listSingle if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.list(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -246,7 +246,7 @@ public Observable> getWithServiceRespon if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-03-30"; + final String apiVersion = "2018-04-01"; return service.get(location, commandId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionInner.java index b5f5e0e6c35..462d8d445d7 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionInner.java @@ -79,7 +79,7 @@ public class VirtualMachineScaleSetExtensionInner extends SubResourceReadOnly { private String provisioningState; /** - * Get the name value. + * Get the name of the extension. * * @return the name value */ @@ -88,7 +88,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the extension. * * @param name the name value to set * @return the VirtualMachineScaleSetExtensionInner object itself. @@ -99,7 +99,7 @@ public VirtualMachineScaleSetExtensionInner withName(String name) { } /** - * Get the forceUpdateTag value. + * Get if a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed. * * @return the forceUpdateTag value */ @@ -108,7 +108,7 @@ public String forceUpdateTag() { } /** - * Set the forceUpdateTag value. + * Set if a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed. * * @param forceUpdateTag the forceUpdateTag value to set * @return the VirtualMachineScaleSetExtensionInner object itself. @@ -119,7 +119,7 @@ public VirtualMachineScaleSetExtensionInner withForceUpdateTag(String forceUpdat } /** - * Get the publisher value. + * Get the name of the extension handler publisher. * * @return the publisher value */ @@ -128,7 +128,7 @@ public String publisher() { } /** - * Set the publisher value. + * Set the name of the extension handler publisher. * * @param publisher the publisher value to set * @return the VirtualMachineScaleSetExtensionInner object itself. @@ -139,7 +139,7 @@ public VirtualMachineScaleSetExtensionInner withPublisher(String publisher) { } /** - * Get the type value. + * Get specifies the type of the extension; an example is "CustomScriptExtension". * * @return the type value */ @@ -148,7 +148,7 @@ public String type() { } /** - * Set the type value. + * Set specifies the type of the extension; an example is "CustomScriptExtension". * * @param type the type value to set * @return the VirtualMachineScaleSetExtensionInner object itself. @@ -159,7 +159,7 @@ public VirtualMachineScaleSetExtensionInner withType(String type) { } /** - * Get the typeHandlerVersion value. + * Get specifies the version of the script handler. * * @return the typeHandlerVersion value */ @@ -168,7 +168,7 @@ public String typeHandlerVersion() { } /** - * Set the typeHandlerVersion value. + * Set specifies the version of the script handler. * * @param typeHandlerVersion the typeHandlerVersion value to set * @return the VirtualMachineScaleSetExtensionInner object itself. @@ -179,7 +179,7 @@ public VirtualMachineScaleSetExtensionInner withTypeHandlerVersion(String typeHa } /** - * Get the autoUpgradeMinorVersion value. + * Get indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. * * @return the autoUpgradeMinorVersion value */ @@ -188,7 +188,7 @@ public Boolean autoUpgradeMinorVersion() { } /** - * Set the autoUpgradeMinorVersion value. + * Set indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. * * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set * @return the VirtualMachineScaleSetExtensionInner object itself. @@ -199,7 +199,7 @@ public VirtualMachineScaleSetExtensionInner withAutoUpgradeMinorVersion(Boolean } /** - * Get the settings value. + * Get json formatted public settings for the extension. * * @return the settings value */ @@ -208,7 +208,7 @@ public Object settings() { } /** - * Set the settings value. + * Set json formatted public settings for the extension. * * @param settings the settings value to set * @return the VirtualMachineScaleSetExtensionInner object itself. @@ -219,7 +219,7 @@ public VirtualMachineScaleSetExtensionInner withSettings(Object settings) { } /** - * Get the protectedSettings value. + * Get the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. * * @return the protectedSettings value */ @@ -228,7 +228,7 @@ public Object protectedSettings() { } /** - * Set the protectedSettings value. + * Set the extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. * * @param protectedSettings the protectedSettings value to set * @return the VirtualMachineScaleSetExtensionInner object itself. @@ -239,7 +239,7 @@ public VirtualMachineScaleSetExtensionInner withProtectedSettings(Object protect } /** - * Get the provisioningState value. + * Get the provisioning state, which only appears in the response. * * @return the provisioningState value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionsInner.java index c6227de9e0d..40700ffa935 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionsInner.java @@ -168,7 +168,7 @@ public Observable> createO throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -250,7 +250,7 @@ public Observable> beginCr throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -282,10 +282,9 @@ private ServiceResponse beginCreateOrUpdat * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner delete(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).toBlocking().last().body(); + public void delete(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).toBlocking().last().body(); } /** @@ -298,7 +297,7 @@ public OperationStatusResponseInner delete(String resourceGroupName, String vmSc * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName), serviceCallback); } @@ -311,10 +310,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -329,7 +328,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -342,9 +341,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -356,10 +355,9 @@ public Observable> deleteWithServi * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).toBlocking().single().body(); } /** @@ -372,7 +370,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName), serviceCallback); } @@ -383,12 +381,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param vmScaleSetName The name of the VM scale set where the extension should be deleted. * @param vmssExtensionName The name of the VM scale set extension. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -401,9 +399,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String vmssExtensionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -416,13 +414,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -431,9 +429,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -509,7 +507,7 @@ public Observable> getWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.get(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -598,7 +596,7 @@ public Observable> getWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -719,7 +717,7 @@ public Observable>> l if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetIPConfigurationInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetIPConfigurationInner.java index 22b180d47f1..663f6fe0bb1 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetIPConfigurationInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetIPConfigurationInner.java @@ -83,7 +83,7 @@ public class VirtualMachineScaleSetIPConfigurationInner extends SubResource { private List loadBalancerInboundNatPools; /** - * Get the name value. + * Get the IP configuration name. * * @return the name value */ @@ -92,7 +92,7 @@ public String name() { } /** - * Set the name value. + * Set the IP configuration name. * * @param name the name value to set * @return the VirtualMachineScaleSetIPConfigurationInner object itself. @@ -103,7 +103,7 @@ public VirtualMachineScaleSetIPConfigurationInner withName(String name) { } /** - * Get the subnet value. + * Get specifies the identifier of the subnet. * * @return the subnet value */ @@ -112,7 +112,7 @@ public ApiEntityReference subnet() { } /** - * Set the subnet value. + * Set specifies the identifier of the subnet. * * @param subnet the subnet value to set * @return the VirtualMachineScaleSetIPConfigurationInner object itself. @@ -123,7 +123,7 @@ public VirtualMachineScaleSetIPConfigurationInner withSubnet(ApiEntityReference } /** - * Get the primary value. + * Get specifies the primary network interface in case the virtual machine has more than 1 network interface. * * @return the primary value */ @@ -132,7 +132,7 @@ public Boolean primary() { } /** - * Set the primary value. + * Set specifies the primary network interface in case the virtual machine has more than 1 network interface. * * @param primary the primary value to set * @return the VirtualMachineScaleSetIPConfigurationInner object itself. @@ -143,7 +143,7 @@ public VirtualMachineScaleSetIPConfigurationInner withPrimary(Boolean primary) { } /** - * Get the publicIPAddressConfiguration value. + * Get the publicIPAddressConfiguration. * * @return the publicIPAddressConfiguration value */ @@ -152,7 +152,7 @@ public VirtualMachineScaleSetPublicIPAddressConfiguration publicIPAddressConfigu } /** - * Set the publicIPAddressConfiguration value. + * Set the publicIPAddressConfiguration. * * @param publicIPAddressConfiguration the publicIPAddressConfiguration value to set * @return the VirtualMachineScaleSetIPConfigurationInner object itself. @@ -163,7 +163,7 @@ public VirtualMachineScaleSetIPConfigurationInner withPublicIPAddressConfigurati } /** - * Get the privateIPAddressVersion value. + * Get available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'. * * @return the privateIPAddressVersion value */ @@ -172,7 +172,7 @@ public IPVersion privateIPAddressVersion() { } /** - * Set the privateIPAddressVersion value. + * Set available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'. * * @param privateIPAddressVersion the privateIPAddressVersion value to set * @return the VirtualMachineScaleSetIPConfigurationInner object itself. @@ -183,7 +183,7 @@ public VirtualMachineScaleSetIPConfigurationInner withPrivateIPAddressVersion(IP } /** - * Get the applicationGatewayBackendAddressPools value. + * Get specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway. * * @return the applicationGatewayBackendAddressPools value */ @@ -192,7 +192,7 @@ public List applicationGatewayBackendAddressPools() { } /** - * Set the applicationGatewayBackendAddressPools value. + * Set specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway. * * @param applicationGatewayBackendAddressPools the applicationGatewayBackendAddressPools value to set * @return the VirtualMachineScaleSetIPConfigurationInner object itself. @@ -203,7 +203,7 @@ public VirtualMachineScaleSetIPConfigurationInner withApplicationGatewayBackendA } /** - * Get the loadBalancerBackendAddressPools value. + * Get specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer. * * @return the loadBalancerBackendAddressPools value */ @@ -212,7 +212,7 @@ public List loadBalancerBackendAddressPools() { } /** - * Set the loadBalancerBackendAddressPools value. + * Set specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer. * * @param loadBalancerBackendAddressPools the loadBalancerBackendAddressPools value to set * @return the VirtualMachineScaleSetIPConfigurationInner object itself. @@ -223,7 +223,7 @@ public VirtualMachineScaleSetIPConfigurationInner withLoadBalancerBackendAddress } /** - * Get the loadBalancerInboundNatPools value. + * Get specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer. * * @return the loadBalancerInboundNatPools value */ @@ -232,7 +232,7 @@ public List loadBalancerInboundNatPools() { } /** - * Set the loadBalancerInboundNatPools value. + * Set specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer. * * @param loadBalancerInboundNatPools the loadBalancerInboundNatPools value to set * @return the VirtualMachineScaleSetIPConfigurationInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java index 74282f47593..552d8b19edb 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInner.java @@ -79,6 +79,19 @@ public class VirtualMachineScaleSetInner extends Resource { @JsonProperty(value = "properties.singlePlacementGroup") private Boolean singlePlacementGroup; + /** + * Whether to force stictly even Virtual Machine distribution cross x-zones + * in case there is zone outage. + */ + @JsonProperty(value = "properties.zoneBalance") + private Boolean zoneBalance; + + /** + * Fault Domain count for each placement group. + */ + @JsonProperty(value = "properties.platformFaultDomainCount") + private Integer platformFaultDomainCount; + /** * The identity of the virtual machine scale set, if configured. */ @@ -92,7 +105,7 @@ public class VirtualMachineScaleSetInner extends Resource { private List zones; /** - * Get the sku value. + * Get the virtual machine scale set sku. * * @return the sku value */ @@ -101,7 +114,7 @@ public Sku sku() { } /** - * Set the sku value. + * Set the virtual machine scale set sku. * * @param sku the sku value to set * @return the VirtualMachineScaleSetInner object itself. @@ -112,7 +125,7 @@ public VirtualMachineScaleSetInner withSku(Sku sku) { } /** - * Get the plan value. + * Get specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. * * @return the plan value */ @@ -121,7 +134,7 @@ public Plan plan() { } /** - * Set the plan value. + * Set specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. * * @param plan the plan value to set * @return the VirtualMachineScaleSetInner object itself. @@ -132,7 +145,7 @@ public VirtualMachineScaleSetInner withPlan(Plan plan) { } /** - * Get the upgradePolicy value. + * Get the upgrade policy. * * @return the upgradePolicy value */ @@ -141,7 +154,7 @@ public UpgradePolicy upgradePolicy() { } /** - * Set the upgradePolicy value. + * Set the upgrade policy. * * @param upgradePolicy the upgradePolicy value to set * @return the VirtualMachineScaleSetInner object itself. @@ -152,7 +165,7 @@ public VirtualMachineScaleSetInner withUpgradePolicy(UpgradePolicy upgradePolicy } /** - * Get the virtualMachineProfile value. + * Get the virtual machine profile. * * @return the virtualMachineProfile value */ @@ -161,7 +174,7 @@ public VirtualMachineScaleSetVMProfile virtualMachineProfile() { } /** - * Set the virtualMachineProfile value. + * Set the virtual machine profile. * * @param virtualMachineProfile the virtualMachineProfile value to set * @return the VirtualMachineScaleSetInner object itself. @@ -172,7 +185,7 @@ public VirtualMachineScaleSetInner withVirtualMachineProfile(VirtualMachineScale } /** - * Get the provisioningState value. + * Get the provisioning state, which only appears in the response. * * @return the provisioningState value */ @@ -181,7 +194,7 @@ public String provisioningState() { } /** - * Get the overprovision value. + * Get specifies whether the Virtual Machine Scale Set should be overprovisioned. * * @return the overprovision value */ @@ -190,7 +203,7 @@ public Boolean overprovision() { } /** - * Set the overprovision value. + * Set specifies whether the Virtual Machine Scale Set should be overprovisioned. * * @param overprovision the overprovision value to set * @return the VirtualMachineScaleSetInner object itself. @@ -201,7 +214,7 @@ public VirtualMachineScaleSetInner withOverprovision(Boolean overprovision) { } /** - * Get the uniqueId value. + * Get specifies the ID which uniquely identifies a Virtual Machine Scale Set. * * @return the uniqueId value */ @@ -210,7 +223,7 @@ public String uniqueId() { } /** - * Get the singlePlacementGroup value. + * Get when true this limits the scale set to a single placement group, of max size 100 virtual machines. * * @return the singlePlacementGroup value */ @@ -219,7 +232,7 @@ public Boolean singlePlacementGroup() { } /** - * Set the singlePlacementGroup value. + * Set when true this limits the scale set to a single placement group, of max size 100 virtual machines. * * @param singlePlacementGroup the singlePlacementGroup value to set * @return the VirtualMachineScaleSetInner object itself. @@ -230,7 +243,47 @@ public VirtualMachineScaleSetInner withSinglePlacementGroup(Boolean singlePlacem } /** - * Get the identity value. + * Get whether to force stictly even Virtual Machine distribution cross x-zones in case there is zone outage. + * + * @return the zoneBalance value + */ + public Boolean zoneBalance() { + return this.zoneBalance; + } + + /** + * Set whether to force stictly even Virtual Machine distribution cross x-zones in case there is zone outage. + * + * @param zoneBalance the zoneBalance value to set + * @return the VirtualMachineScaleSetInner object itself. + */ + public VirtualMachineScaleSetInner withZoneBalance(Boolean zoneBalance) { + this.zoneBalance = zoneBalance; + return this; + } + + /** + * Get fault Domain count for each placement group. + * + * @return the platformFaultDomainCount value + */ + public Integer platformFaultDomainCount() { + return this.platformFaultDomainCount; + } + + /** + * Set fault Domain count for each placement group. + * + * @param platformFaultDomainCount the platformFaultDomainCount value to set + * @return the VirtualMachineScaleSetInner object itself. + */ + public VirtualMachineScaleSetInner withPlatformFaultDomainCount(Integer platformFaultDomainCount) { + this.platformFaultDomainCount = platformFaultDomainCount; + return this; + } + + /** + * Get the identity of the virtual machine scale set, if configured. * * @return the identity value */ @@ -239,7 +292,7 @@ public VirtualMachineScaleSetIdentity identity() { } /** - * Set the identity value. + * Set the identity of the virtual machine scale set, if configured. * * @param identity the identity value to set * @return the VirtualMachineScaleSetInner object itself. @@ -250,7 +303,7 @@ public VirtualMachineScaleSetInner withIdentity(VirtualMachineScaleSetIdentity i } /** - * Get the zones value. + * Get the virtual machine scale set zones. * * @return the zones value */ @@ -259,7 +312,7 @@ public List zones() { } /** - * Set the zones value. + * Set the virtual machine scale set zones. * * @param zones the zones value to set * @return the VirtualMachineScaleSetInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInstanceViewInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInstanceViewInner.java index b7c0f55da1d..94b5ead6cdd 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInstanceViewInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetInstanceViewInner.java @@ -11,7 +11,6 @@ import com.microsoft.azure.management.compute.VirtualMachineScaleSetInstanceViewStatusesSummary; import java.util.List; import com.microsoft.azure.management.compute.VirtualMachineScaleSetVMExtensionsSummary; -import com.microsoft.azure.management.compute.InstanceViewStatus; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -34,10 +33,10 @@ public class VirtualMachineScaleSetInstanceViewInner { * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** - * Get the virtualMachine value. + * Get the instance view status summary for the virtual machine scale set. * * @return the virtualMachine value */ @@ -46,7 +45,7 @@ public VirtualMachineScaleSetInstanceViewStatusesSummary virtualMachine() { } /** - * Get the extensions value. + * Get the extensions information. * * @return the extensions value */ @@ -55,21 +54,21 @@ public List extensions() { } /** - * Get the statuses value. + * Get the resource status information. * * @return the statuses value */ - public List statuses() { + public List statuses() { return this.statuses; } /** - * Set the statuses value. + * Set the resource status information. * * @param statuses the statuses value to set * @return the VirtualMachineScaleSetInstanceViewInner object itself. */ - public VirtualMachineScaleSetInstanceViewInner withStatuses(List statuses) { + public VirtualMachineScaleSetInstanceViewInner withStatuses(List statuses) { this.statuses = statuses; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetNetworkConfigurationInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetNetworkConfigurationInner.java index d9d1339f4a5..1001dd14024 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetNetworkConfigurationInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetNetworkConfigurationInner.java @@ -59,7 +59,13 @@ public class VirtualMachineScaleSetNetworkConfigurationInner extends SubResource private List ipConfigurations; /** - * Get the name value. + * Whether IP forwarding enabled on this NIC. + */ + @JsonProperty(value = "properties.enableIPForwarding") + private Boolean enableIPForwarding; + + /** + * Get the network configuration name. * * @return the name value */ @@ -68,7 +74,7 @@ public String name() { } /** - * Set the name value. + * Set the network configuration name. * * @param name the name value to set * @return the VirtualMachineScaleSetNetworkConfigurationInner object itself. @@ -79,7 +85,7 @@ public VirtualMachineScaleSetNetworkConfigurationInner withName(String name) { } /** - * Get the primary value. + * Get specifies the primary network interface in case the virtual machine has more than 1 network interface. * * @return the primary value */ @@ -88,7 +94,7 @@ public Boolean primary() { } /** - * Set the primary value. + * Set specifies the primary network interface in case the virtual machine has more than 1 network interface. * * @param primary the primary value to set * @return the VirtualMachineScaleSetNetworkConfigurationInner object itself. @@ -99,7 +105,7 @@ public VirtualMachineScaleSetNetworkConfigurationInner withPrimary(Boolean prima } /** - * Get the enableAcceleratedNetworking value. + * Get specifies whether the network interface is accelerated networking-enabled. * * @return the enableAcceleratedNetworking value */ @@ -108,7 +114,7 @@ public Boolean enableAcceleratedNetworking() { } /** - * Set the enableAcceleratedNetworking value. + * Set specifies whether the network interface is accelerated networking-enabled. * * @param enableAcceleratedNetworking the enableAcceleratedNetworking value to set * @return the VirtualMachineScaleSetNetworkConfigurationInner object itself. @@ -119,7 +125,7 @@ public VirtualMachineScaleSetNetworkConfigurationInner withEnableAcceleratedNetw } /** - * Get the networkSecurityGroup value. + * Get the network security group. * * @return the networkSecurityGroup value */ @@ -128,7 +134,7 @@ public SubResource networkSecurityGroup() { } /** - * Set the networkSecurityGroup value. + * Set the network security group. * * @param networkSecurityGroup the networkSecurityGroup value to set * @return the VirtualMachineScaleSetNetworkConfigurationInner object itself. @@ -139,7 +145,7 @@ public VirtualMachineScaleSetNetworkConfigurationInner withNetworkSecurityGroup( } /** - * Get the dnsSettings value. + * Get the dns settings to be applied on the network interfaces. * * @return the dnsSettings value */ @@ -148,7 +154,7 @@ public VirtualMachineScaleSetNetworkConfigurationDnsSettings dnsSettings() { } /** - * Set the dnsSettings value. + * Set the dns settings to be applied on the network interfaces. * * @param dnsSettings the dnsSettings value to set * @return the VirtualMachineScaleSetNetworkConfigurationInner object itself. @@ -159,7 +165,7 @@ public VirtualMachineScaleSetNetworkConfigurationInner withDnsSettings(VirtualMa } /** - * Get the ipConfigurations value. + * Get specifies the IP configurations of the network interface. * * @return the ipConfigurations value */ @@ -168,7 +174,7 @@ public List ipConfigurations() { } /** - * Set the ipConfigurations value. + * Set specifies the IP configurations of the network interface. * * @param ipConfigurations the ipConfigurations value to set * @return the VirtualMachineScaleSetNetworkConfigurationInner object itself. @@ -178,4 +184,24 @@ public VirtualMachineScaleSetNetworkConfigurationInner withIpConfigurations(List return this; } + /** + * Get whether IP forwarding enabled on this NIC. + * + * @return the enableIPForwarding value + */ + public Boolean enableIPForwarding() { + return this.enableIPForwarding; + } + + /** + * Set whether IP forwarding enabled on this NIC. + * + * @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/VirtualMachineScaleSetRollingUpgradesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetRollingUpgradesInner.java index 29bc0ff7187..67bfade10d4 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetRollingUpgradesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetRollingUpgradesInner.java @@ -82,10 +82,9 @@ interface VirtualMachineScaleSetRollingUpgradesService { * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner cancel(String resourceGroupName, String vmScaleSetName) { - return cancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void cancel(String resourceGroupName, String vmScaleSetName) { + cancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -97,7 +96,7 @@ public OperationStatusResponseInner cancel(String resourceGroupName, String vmSc * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture cancelAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture cancelAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -109,10 +108,10 @@ public ServiceFuture cancelAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable cancelAsync(String resourceGroupName, String vmScaleSetName) { - return cancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable cancelAsync(String resourceGroupName, String vmScaleSetName) { + return cancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -126,7 +125,7 @@ public OperationStatusResponseInner call(ServiceResponse> cancelWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> cancelWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -136,9 +135,9 @@ public Observable> cancelWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.cancel(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -149,10 +148,9 @@ public Observable> cancelWithServi * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginCancel(String resourceGroupName, String vmScaleSetName) { - return beginCancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginCancel(String resourceGroupName, String vmScaleSetName) { + beginCancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -164,7 +162,7 @@ public OperationStatusResponseInner beginCancel(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginCancelAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginCancelAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginCancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -174,12 +172,12 @@ public ServiceFuture beginCancelAsync(String resou * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginCancelAsync(String resourceGroupName, String vmScaleSetName) { - return beginCancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginCancelAsync(String resourceGroupName, String vmScaleSetName) { + return beginCancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -191,9 +189,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginCancelWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginCancelWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -203,13 +201,13 @@ public Observable> beginCancelWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCancel(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginCancelDelegate(response); + ServiceResponse clientResponse = beginCancelDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -218,9 +216,9 @@ public Observable> call(Response beginCancelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginCancelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -234,10 +232,9 @@ private ServiceResponse beginCancelDelegate(Respon * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner startOSUpgrade(String resourceGroupName, String vmScaleSetName) { - return startOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void startOSUpgrade(String resourceGroupName, String vmScaleSetName) { + startOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -249,7 +246,7 @@ public OperationStatusResponseInner startOSUpgrade(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture startOSUpgradeAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture startOSUpgradeAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(startOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -261,10 +258,10 @@ public ServiceFuture startOSUpgradeAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable startOSUpgradeAsync(String resourceGroupName, String vmScaleSetName) { - return startOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable startOSUpgradeAsync(String resourceGroupName, String vmScaleSetName) { + return startOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -278,7 +275,7 @@ public OperationStatusResponseInner call(ServiceResponse> startOSUpgradeWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> startOSUpgradeWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -288,9 +285,9 @@ public Observable> startOSUpgradeW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.startOSUpgrade(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -301,10 +298,9 @@ public Observable> startOSUpgradeW * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginStartOSUpgrade(String resourceGroupName, String vmScaleSetName) { - return beginStartOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginStartOSUpgrade(String resourceGroupName, String vmScaleSetName) { + beginStartOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -316,7 +312,7 @@ public OperationStatusResponseInner beginStartOSUpgrade(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginStartOSUpgradeAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginStartOSUpgradeAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginStartOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -326,12 +322,12 @@ public ServiceFuture beginStartOSUpgradeAsync(Stri * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginStartOSUpgradeAsync(String resourceGroupName, String vmScaleSetName) { - return beginStartOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginStartOSUpgradeAsync(String resourceGroupName, String vmScaleSetName) { + return beginStartOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -343,9 +339,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginStartOSUpgradeWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginStartOSUpgradeWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -355,13 +351,13 @@ public Observable> beginStartOSUpg if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginStartOSUpgrade(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginStartOSUpgradeDelegate(response); + ServiceResponse clientResponse = beginStartOSUpgradeDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -370,9 +366,9 @@ public Observable> call(Response beginStartOSUpgradeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginStartOSUpgradeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -440,7 +436,7 @@ public Observable> getLatestWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getLatest(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetSkuInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetSkuInner.java index 4ba987fcf02..9b3e8ca20fc 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetSkuInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetSkuInner.java @@ -35,7 +35,7 @@ public class VirtualMachineScaleSetSkuInner { private VirtualMachineScaleSetSkuCapacity capacity; /** - * Get the resourceType value. + * Get the type of resource the sku applies to. * * @return the resourceType value */ @@ -44,7 +44,7 @@ public String resourceType() { } /** - * Get the sku value. + * Get the Sku. * * @return the sku value */ @@ -53,7 +53,7 @@ public Sku sku() { } /** - * Get the capacity value. + * Get specifies the number of virtual machines in the scale set. * * @return the capacity value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateIPConfigurationInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateIPConfigurationInner.java index 1a512cb71ea..4c8aae22e37 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateIPConfigurationInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateIPConfigurationInner.java @@ -74,7 +74,7 @@ public class VirtualMachineScaleSetUpdateIPConfigurationInner extends SubResourc private List loadBalancerInboundNatPools; /** - * Get the name value. + * Get the IP configuration name. * * @return the name value */ @@ -83,7 +83,7 @@ public String name() { } /** - * Set the name value. + * Set the IP configuration name. * * @param name the name value to set * @return the VirtualMachineScaleSetUpdateIPConfigurationInner object itself. @@ -94,7 +94,7 @@ public VirtualMachineScaleSetUpdateIPConfigurationInner withName(String name) { } /** - * Get the subnet value. + * Get the subnet. * * @return the subnet value */ @@ -103,7 +103,7 @@ public ApiEntityReference subnet() { } /** - * Set the subnet value. + * Set the subnet. * * @param subnet the subnet value to set * @return the VirtualMachineScaleSetUpdateIPConfigurationInner object itself. @@ -114,7 +114,7 @@ public VirtualMachineScaleSetUpdateIPConfigurationInner withSubnet(ApiEntityRefe } /** - * Get the primary value. + * Get specifies the primary IP Configuration in case the network interface has more than one IP Configuration. * * @return the primary value */ @@ -123,7 +123,7 @@ public Boolean primary() { } /** - * Set the primary value. + * Set specifies the primary IP Configuration in case the network interface has more than one IP Configuration. * * @param primary the primary value to set * @return the VirtualMachineScaleSetUpdateIPConfigurationInner object itself. @@ -134,7 +134,7 @@ public VirtualMachineScaleSetUpdateIPConfigurationInner withPrimary(Boolean prim } /** - * Get the publicIPAddressConfiguration value. + * Get the publicIPAddressConfiguration. * * @return the publicIPAddressConfiguration value */ @@ -143,7 +143,7 @@ public VirtualMachineScaleSetUpdatePublicIPAddressConfiguration publicIPAddressC } /** - * Set the publicIPAddressConfiguration value. + * Set the publicIPAddressConfiguration. * * @param publicIPAddressConfiguration the publicIPAddressConfiguration value to set * @return the VirtualMachineScaleSetUpdateIPConfigurationInner object itself. @@ -154,7 +154,7 @@ public VirtualMachineScaleSetUpdateIPConfigurationInner withPublicIPAddressConfi } /** - * Get the privateIPAddressVersion value. + * Get available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'. * * @return the privateIPAddressVersion value */ @@ -163,7 +163,7 @@ public IPVersion privateIPAddressVersion() { } /** - * Set the privateIPAddressVersion value. + * Set available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'. * * @param privateIPAddressVersion the privateIPAddressVersion value to set * @return the VirtualMachineScaleSetUpdateIPConfigurationInner object itself. @@ -174,7 +174,7 @@ public VirtualMachineScaleSetUpdateIPConfigurationInner withPrivateIPAddressVers } /** - * Get the applicationGatewayBackendAddressPools value. + * Get the application gateway backend address pools. * * @return the applicationGatewayBackendAddressPools value */ @@ -183,7 +183,7 @@ public List applicationGatewayBackendAddressPools() { } /** - * Set the applicationGatewayBackendAddressPools value. + * Set the application gateway backend address pools. * * @param applicationGatewayBackendAddressPools the applicationGatewayBackendAddressPools value to set * @return the VirtualMachineScaleSetUpdateIPConfigurationInner object itself. @@ -194,7 +194,7 @@ public VirtualMachineScaleSetUpdateIPConfigurationInner withApplicationGatewayBa } /** - * Get the loadBalancerBackendAddressPools value. + * Get the load balancer backend address pools. * * @return the loadBalancerBackendAddressPools value */ @@ -203,7 +203,7 @@ public List loadBalancerBackendAddressPools() { } /** - * Set the loadBalancerBackendAddressPools value. + * Set the load balancer backend address pools. * * @param loadBalancerBackendAddressPools the loadBalancerBackendAddressPools value to set * @return the VirtualMachineScaleSetUpdateIPConfigurationInner object itself. @@ -214,7 +214,7 @@ public VirtualMachineScaleSetUpdateIPConfigurationInner withLoadBalancerBackendA } /** - * Get the loadBalancerInboundNatPools value. + * Get the load balancer inbound nat pools. * * @return the loadBalancerInboundNatPools value */ @@ -223,7 +223,7 @@ public List loadBalancerInboundNatPools() { } /** - * Set the loadBalancerInboundNatPools value. + * Set the load balancer inbound nat pools. * * @param loadBalancerInboundNatPools the loadBalancerInboundNatPools value to set * @return the VirtualMachineScaleSetUpdateIPConfigurationInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateNetworkConfigurationInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateNetworkConfigurationInner.java index 1663cf15a7a..2cc10ee75f8 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateNetworkConfigurationInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateNetworkConfigurationInner.java @@ -58,7 +58,13 @@ public class VirtualMachineScaleSetUpdateNetworkConfigurationInner extends SubRe private List ipConfigurations; /** - * Get the name value. + * Whether IP forwarding enabled on this NIC. + */ + @JsonProperty(value = "properties.enableIPForwarding") + private Boolean enableIPForwarding; + + /** + * Get the network configuration name. * * @return the name value */ @@ -67,7 +73,7 @@ public String name() { } /** - * Set the name value. + * Set the network configuration name. * * @param name the name value to set * @return the VirtualMachineScaleSetUpdateNetworkConfigurationInner object itself. @@ -78,7 +84,7 @@ public VirtualMachineScaleSetUpdateNetworkConfigurationInner withName(String nam } /** - * Get the primary value. + * Get whether this is a primary NIC on a virtual machine. * * @return the primary value */ @@ -87,7 +93,7 @@ public Boolean primary() { } /** - * Set the primary value. + * Set whether this is a primary NIC on a virtual machine. * * @param primary the primary value to set * @return the VirtualMachineScaleSetUpdateNetworkConfigurationInner object itself. @@ -98,7 +104,7 @@ public VirtualMachineScaleSetUpdateNetworkConfigurationInner withPrimary(Boolean } /** - * Get the enableAcceleratedNetworking value. + * Get specifies whether the network interface is accelerated networking-enabled. * * @return the enableAcceleratedNetworking value */ @@ -107,7 +113,7 @@ public Boolean enableAcceleratedNetworking() { } /** - * Set the enableAcceleratedNetworking value. + * Set specifies whether the network interface is accelerated networking-enabled. * * @param enableAcceleratedNetworking the enableAcceleratedNetworking value to set * @return the VirtualMachineScaleSetUpdateNetworkConfigurationInner object itself. @@ -118,7 +124,7 @@ public VirtualMachineScaleSetUpdateNetworkConfigurationInner withEnableAccelerat } /** - * Get the networkSecurityGroup value. + * Get the network security group. * * @return the networkSecurityGroup value */ @@ -127,7 +133,7 @@ public SubResource networkSecurityGroup() { } /** - * Set the networkSecurityGroup value. + * Set the network security group. * * @param networkSecurityGroup the networkSecurityGroup value to set * @return the VirtualMachineScaleSetUpdateNetworkConfigurationInner object itself. @@ -138,7 +144,7 @@ public VirtualMachineScaleSetUpdateNetworkConfigurationInner withNetworkSecurity } /** - * Get the dnsSettings value. + * Get the dns settings to be applied on the network interfaces. * * @return the dnsSettings value */ @@ -147,7 +153,7 @@ public VirtualMachineScaleSetNetworkConfigurationDnsSettings dnsSettings() { } /** - * Set the dnsSettings value. + * Set the dns settings to be applied on the network interfaces. * * @param dnsSettings the dnsSettings value to set * @return the VirtualMachineScaleSetUpdateNetworkConfigurationInner object itself. @@ -158,7 +164,7 @@ public VirtualMachineScaleSetUpdateNetworkConfigurationInner withDnsSettings(Vir } /** - * Get the ipConfigurations value. + * Get the virtual machine scale set IP Configuration. * * @return the ipConfigurations value */ @@ -167,7 +173,7 @@ public List ipConfigurations() } /** - * Set the ipConfigurations value. + * Set the virtual machine scale set IP Configuration. * * @param ipConfigurations the ipConfigurations value to set * @return the VirtualMachineScaleSetUpdateNetworkConfigurationInner object itself. @@ -177,4 +183,24 @@ public VirtualMachineScaleSetUpdateNetworkConfigurationInner withIpConfiguration return this; } + /** + * Get whether IP forwarding enabled on this NIC. + * + * @return the enableIPForwarding value + */ + public Boolean enableIPForwarding() { + return this.enableIPForwarding; + } + + /** + * Set whether IP forwarding enabled on this NIC. + * + * @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..dd25c89e98d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInner.java @@ -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. @@ -146,7 +145,7 @@ public class VirtualMachineScaleSetVMInner extends Resource { private List resources; /** - * Get the instanceId value. + * Get the virtual machine instance ID. * * @return the instanceId value */ @@ -155,7 +154,7 @@ public String instanceId() { } /** - * Get the sku value. + * Get the virtual machine SKU. * * @return the sku value */ @@ -164,7 +163,7 @@ public Sku sku() { } /** - * Get the latestModelApplied value. + * Get specifies whether the latest model has been applied to the virtual machine. * * @return the latestModelApplied value */ @@ -173,7 +172,7 @@ public Boolean latestModelApplied() { } /** - * Get the vmId value. + * Get azure VM unique ID. * * @return the vmId value */ @@ -182,16 +181,16 @@ public String vmId() { } /** - * Get the instanceView value. + * Get the virtual machine instance view. * * @return the instanceView value */ - public VirtualMachineInstanceView instanceView() { + public VirtualMachineInstanceViewInner instanceView() { return this.instanceView; } /** - * Get the hardwareProfile value. + * Get specifies the hardware settings for the virtual machine. * * @return the hardwareProfile value */ @@ -200,7 +199,7 @@ public HardwareProfile hardwareProfile() { } /** - * Set the hardwareProfile value. + * Set specifies the hardware settings for the virtual machine. * * @param hardwareProfile the hardwareProfile value to set * @return the VirtualMachineScaleSetVMInner object itself. @@ -211,7 +210,7 @@ public VirtualMachineScaleSetVMInner withHardwareProfile(HardwareProfile hardwar } /** - * Get the storageProfile value. + * Get specifies the storage settings for the virtual machine disks. * * @return the storageProfile value */ @@ -220,7 +219,7 @@ public StorageProfile storageProfile() { } /** - * Set the storageProfile value. + * Set specifies the storage settings for the virtual machine disks. * * @param storageProfile the storageProfile value to set * @return the VirtualMachineScaleSetVMInner object itself. @@ -231,7 +230,7 @@ public VirtualMachineScaleSetVMInner withStorageProfile(StorageProfile storagePr } /** - * Get the osProfile value. + * Get specifies the operating system settings for the virtual machine. * * @return the osProfile value */ @@ -240,7 +239,7 @@ public OSProfile osProfile() { } /** - * Set the osProfile value. + * Set specifies the operating system settings for the virtual machine. * * @param osProfile the osProfile value to set * @return the VirtualMachineScaleSetVMInner object itself. @@ -251,7 +250,7 @@ public VirtualMachineScaleSetVMInner withOsProfile(OSProfile osProfile) { } /** - * Get the networkProfile value. + * Get specifies the network interfaces of the virtual machine. * * @return the networkProfile value */ @@ -260,7 +259,7 @@ public NetworkProfile networkProfile() { } /** - * Set the networkProfile value. + * Set specifies the network interfaces of the virtual machine. * * @param networkProfile the networkProfile value to set * @return the VirtualMachineScaleSetVMInner object itself. @@ -271,7 +270,7 @@ public VirtualMachineScaleSetVMInner withNetworkProfile(NetworkProfile networkPr } /** - * Get the diagnosticsProfile value. + * Get specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. * * @return the diagnosticsProfile value */ @@ -280,7 +279,7 @@ public DiagnosticsProfile diagnosticsProfile() { } /** - * Set the diagnosticsProfile value. + * Set specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. * * @param diagnosticsProfile the diagnosticsProfile value to set * @return the VirtualMachineScaleSetVMInner object itself. @@ -291,7 +290,7 @@ public VirtualMachineScaleSetVMInner withDiagnosticsProfile(DiagnosticsProfile d } /** - * Get the availabilitySet value. + * Get specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintainance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. * * @return the availabilitySet value */ @@ -300,7 +299,7 @@ public SubResource availabilitySet() { } /** - * Set the availabilitySet value. + * Set specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintainance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. * * @param availabilitySet the availabilitySet value to set * @return the VirtualMachineScaleSetVMInner object itself. @@ -311,7 +310,7 @@ public VirtualMachineScaleSetVMInner withAvailabilitySet(SubResource availabilit } /** - * Get the provisioningState value. + * Get the provisioning state, which only appears in the response. * * @return the provisioningState value */ @@ -320,7 +319,7 @@ public String provisioningState() { } /** - * Get the licenseType value. + * Get specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15. * * @return the licenseType value */ @@ -329,7 +328,7 @@ public String licenseType() { } /** - * Set the licenseType value. + * Set specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br><br> Possible values are: <br><br> Windows_Client <br><br> Windows_Server <br><br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Minimum api-version: 2015-06-15. * * @param licenseType the licenseType value to set * @return the VirtualMachineScaleSetVMInner object itself. @@ -340,7 +339,7 @@ public VirtualMachineScaleSetVMInner withLicenseType(String licenseType) { } /** - * Get the plan value. + * Get specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. * * @return the plan value */ @@ -349,7 +348,7 @@ public Plan plan() { } /** - * Set the plan value. + * Set specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. * * @param plan the plan value to set * @return the VirtualMachineScaleSetVMInner object itself. @@ -360,7 +359,7 @@ public VirtualMachineScaleSetVMInner withPlan(Plan plan) { } /** - * Get the resources value. + * Get the virtual machine child extension resources. * * @return the resources value */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java index 95d03b488b9..17f6ce67f0e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMInstanceViewInner.java @@ -9,12 +9,12 @@ package com.microsoft.azure.management.compute.implementation; import com.microsoft.azure.management.compute.VirtualMachineAgentInstanceView; +import com.microsoft.azure.management.compute.MaintenanceRedeployStatus; import java.util.List; import com.microsoft.azure.management.compute.DiskInstanceView; import com.microsoft.azure.management.compute.VirtualMachineExtensionInstanceView; import com.microsoft.azure.management.compute.VirtualMachineHealthStatus; import com.microsoft.azure.management.compute.BootDiagnosticsInstanceView; -import com.microsoft.azure.management.compute.InstanceViewStatus; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -45,6 +45,12 @@ public class VirtualMachineScaleSetVMInstanceViewInner { @JsonProperty(value = "vmAgent") private VirtualMachineAgentInstanceView vmAgent; + /** + * The Maintenance Operation status on the virtual machine. + */ + @JsonProperty(value = "maintenanceRedeployStatus") + private MaintenanceRedeployStatus maintenanceRedeployStatus; + /** * The disks information. */ @@ -78,7 +84,7 @@ public class VirtualMachineScaleSetVMInstanceViewInner { * The resource status information. */ @JsonProperty(value = "statuses") - private List statuses; + private List statuses; /** * The placement group in which the VM is running. If the VM is deallocated @@ -88,7 +94,7 @@ public class VirtualMachineScaleSetVMInstanceViewInner { private String placementGroupId; /** - * Get the platformUpdateDomain value. + * Get the Update Domain count. * * @return the platformUpdateDomain value */ @@ -97,7 +103,7 @@ public Integer platformUpdateDomain() { } /** - * Set the platformUpdateDomain value. + * Set the Update Domain count. * * @param platformUpdateDomain the platformUpdateDomain value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. @@ -108,7 +114,7 @@ public VirtualMachineScaleSetVMInstanceViewInner withPlatformUpdateDomain(Intege } /** - * Get the platformFaultDomain value. + * Get the Fault Domain count. * * @return the platformFaultDomain value */ @@ -117,7 +123,7 @@ public Integer platformFaultDomain() { } /** - * Set the platformFaultDomain value. + * Set the Fault Domain count. * * @param platformFaultDomain the platformFaultDomain value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. @@ -128,7 +134,7 @@ public VirtualMachineScaleSetVMInstanceViewInner withPlatformFaultDomain(Integer } /** - * Get the rdpThumbPrint value. + * Get the Remote desktop certificate thumbprint. * * @return the rdpThumbPrint value */ @@ -137,7 +143,7 @@ public String rdpThumbPrint() { } /** - * Set the rdpThumbPrint value. + * Set the Remote desktop certificate thumbprint. * * @param rdpThumbPrint the rdpThumbPrint value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. @@ -148,7 +154,7 @@ public VirtualMachineScaleSetVMInstanceViewInner withRdpThumbPrint(String rdpThu } /** - * Get the vmAgent value. + * Get the VM Agent running on the virtual machine. * * @return the vmAgent value */ @@ -157,7 +163,7 @@ public VirtualMachineAgentInstanceView vmAgent() { } /** - * Set the vmAgent value. + * Set the VM Agent running on the virtual machine. * * @param vmAgent the vmAgent value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. @@ -168,7 +174,27 @@ public VirtualMachineScaleSetVMInstanceViewInner withVmAgent(VirtualMachineAgent } /** - * Get the disks value. + * Get the Maintenance Operation status on the virtual machine. + * + * @return the maintenanceRedeployStatus value + */ + public MaintenanceRedeployStatus maintenanceRedeployStatus() { + return this.maintenanceRedeployStatus; + } + + /** + * Set the Maintenance Operation status on the virtual machine. + * + * @param maintenanceRedeployStatus the maintenanceRedeployStatus value to set + * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. + */ + public VirtualMachineScaleSetVMInstanceViewInner withMaintenanceRedeployStatus(MaintenanceRedeployStatus maintenanceRedeployStatus) { + this.maintenanceRedeployStatus = maintenanceRedeployStatus; + return this; + } + + /** + * Get the disks information. * * @return the disks value */ @@ -177,7 +203,7 @@ public List disks() { } /** - * Set the disks value. + * Set the disks information. * * @param disks the disks value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. @@ -188,7 +214,7 @@ public VirtualMachineScaleSetVMInstanceViewInner withDisks(List extensions() { } /** - * Set the extensions value. + * Set the extensions information. * * @param extensions the extensions value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. @@ -208,7 +234,7 @@ public VirtualMachineScaleSetVMInstanceViewInner withExtensions(List statuses() { + public List statuses() { return this.statuses; } /** - * Set the statuses value. + * Set the resource status information. * * @param statuses the statuses value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. */ - public VirtualMachineScaleSetVMInstanceViewInner withStatuses(List statuses) { + public VirtualMachineScaleSetVMInstanceViewInner withStatuses(List statuses) { this.statuses = statuses; return this; } /** - * Get the placementGroupId value. + * Get the placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId. * * @return the placementGroupId value */ @@ -266,7 +292,7 @@ public String placementGroupId() { } /** - * Set the placementGroupId value. + * Set the placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId. * * @param placementGroupId the placementGroupId value to set * @return the VirtualMachineScaleSetVMInstanceViewInner object itself. 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..f41c093ce1b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java @@ -18,15 +18,18 @@ import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; import okhttp3.ResponseBody; +import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; import retrofit2.http.Path; import retrofit2.http.POST; +import retrofit2.http.PUT; import retrofit2.http.Query; import retrofit2.http.Url; import retrofit2.Response; @@ -83,6 +86,14 @@ interface VirtualMachineScaleSetVMsService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate") Observable> beginDeallocate(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSetVMs update" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetVMInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSetVMs beginUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}") + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetVMInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSetVMs delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}", method = "DELETE", hasBody = true) Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -127,6 +138,22 @@ interface VirtualMachineScaleSetVMsService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start") Observable> beginStart(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSetVMs redeploy" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy") + Observable> redeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSetVMs beginRedeploy" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy") + Observable> beginRedeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSetVMs performMaintenance" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance") + Observable> performMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSetVMs beginPerformMaintenance" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance") + Observable> beginPerformMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSetVMs listNext" }) @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -142,10 +169,9 @@ interface VirtualMachineScaleSetVMsService { * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimage(String resourceGroupName, String vmScaleSetName, String instanceId) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void reimage(String resourceGroupName, String vmScaleSetName, String instanceId) { + reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -158,7 +184,7 @@ public OperationStatusResponseInner reimage(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -171,10 +197,10 @@ public ServiceFuture reimageAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable reimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -189,7 +215,7 @@ public OperationStatusResponseInner call(ServiceResponse> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -202,9 +228,9 @@ public Observable> reimageWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.reimage(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -216,10 +242,9 @@ public Observable> reimageWithServ * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginReimage(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginReimage(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -232,7 +257,7 @@ public OperationStatusResponseInner beginReimage(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -243,12 +268,12 @@ public ServiceFuture beginReimageAsync(String reso * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -261,9 +286,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -276,13 +301,13 @@ public Observable> beginReimageWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginReimage(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageDelegate(response); + ServiceResponse clientResponse = beginReimageDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -291,9 +316,9 @@ public Observable> call(Response beginReimageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginReimageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -308,10 +333,9 @@ private ServiceResponse beginReimageDelegate(Respo * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimageAll(String resourceGroupName, String vmScaleSetName, String instanceId) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void reimageAll(String resourceGroupName, String vmScaleSetName, String instanceId) { + reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -324,7 +348,7 @@ public OperationStatusResponseInner reimageAll(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -337,10 +361,10 @@ public ServiceFuture reimageAllAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -355,7 +379,7 @@ public OperationStatusResponseInner call(ServiceResponse> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -368,9 +392,9 @@ public Observable> reimageAllWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.reimageAll(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -382,10 +406,9 @@ public Observable> reimageAllWithS * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginReimageAll(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginReimageAll(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -398,7 +421,7 @@ public OperationStatusResponseInner beginReimageAll(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -409,12 +432,12 @@ public ServiceFuture beginReimageAllAsync(String r * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -427,9 +450,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -442,13 +465,13 @@ public Observable> beginReimageAll if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginReimageAll(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageAllDelegate(response); + ServiceResponse clientResponse = beginReimageAllDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -457,9 +480,9 @@ public Observable> call(Response beginReimageAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginReimageAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -474,10 +497,9 @@ private ServiceResponse beginReimageAllDelegate(Re * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner deallocate(String resourceGroupName, String vmScaleSetName, String instanceId) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void deallocate(String resourceGroupName, String vmScaleSetName, String instanceId) { + deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -490,7 +512,7 @@ public OperationStatusResponseInner deallocate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -503,10 +525,10 @@ public ServiceFuture deallocateAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -521,7 +543,7 @@ public OperationStatusResponseInner call(ServiceResponse> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -534,9 +556,9 @@ public Observable> deallocateWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.deallocate(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -548,10 +570,9 @@ public Observable> deallocateWithS * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDeallocate(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginDeallocate(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -564,7 +585,7 @@ public OperationStatusResponseInner beginDeallocate(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -575,12 +596,12 @@ public ServiceFuture beginDeallocateAsync(String r * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -593,9 +614,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -608,13 +629,13 @@ public Observable> beginDeallocate if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDeallocate(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeallocateDelegate(response); + ServiceResponse clientResponse = beginDeallocateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -623,14 +644,196 @@ public Observable> call(Response beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } + /** + * 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 = "2018-04-01"; + Observable> observable = service.update(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * 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 = "2018-04-01"; + return service.beginUpdate(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + 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. * @@ -640,10 +843,9 @@ private ServiceResponse beginDeallocateDelegate(Re * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner delete(String resourceGroupName, String vmScaleSetName, String instanceId) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void delete(String resourceGroupName, String vmScaleSetName, String instanceId) { + deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -656,7 +858,7 @@ public OperationStatusResponseInner delete(String resourceGroupName, String vmSc * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -669,10 +871,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -687,7 +889,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -700,9 +902,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -714,10 +916,9 @@ public Observable> deleteWithServi * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -730,7 +931,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -741,12 +942,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -759,9 +960,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -774,13 +975,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -789,9 +990,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -867,7 +1068,7 @@ public Observable> getWithService if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -958,7 +1159,7 @@ public Observable> ge if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getInstanceView(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1079,7 +1280,7 @@ public Observable>> listSing if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String filter = null; final String select = null; final String expand = null; @@ -1211,7 +1412,7 @@ public Observable>> listSing if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, virtualMachineScaleSetName, this.client.subscriptionId(), filter, select, expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1242,10 +1443,9 @@ private ServiceResponse> listDelegate(R * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner powerOff(String resourceGroupName, String vmScaleSetName, String instanceId) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void powerOff(String resourceGroupName, String vmScaleSetName, String instanceId) { + powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -1258,7 +1458,7 @@ public OperationStatusResponseInner powerOff(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1271,10 +1471,10 @@ public ServiceFuture powerOffAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1289,7 +1489,7 @@ public OperationStatusResponseInner call(ServiceResponse> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1302,9 +1502,9 @@ public Observable> powerOffWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.powerOff(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1316,10 +1516,9 @@ public Observable> powerOffWithSer * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginPowerOff(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginPowerOff(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -1332,7 +1531,7 @@ public OperationStatusResponseInner beginPowerOff(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1343,12 +1542,12 @@ public ServiceFuture beginPowerOffAsync(String res * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1361,9 +1560,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1376,13 +1575,13 @@ public Observable> beginPowerOffWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginPowerOff(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPowerOffDelegate(response); + ServiceResponse clientResponse = beginPowerOffDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1391,9 +1590,9 @@ public Observable> call(Response beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1408,10 +1607,9 @@ private ServiceResponse beginPowerOffDelegate(Resp * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner restart(String resourceGroupName, String vmScaleSetName, String instanceId) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void restart(String resourceGroupName, String vmScaleSetName, String instanceId) { + restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -1424,7 +1622,7 @@ public OperationStatusResponseInner restart(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1437,10 +1635,10 @@ public ServiceFuture restartAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable restartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable restartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1455,7 +1653,7 @@ public OperationStatusResponseInner call(ServiceResponse> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1468,9 +1666,9 @@ public Observable> restartWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.restart(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1482,10 +1680,9 @@ public Observable> restartWithServ * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRestart(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginRestart(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -1498,7 +1695,7 @@ public OperationStatusResponseInner beginRestart(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1509,12 +1706,12 @@ public ServiceFuture beginRestartAsync(String reso * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1527,9 +1724,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1542,13 +1739,13 @@ public Observable> beginRestartWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginRestart(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRestartDelegate(response); + ServiceResponse clientResponse = beginRestartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1557,9 +1754,9 @@ public Observable> call(Response beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1574,10 +1771,9 @@ private ServiceResponse beginRestartDelegate(Respo * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner start(String resourceGroupName, String vmScaleSetName, String instanceId) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + public void start(String resourceGroupName, String vmScaleSetName, String instanceId) { + startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); } /** @@ -1590,7 +1786,7 @@ public OperationStatusResponseInner start(String resourceGroupName, String vmSca * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1603,10 +1799,10 @@ public ServiceFuture startAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable startAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable startAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1621,7 +1817,7 @@ public OperationStatusResponseInner call(ServiceResponse> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1634,9 +1830,9 @@ public Observable> startWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.start(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1648,10 +1844,9 @@ public Observable> startWithServic * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginStart(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + public void beginStart(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); } /** @@ -1664,7 +1859,7 @@ public OperationStatusResponseInner beginStart(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); } @@ -1675,12 +1870,12 @@ public ServiceFuture beginStartAsync(String resour * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, OperationStatusResponseInner>() { + public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1693,9 +1888,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1708,13 +1903,341 @@ public Observable> beginStartWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginStart(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void redeploy(String resourceGroupName, String vmScaleSetName, String instanceId) { + redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable redeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginRedeploy(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Redeploys a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginRedeploy(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRedeployDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void performMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId) { + performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().body(); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, String instanceId) { + beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginStartDelegate(response); + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1723,9 +2246,9 @@ public Observable> call(Response beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java index 13856d034a9..653343e722c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java @@ -16,6 +16,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.compute.VirtualMachineScaleSetUpdate; import com.microsoft.azure.management.compute.VirtualMachineScaleSetVMInstanceIDs; import com.microsoft.azure.management.compute.VirtualMachineScaleSetVMInstanceRequiredIDs; import com.microsoft.azure.Page; @@ -46,7 +47,7 @@ * An instance of this class provides access to all the operations defined * in VirtualMachineScaleSets. */ -public class VirtualMachineScaleSetsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class VirtualMachineScaleSetsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private VirtualMachineScaleSetsService service; /** The service client containing this operation class. */ @@ -78,11 +79,11 @@ interface VirtualMachineScaleSetsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetUpdateInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginUpdate" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}") - Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetUpdateInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", method = "DELETE", hasBody = true) @@ -128,6 +129,10 @@ interface VirtualMachineScaleSetsService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus") Observable> listSkus(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets getOSUpgradeHistory" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory") + Observable> getOSUpgradeHistory(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets powerOff" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff") Observable> powerOff(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @@ -152,6 +157,22 @@ interface VirtualMachineScaleSetsService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start") Observable> beginStart(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets redeploy" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy") + Observable> redeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginRedeploy" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy") + Observable> beginRedeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets performMaintenance" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance") + Observable> performMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginPerformMaintenance" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance") + Observable> beginPerformMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets updateInstances" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade") Observable> updateInstances(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @@ -176,6 +197,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); @@ -188,6 +213,10 @@ interface VirtualMachineScaleSetsService { @GET Observable> listSkusNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets getOSUpgradeHistoryNext" }) + @GET + Observable> getOSUpgradeHistoryNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -260,7 +289,7 @@ public Observable> createOrUpdateWi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -335,7 +364,7 @@ public Observable> beginCreateOrUpd throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -369,7 +398,7 @@ private ServiceResponse beginCreateOrUpdateDelegate * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineScaleSetInner object if successful. */ - public VirtualMachineScaleSetInner update(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdateInner parameters) { + public VirtualMachineScaleSetInner update(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).toBlocking().last().body(); } @@ -383,7 +412,7 @@ public VirtualMachineScaleSetInner update(String resourceGroupName, String vmSca * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdateInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture updateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters), serviceCallback); } @@ -396,7 +425,7 @@ public ServiceFuture updateAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdateInner parameters) { + public Observable updateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).map(new Func1, VirtualMachineScaleSetInner>() { @Override public VirtualMachineScaleSetInner call(ServiceResponse response) { @@ -414,7 +443,7 @@ public VirtualMachineScaleSetInner call(ServiceResponse> updateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdateInner parameters) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -428,7 +457,7 @@ public Observable> updateWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.update(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -444,7 +473,7 @@ public Observable> updateWithServic * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineScaleSetInner object if successful. */ - public VirtualMachineScaleSetInner beginUpdate(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdateInner parameters) { + public VirtualMachineScaleSetInner beginUpdate(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).toBlocking().single().body(); } @@ -458,7 +487,7 @@ public VirtualMachineScaleSetInner beginUpdate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdateInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters), serviceCallback); } @@ -471,7 +500,7 @@ public ServiceFuture beginUpdateAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineScaleSetInner object */ - public Observable beginUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdateInner parameters) { + public Observable beginUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).map(new Func1, VirtualMachineScaleSetInner>() { @Override public VirtualMachineScaleSetInner call(ServiceResponse response) { @@ -489,7 +518,7 @@ public VirtualMachineScaleSetInner call(ServiceResponse> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdateInner parameters) { + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -503,7 +532,7 @@ public Observable> beginUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -533,10 +562,9 @@ private ServiceResponse beginUpdateDelegate(Respons * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner delete(String resourceGroupName, String vmScaleSetName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void delete(String resourceGroupName, String vmScaleSetName) { + deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -548,7 +576,7 @@ public OperationStatusResponseInner delete(String resourceGroupName, String vmSc * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -560,10 +588,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String vmScaleSetName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String vmScaleSetName) { + return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -577,7 +605,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -587,9 +615,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -600,10 +628,9 @@ public Observable> deleteWithServi * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String vmScaleSetName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String vmScaleSetName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -615,7 +642,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -625,12 +652,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String vmScaleSetName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -642,9 +669,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -654,13 +681,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -669,9 +696,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -740,7 +767,7 @@ public Observable> getByResourceGro if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -770,10 +797,9 @@ private ServiceResponse getByResourceGroupDelegate( * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner deallocate(String resourceGroupName, String vmScaleSetName) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void deallocate(String resourceGroupName, String vmScaleSetName) { + deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -785,7 +811,7 @@ public OperationStatusResponseInner deallocate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -797,10 +823,10 @@ public ServiceFuture deallocateAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName) { + return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -814,7 +840,7 @@ public OperationStatusResponseInner call(ServiceResponse> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -824,12 +850,12 @@ public Observable> deallocateWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.deallocate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates. @@ -840,10 +866,9 @@ public Observable> deallocateWithS * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner deallocate(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void deallocate(String resourceGroupName, String vmScaleSetName, List instanceIds) { + deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -856,7 +881,7 @@ public OperationStatusResponseInner deallocate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture deallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -869,10 +894,10 @@ public ServiceFuture deallocateAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable deallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -887,7 +912,7 @@ public OperationStatusResponseInner call(ServiceResponse> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -898,14 +923,14 @@ public Observable> deallocateWithS throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.deallocate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -916,10 +941,9 @@ public Observable> deallocateWithS * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDeallocate(String resourceGroupName, String vmScaleSetName) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginDeallocate(String resourceGroupName, String vmScaleSetName) { + beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -931,7 +955,7 @@ public OperationStatusResponseInner beginDeallocate(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -941,12 +965,12 @@ public ServiceFuture beginDeallocateAsync(String r * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName) { + return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -958,9 +982,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -970,16 +994,16 @@ public Observable> beginDeallocate if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginDeallocate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeallocateDelegate(response); + ServiceResponse clientResponse = beginDeallocateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -997,10 +1021,9 @@ public Observable> call(Response instanceIds) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginDeallocate(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -1013,7 +1036,7 @@ public OperationStatusResponseInner beginDeallocate(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -1024,12 +1047,12 @@ public ServiceFuture beginDeallocateAsync(String r * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1042,9 +1065,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1055,18 +1078,18 @@ public Observable> beginDeallocate throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginDeallocate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeallocateDelegate(response); + ServiceResponse clientResponse = beginDeallocateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1075,9 +1098,9 @@ public Observable> call(Response beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1092,10 +1115,9 @@ private ServiceResponse beginDeallocateDelegate(Re * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner deleteInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void deleteInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { + deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -1108,7 +1130,7 @@ public OperationStatusResponseInner deleteInstances(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -1121,10 +1143,10 @@ public ServiceFuture deleteInstancesAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1139,7 +1161,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> deleteInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1153,11 +1175,11 @@ public Observable> deleteInstances throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); Observable> observable = service.deleteInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1169,10 +1191,9 @@ public Observable> deleteInstances * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDeleteInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginDeleteInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -1185,7 +1206,7 @@ public OperationStatusResponseInner beginDeleteInstances(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -1196,12 +1217,12 @@ public ServiceFuture beginDeleteInstancesAsync(Str * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1214,9 +1235,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginDeleteInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1230,15 +1251,15 @@ public Observable> beginDeleteInst throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); return service.beginDeleteInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteInstancesDelegate(response); + ServiceResponse clientResponse = beginDeleteInstancesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1247,9 +1268,9 @@ public Observable> call(Response beginDeleteInstancesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteInstancesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1317,7 +1338,7 @@ public Observable> getI if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getInstanceView(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1430,7 +1451,7 @@ public Observable>> listByReso if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1535,7 +1556,7 @@ public Observable>> listSingle if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1656,7 +1677,7 @@ public Observable>> listSku if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listSkus(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1678,6 +1699,127 @@ private ServiceResponse> listSkusDeleg .build(response); } + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<UpgradeOperationHistoricalStatusInfoInner> object if successful. + */ + public PagedList getOSUpgradeHistory(final String resourceGroupName, final String vmScaleSetName) { + ServiceResponse> response = getOSUpgradeHistorySinglePageAsync(resourceGroupName, vmScaleSetName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getOSUpgradeHistoryAsync(final String resourceGroupName, final String vmScaleSetName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getOSUpgradeHistorySinglePageAsync(resourceGroupName, vmScaleSetName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UpgradeOperationHistoricalStatusInfoInner> object + */ + public Observable> getOSUpgradeHistoryAsync(final String resourceGroupName, final String vmScaleSetName) { + return getOSUpgradeHistoryWithServiceResponseAsync(resourceGroupName, vmScaleSetName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UpgradeOperationHistoricalStatusInfoInner> object + */ + public Observable>> getOSUpgradeHistoryWithServiceResponseAsync(final String resourceGroupName, final String vmScaleSetName) { + return getOSUpgradeHistorySinglePageAsync(resourceGroupName, vmScaleSetName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getOSUpgradeHistoryNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<UpgradeOperationHistoricalStatusInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getOSUpgradeHistorySinglePageAsync(final String resourceGroupName, final String vmScaleSetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.getOSUpgradeHistory(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getOSUpgradeHistoryDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getOSUpgradeHistoryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. * @@ -1686,10 +1828,9 @@ private ServiceResponse> listSkusDeleg * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner powerOff(String resourceGroupName, String vmScaleSetName) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void powerOff(String resourceGroupName, String vmScaleSetName) { + powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -1701,7 +1842,7 @@ public OperationStatusResponseInner powerOff(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -1713,10 +1854,10 @@ public ServiceFuture powerOffAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName) { + return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1730,7 +1871,7 @@ public OperationStatusResponseInner call(ServiceResponse> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1740,12 +1881,12 @@ public Observable> powerOffWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.powerOff(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. @@ -1756,10 +1897,9 @@ public Observable> powerOffWithSer * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner powerOff(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void powerOff(String resourceGroupName, String vmScaleSetName, List instanceIds) { + powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -1772,7 +1912,7 @@ public OperationStatusResponseInner powerOff(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture powerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -1785,10 +1925,10 @@ public ServiceFuture powerOffAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable powerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1803,7 +1943,7 @@ public OperationStatusResponseInner call(ServiceResponse> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1814,14 +1954,14 @@ public Observable> powerOffWithSer throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.powerOff(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1832,10 +1972,9 @@ public Observable> powerOffWithSer * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginPowerOff(String resourceGroupName, String vmScaleSetName) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginPowerOff(String resourceGroupName, String vmScaleSetName) { + beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -1847,7 +1986,7 @@ public OperationStatusResponseInner beginPowerOff(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -1857,12 +1996,12 @@ public ServiceFuture beginPowerOffAsync(String res * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName) { + return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1874,9 +2013,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1886,16 +2025,16 @@ public Observable> beginPowerOffWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginPowerOff(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPowerOffDelegate(response); + ServiceResponse clientResponse = beginPowerOffDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1913,10 +2052,9 @@ public Observable> call(Response instanceIds) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginPowerOff(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -1929,7 +2067,7 @@ public OperationStatusResponseInner beginPowerOff(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -1940,12 +2078,12 @@ public ServiceFuture beginPowerOffAsync(String res * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1958,9 +2096,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1971,18 +2109,18 @@ public Observable> beginPowerOffWi throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginPowerOff(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPowerOffDelegate(response); + ServiceResponse clientResponse = beginPowerOffDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1991,9 +2129,9 @@ public Observable> call(Response beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2007,10 +2145,9 @@ private ServiceResponse beginPowerOffDelegate(Resp * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner restart(String resourceGroupName, String vmScaleSetName) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void restart(String resourceGroupName, String vmScaleSetName) { + restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -2022,7 +2159,7 @@ public OperationStatusResponseInner restart(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2034,10 +2171,10 @@ public ServiceFuture restartAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable restartAsync(String resourceGroupName, String vmScaleSetName) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable restartAsync(String resourceGroupName, String vmScaleSetName) { + return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2051,7 +2188,7 @@ public OperationStatusResponseInner call(ServiceResponse> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2061,12 +2198,12 @@ public Observable> restartWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.restart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Restarts one or more virtual machines in a VM scale set. @@ -2077,10 +2214,9 @@ public Observable> restartWithServ * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner restart(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void restart(String resourceGroupName, String vmScaleSetName, List instanceIds) { + restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -2093,7 +2229,7 @@ public OperationStatusResponseInner restart(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture restartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -2106,10 +2242,10 @@ public ServiceFuture restartAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable restartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable restartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2124,7 +2260,7 @@ public OperationStatusResponseInner call(ServiceResponse> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2135,14 +2271,14 @@ public Observable> restartWithServ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.restart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2153,10 +2289,9 @@ public Observable> restartWithServ * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRestart(String resourceGroupName, String vmScaleSetName) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginRestart(String resourceGroupName, String vmScaleSetName) { + beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -2168,7 +2303,7 @@ public OperationStatusResponseInner beginRestart(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2178,12 +2313,12 @@ public ServiceFuture beginRestartAsync(String reso * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName) { + return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2195,9 +2330,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2207,16 +2342,16 @@ public Observable> beginRestartWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginRestart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRestartDelegate(response); + ServiceResponse clientResponse = beginRestartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2234,10 +2369,9 @@ public Observable> call(Response instanceIds) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginRestart(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -2250,7 +2384,7 @@ public OperationStatusResponseInner beginRestart(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginRestartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -2261,12 +2395,12 @@ public ServiceFuture beginRestartAsync(String reso * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRestartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2279,9 +2413,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2292,18 +2426,18 @@ public Observable> beginRestartWit throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginRestart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRestartDelegate(response); + ServiceResponse clientResponse = beginRestartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2312,9 +2446,9 @@ public Observable> call(Response beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2328,10 +2462,9 @@ private ServiceResponse beginRestartDelegate(Respo * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner start(String resourceGroupName, String vmScaleSetName) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void start(String resourceGroupName, String vmScaleSetName) { + startWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** @@ -2343,7 +2476,7 @@ public OperationStatusResponseInner start(String resourceGroupName, String vmSca * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2355,10 +2488,10 @@ public ServiceFuture startAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable startAsync(String resourceGroupName, String vmScaleSetName) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable startAsync(String resourceGroupName, String vmScaleSetName) { + return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2372,7 +2505,7 @@ public OperationStatusResponseInner call(ServiceResponse> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2382,12 +2515,12 @@ public Observable> startWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable> observable = service.start(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Starts one or more virtual machines in a VM scale set. @@ -2398,10 +2531,9 @@ public Observable> startWithServic * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner start(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void start(String resourceGroupName, String vmScaleSetName, List instanceIds) { + startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** @@ -2414,7 +2546,7 @@ public OperationStatusResponseInner start(String resourceGroupName, String vmSca * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture startAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -2427,10 +2559,10 @@ public ServiceFuture startAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable startAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable startAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2445,7 +2577,7 @@ public OperationStatusResponseInner call(ServiceResponse> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2456,14 +2588,14 @@ public Observable> startWithServic throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable> observable = service.start(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2474,10 +2606,9 @@ public Observable> startWithServic * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginStart(String resourceGroupName, String vmScaleSetName) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginStart(String resourceGroupName, String vmScaleSetName) { + beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -2489,7 +2620,7 @@ public OperationStatusResponseInner beginStart(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -2499,12 +2630,12 @@ public ServiceFuture beginStartAsync(String resour * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName) { + return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2516,9 +2647,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2528,16 +2659,16 @@ public Observable> beginStartWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginStart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginStartDelegate(response); + ServiceResponse clientResponse = beginStartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2555,10 +2686,9 @@ public Observable> call(Response instanceIds) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginStart(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -2571,7 +2701,7 @@ public OperationStatusResponseInner beginStart(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginStartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -2582,12 +2712,12 @@ public ServiceFuture beginStartAsync(String resour * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginStartAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2600,9 +2730,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2613,18 +2743,18 @@ public Observable> beginStartWithS throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginStart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginStartDelegate(response); + ServiceResponse clientResponse = beginStartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2633,71 +2763,66 @@ public Observable> call(Response beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner updateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void redeploy(String resourceGroupName, String vmScaleSetName) { + redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable redeployAsync(String resourceGroupName, String vmScaleSetName) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); } /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> updateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2707,74 +2832,69 @@ public Observable> updateInstances if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (instanceIds == null) { - throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); - } - Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; - VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); - vmInstanceIDs.withInstanceIds(instanceIds); - Observable> observable = service.updateInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2018-04-01"; + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(null); + Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } - /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginUpdateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void redeploy(String resourceGroupName, String vmScaleSetName, List instanceIds) { + redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + public ServiceFuture redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the observable for the request */ - public Observable beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable redeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); } /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param instanceIds The virtual machine scale set instance ids. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the observable for the request */ - public Observable> beginUpdateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2784,51 +2904,32 @@ public Observable> beginUpdateInst if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (instanceIds == null) { - throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); - } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; - VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); - vmInstanceIDs.withInstanceIds(instanceIds); - return service.beginUpdateInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateInstancesDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateInstancesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); + final String apiVersion = "2018-04-01"; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; + if (instanceIds != null) { + vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(instanceIds); + } + Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimage(String resourceGroupName, String vmScaleSetName) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void beginRedeploy(String resourceGroupName, String vmScaleSetName) { + beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2836,36 +2937,36 @@ public OperationStatusResponseInner reimage(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the {@link ServiceResponse} object if successful. */ - public Observable reimageAsync(String resourceGroupName, String vmScaleSetName) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the {@link ServiceResponse} object if successful. */ - public Observable> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2875,15 +2976,26 @@ public Observable> reimageWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; - final String instanceIdsConverted = null; + final String apiVersion = "2018-04-01"; + final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); - Observable> observable = service.reimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return service.beginRedeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRedeployDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); } + /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2891,14 +3003,13 @@ public Observable> reimageWithServ * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimage(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void beginRedeploy(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2907,38 +3018,38 @@ public OperationStatusResponseInner reimage(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the {@link ServiceResponse} object if successful. */ - public Observable reimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Redeploy one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the {@link ServiceResponse} object if successful. */ - public Observable> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2949,32 +3060,49 @@ public Observable> reimageWithServ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } - Observable> observable = service.reimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return service.beginRedeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRedeployDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginReimage(String resourceGroupName, String vmScaleSetName) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void performMaintenance(String resourceGroupName, String vmScaleSetName) { + performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -2982,36 +3110,36 @@ public OperationStatusResponseInner beginReimage(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the observable for the request */ - public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the observable for the request */ - public Observable> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3021,26 +3149,15 @@ public Observable> beginReimageWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; - final List instanceIds = null; + final String apiVersion = "2018-04-01"; + final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); - return service.beginReimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginReimageDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); + Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } - /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -3048,14 +3165,13 @@ public Observable> call(Response instanceIds) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void performMaintenance(String resourceGroupName, String vmScaleSetName, List instanceIds) { + performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -3064,38 +3180,38 @@ public OperationStatusResponseInner beginReimage(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the observable for the request */ - public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the observable for the request */ - public Observable> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3106,50 +3222,31 @@ public Observable> beginReimageWit throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } - return service.beginReimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginReimageDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginReimageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); + Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimageAll(String resourceGroupName, String vmScaleSetName) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + public void beginPerformMaintenance(String resourceGroupName, String vmScaleSetName) { + beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -3157,36 +3254,36 @@ public OperationStatusResponseInner reimageAll(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the {@link ServiceResponse} object if successful. */ - public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); } /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the {@link ServiceResponse} object if successful. */ - public Observable> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3196,15 +3293,26 @@ public Observable> reimageAllWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; - final String instanceIdsConverted = null; + final String apiVersion = "2018-04-01"; + final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); - Observable> observable = service.reimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); } + /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -3212,14 +3320,13 @@ public Observable> reimageAllWithS * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner reimageAll(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + public void beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. @@ -3228,38 +3335,38 @@ public OperationStatusResponseInner reimageAll(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the {@link ServiceResponse} object if successful. */ - public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); } /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * Perform maintenance on one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the {@link ServiceResponse} object if successful. */ - public Observable> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3270,15 +3377,664 @@ public Observable> reimageAllWithS throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } - Observable> observable = service.reimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } + return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void updateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { + updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + } + + /** + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + } + + /** + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (instanceIds == null) { + throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); + } + Validator.validate(instanceIds); + final String apiVersion = "2018-04-01"; + VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); + vmInstanceIDs.withInstanceIds(instanceIds); + Observable> observable = service.updateInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginUpdateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + } + + /** + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + } + + /** + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginUpdateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (instanceIds == null) { + throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); + } + Validator.validate(instanceIds); + final String apiVersion = "2018-04-01"; + VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); + vmInstanceIDs.withInstanceIds(instanceIds); + return service.beginUpdateInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateInstancesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateInstancesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void reimage(String resourceGroupName, String vmScaleSetName) { + reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable reimageAsync(String resourceGroupName, String vmScaleSetName) { + return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(null); + Observable> observable = service.reimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void reimage(String resourceGroupName, String vmScaleSetName, List instanceIds) { + reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture reimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable reimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(instanceIds); + final String apiVersion = "2018-04-01"; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; + if (instanceIds != null) { + vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(instanceIds); + } + Observable> observable = service.reimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginReimage(String resourceGroupName, String vmScaleSetName) { + beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName) { + return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final List instanceIds = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(null); + return service.beginReimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginReimageDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginReimage(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginReimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginReimageAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(instanceIds); + final String apiVersion = "2018-04-01"; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; + if (instanceIds != null) { + vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(instanceIds); + } + return service.beginReimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginReimageDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginReimageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void reimageAll(String resourceGroupName, String vmScaleSetName) { + reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); + } + + /** + * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); + } + + /** + * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName) { + return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(null); + Observable> observable = service.reimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void reimageAll(String resourceGroupName, String vmScaleSetName, List instanceIds) { + reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); + } + + /** + * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture reimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); + } + + /** + * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable reimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(instanceIds); + final String apiVersion = "2018-04-01"; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; + if (instanceIds != null) { + vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs.withInstanceIds(instanceIds); + } + Observable> observable = service.reimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } /** * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. @@ -3288,10 +4044,9 @@ public Observable> reimageAllWithS * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginReimageAll(String resourceGroupName, String vmScaleSetName) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); + public void beginReimageAll(String resourceGroupName, String vmScaleSetName) { + beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); } /** @@ -3303,7 +4058,7 @@ public OperationStatusResponseInner beginReimageAll(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { + public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); } @@ -3313,12 +4068,12 @@ public ServiceFuture beginReimageAllAsync(String r * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName) { + return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3330,9 +4085,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { + public Observable> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3342,16 +4097,16 @@ public Observable> beginReimageAll if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginReimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageAllDelegate(response); + ServiceResponse clientResponse = beginReimageAllDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3369,10 +4124,9 @@ public Observable> call(Response instanceIds) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); + public void beginReimageAll(String resourceGroupName, String vmScaleSetName, List instanceIds) { + beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); } /** @@ -3385,7 +4139,7 @@ public OperationStatusResponseInner beginReimageAll(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { + public ServiceFuture beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); } @@ -3396,12 +4150,12 @@ public ServiceFuture beginReimageAllAsync(String r * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { - return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, OperationStatusResponseInner>() { + public Observable beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -3414,9 +4168,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { + public Observable> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3427,18 +4181,18 @@ public Observable> beginReimageAll throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginReimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginReimageAllDelegate(response); + ServiceResponse clientResponse = beginReimageAllDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3447,14 +4201,102 @@ public Observable> call(Response beginReimageAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginReimageAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } + /** + * 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 = "2018-04-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. * @@ -3788,4 +4630,115 @@ private ServiceResponse> listSkusNextD .build(response); } + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<UpgradeOperationHistoricalStatusInfoInner> object if successful. + */ + public PagedList getOSUpgradeHistoryNext(final String nextPageLink) { + ServiceResponse> response = getOSUpgradeHistoryNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getOSUpgradeHistoryNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getOSUpgradeHistoryNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UpgradeOperationHistoricalStatusInfoInner> object + */ + public Observable> getOSUpgradeHistoryNextAsync(final String nextPageLink) { + return getOSUpgradeHistoryNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UpgradeOperationHistoricalStatusInfoInner> object + */ + public Observable>> getOSUpgradeHistoryNextWithServiceResponseAsync(final String nextPageLink) { + return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getOSUpgradeHistoryNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<UpgradeOperationHistoricalStatusInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getOSUpgradeHistoryNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.getOSUpgradeHistoryNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getOSUpgradeHistoryNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getOSUpgradeHistoryNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizeInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizeInner.java index c96dd606266..f9d2279c17a 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizeInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizeInner.java @@ -52,7 +52,7 @@ public class VirtualMachineSizeInner { private Integer maxDataDiskCount; /** - * Get the name value. + * Get the name of the virtual machine size. * * @return the name value */ @@ -61,7 +61,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the virtual machine size. * * @param name the name value to set * @return the VirtualMachineSizeInner object itself. @@ -72,7 +72,7 @@ public VirtualMachineSizeInner withName(String name) { } /** - * Get the numberOfCores value. + * Get the number of cores supported by the virtual machine size. * * @return the numberOfCores value */ @@ -81,7 +81,7 @@ public Integer numberOfCores() { } /** - * Set the numberOfCores value. + * Set the number of cores supported by the virtual machine size. * * @param numberOfCores the numberOfCores value to set * @return the VirtualMachineSizeInner object itself. @@ -92,7 +92,7 @@ public VirtualMachineSizeInner withNumberOfCores(Integer numberOfCores) { } /** - * Get the osDiskSizeInMB value. + * Get the OS disk size, in MB, allowed by the virtual machine size. * * @return the osDiskSizeInMB value */ @@ -101,7 +101,7 @@ public Integer osDiskSizeInMB() { } /** - * Set the osDiskSizeInMB value. + * Set the OS disk size, in MB, allowed by the virtual machine size. * * @param osDiskSizeInMB the osDiskSizeInMB value to set * @return the VirtualMachineSizeInner object itself. @@ -112,7 +112,7 @@ public VirtualMachineSizeInner withOsDiskSizeInMB(Integer osDiskSizeInMB) { } /** - * Get the resourceDiskSizeInMB value. + * Get the resource disk size, in MB, allowed by the virtual machine size. * * @return the resourceDiskSizeInMB value */ @@ -121,7 +121,7 @@ public Integer resourceDiskSizeInMB() { } /** - * Set the resourceDiskSizeInMB value. + * Set the resource disk size, in MB, allowed by the virtual machine size. * * @param resourceDiskSizeInMB the resourceDiskSizeInMB value to set * @return the VirtualMachineSizeInner object itself. @@ -132,7 +132,7 @@ public VirtualMachineSizeInner withResourceDiskSizeInMB(Integer resourceDiskSize } /** - * Get the memoryInMB value. + * Get the amount of memory, in MB, supported by the virtual machine size. * * @return the memoryInMB value */ @@ -141,7 +141,7 @@ public Integer memoryInMB() { } /** - * Set the memoryInMB value. + * Set the amount of memory, in MB, supported by the virtual machine size. * * @param memoryInMB the memoryInMB value to set * @return the VirtualMachineSizeInner object itself. @@ -152,7 +152,7 @@ public VirtualMachineSizeInner withMemoryInMB(Integer memoryInMB) { } /** - * Get the maxDataDiskCount value. + * Get the maximum number of data disks that can be attached to the virtual machine size. * * @return the maxDataDiskCount value */ @@ -161,7 +161,7 @@ public Integer maxDataDiskCount() { } /** - * Set the maxDataDiskCount value. + * Set the maximum number of data disks that can be attached to the virtual machine size. * * @param maxDataDiskCount the maxDataDiskCount value to set * @return the VirtualMachineSizeInner object itself. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java index 3fbac623fa6..679c4a43d73 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java @@ -113,14 +113,18 @@ public Observable>> listWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineUpdateInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineUpdateInner.java new file mode 100644 index 00000000000..26d3a8aa84c --- /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 Update. + */ +@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..b69dadbbf91 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java @@ -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; @@ -18,6 +17,9 @@ import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.compute.InstanceViewTypes; +import com.microsoft.azure.management.compute.RunCommandInput; +import com.microsoft.azure.management.compute.VirtualMachineCaptureParameters; +import com.microsoft.azure.management.compute.VirtualMachineUpdate; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -32,6 +34,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; @@ -45,7 +48,7 @@ * An instance of this class provides access to all the operations defined * in VirtualMachines. */ -public class VirtualMachinesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class VirtualMachinesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private VirtualMachinesService service; /** The service client containing this operation class. */ @@ -67,13 +70,17 @@ public VirtualMachinesInner(Retrofit retrofit, ComputeManagementClientImpl clien * used by Retrofit to perform actually REST calls. */ interface VirtualMachinesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines getExtensions" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions") + Observable> getExtensions(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines capture" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture") - Observable> capture(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineCaptureParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> capture(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineCaptureParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines beginCapture" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture") - Observable> beginCapture(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineCaptureParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginCapture(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineCaptureParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines createOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") @@ -83,6 +90,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 VirtualMachineUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", method = "DELETE", hasBody = true) 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); @@ -173,11 +188,11 @@ interface VirtualMachinesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines runCommand" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand") - Observable> runCommand(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body RunCommandInputInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> runCommand(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body RunCommandInput parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines beginRunCommand" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand") - Observable> beginRunCommand(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body RunCommandInputInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginRunCommand(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body RunCommandInput parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines listByResourceGroupNext" }) @GET @@ -189,6 +204,172 @@ interface VirtualMachinesService { } + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineExtensionsListResultInner object if successful. + */ + public VirtualMachineExtensionsListResultInner getExtensions(String resourceGroupName, String vmName) { + return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getExtensionsAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getExtensionsWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionsListResultInner object + */ + public Observable getExtensionsAsync(String resourceGroupName, String vmName) { + return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, VirtualMachineExtensionsListResultInner>() { + @Override + public VirtualMachineExtensionsListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionsListResultInner object + */ + public Observable> getExtensionsWithServiceResponseAsync(String resourceGroupName, String vmName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmName == null) { + throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final String expand = null; + return service.getExtensions(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getExtensionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualMachineExtensionsListResultInner object if successful. + */ + public VirtualMachineExtensionsListResultInner getExtensions(String resourceGroupName, String vmName, String expand) { + return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName, expand).toBlocking().single().body(); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getExtensionsAsync(String resourceGroupName, String vmName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getExtensionsWithServiceResponseAsync(resourceGroupName, vmName, expand), serviceCallback); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionsListResultInner object + */ + public Observable getExtensionsAsync(String resourceGroupName, String vmName, String expand) { + return getExtensionsWithServiceResponseAsync(resourceGroupName, vmName, expand).map(new Func1, VirtualMachineExtensionsListResultInner>() { + @Override + public VirtualMachineExtensionsListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param expand The expand expression to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualMachineExtensionsListResultInner object + */ + public Observable> getExtensionsWithServiceResponseAsync(String resourceGroupName, String vmName, String expand) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmName == null) { + throw new IllegalArgumentException("Parameter vmName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.getExtensions(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getExtensionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getExtensionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * @@ -200,7 +381,7 @@ interface VirtualMachinesService { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineCaptureResultInner object if successful. */ - public VirtualMachineCaptureResultInner capture(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters) { + public VirtualMachineCaptureResultInner capture(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { return captureWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().last().body(); } @@ -214,7 +395,7 @@ public VirtualMachineCaptureResultInner capture(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture captureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture captureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(captureWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); } @@ -227,7 +408,7 @@ public ServiceFuture captureAsync(String resou * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable captureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters) { + public Observable captureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { return captureWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1, VirtualMachineCaptureResultInner>() { @Override public VirtualMachineCaptureResultInner call(ServiceResponse response) { @@ -245,7 +426,7 @@ public VirtualMachineCaptureResultInner call(ServiceResponse> captureWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters) { + public Observable> captureWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -259,7 +440,7 @@ public Observable> captureWith throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.capture(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -275,7 +456,7 @@ public Observable> captureWith * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineCaptureResultInner object if successful. */ - public VirtualMachineCaptureResultInner beginCapture(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters) { + public VirtualMachineCaptureResultInner beginCapture(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { return beginCaptureWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().single().body(); } @@ -289,7 +470,7 @@ public VirtualMachineCaptureResultInner beginCapture(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginCaptureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginCaptureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginCaptureWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); } @@ -302,7 +483,7 @@ public ServiceFuture beginCaptureAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineCaptureResultInner object */ - public Observable beginCaptureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters) { + public Observable beginCaptureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { return beginCaptureWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1, VirtualMachineCaptureResultInner>() { @Override public VirtualMachineCaptureResultInner call(ServiceResponse response) { @@ -320,7 +501,7 @@ public VirtualMachineCaptureResultInner call(ServiceResponse> beginCaptureWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters) { + public Observable> beginCaptureWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -334,7 +515,7 @@ public Observable> beginCaptur throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCapture(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -427,7 +608,7 @@ public Observable> createOrUpdateWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.createOrUpdate(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -502,7 +683,7 @@ public Observable> beginCreateOrUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -525,6 +706,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, VirtualMachineUpdate 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, VirtualMachineUpdate 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, VirtualMachineUpdate 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, VirtualMachineUpdate 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 = "2018-04-01"; + Observable> observable = service.update(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * 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, VirtualMachineUpdate 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, VirtualMachineUpdate 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, VirtualMachineUpdate 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, VirtualMachineUpdate 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 = "2018-04-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. * @@ -533,10 +882,9 @@ private ServiceResponse beginCreateOrUpdateDelegate(Respons * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner delete(String resourceGroupName, String vmName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void delete(String resourceGroupName, String vmName) { + deleteWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -548,7 +896,7 @@ public OperationStatusResponseInner delete(String resourceGroupName, String vmNa * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deleteAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture deleteAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -560,10 +908,10 @@ public ServiceFuture deleteAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String vmName) { - return deleteWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String resourceGroupName, String vmName) { + return deleteWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -577,7 +925,7 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -587,9 +935,9 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.delete(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -600,10 +948,9 @@ public Observable> deleteWithServi * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String vmName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginDelete(String resourceGroupName, String vmName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -615,7 +962,7 @@ public OperationStatusResponseInner beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeleteAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -625,12 +972,12 @@ public ServiceFuture beginDeleteAsync(String resou * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeleteAsync(String resourceGroupName, String vmName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String resourceGroupName, String vmName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -642,9 +989,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -654,13 +1001,13 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -669,9 +1016,9 @@ public Observable> call(Response beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -740,7 +1087,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; final InstanceViewTypes expand = null; return service.getByResourceGroup(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -822,7 +1169,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -852,9 +1199,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 +1214,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 +1224,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 +1241,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."); } @@ -906,13 +1253,13 @@ public Observable> instanceViewWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.instanceView(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .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 +1268,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); } @@ -936,10 +1283,9 @@ private ServiceResponse instanceViewDelegate(Respons * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner convertToManagedDisks(String resourceGroupName, String vmName) { - return convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void convertToManagedDisks(String resourceGroupName, String vmName) { + convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -951,7 +1297,7 @@ public OperationStatusResponseInner convertToManagedDisks(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture convertToManagedDisksAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture convertToManagedDisksAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -963,10 +1309,10 @@ public ServiceFuture convertToManagedDisksAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable convertToManagedDisksAsync(String resourceGroupName, String vmName) { - return convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable convertToManagedDisksAsync(String resourceGroupName, String vmName) { + return convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -980,7 +1326,7 @@ public OperationStatusResponseInner call(ServiceResponse> convertToManagedDisksWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> convertToManagedDisksWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -990,9 +1336,9 @@ public Observable> convertToManage if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.convertToManagedDisks(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1003,10 +1349,9 @@ public Observable> convertToManage * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginConvertToManagedDisks(String resourceGroupName, String vmName) { - return beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginConvertToManagedDisks(String resourceGroupName, String vmName) { + beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -1018,7 +1363,7 @@ public OperationStatusResponseInner beginConvertToManagedDisks(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginConvertToManagedDisksAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginConvertToManagedDisksAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1028,12 +1373,12 @@ public ServiceFuture beginConvertToManagedDisksAsy * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginConvertToManagedDisksAsync(String resourceGroupName, String vmName) { - return beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginConvertToManagedDisksAsync(String resourceGroupName, String vmName) { + return beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1045,9 +1390,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginConvertToManagedDisksWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginConvertToManagedDisksWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1057,13 +1402,13 @@ public Observable> beginConvertToM if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginConvertToManagedDisks(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginConvertToManagedDisksDelegate(response); + ServiceResponse clientResponse = beginConvertToManagedDisksDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1072,9 +1417,9 @@ public Observable> call(Response beginConvertToManagedDisksDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginConvertToManagedDisksDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1088,10 +1433,9 @@ private ServiceResponse beginConvertToManagedDisks * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner deallocate(String resourceGroupName, String vmName) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void deallocate(String resourceGroupName, String vmName) { + deallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -1103,7 +1447,7 @@ public OperationStatusResponseInner deallocate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture deallocateAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture deallocateAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(deallocateWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1115,10 +1459,10 @@ public ServiceFuture deallocateAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deallocateAsync(String resourceGroupName, String vmName) { - return deallocateWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable deallocateAsync(String resourceGroupName, String vmName) { + return deallocateWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1132,7 +1476,7 @@ public OperationStatusResponseInner call(ServiceResponse> deallocateWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> deallocateWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1142,9 +1486,9 @@ public Observable> deallocateWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.deallocate(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1155,10 +1499,9 @@ public Observable> deallocateWithS * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDeallocate(String resourceGroupName, String vmName) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginDeallocate(String resourceGroupName, String vmName) { + beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -1170,7 +1513,7 @@ public OperationStatusResponseInner beginDeallocate(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginDeallocateAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1180,12 +1523,12 @@ public ServiceFuture beginDeallocateAsync(String r * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginDeallocateAsync(String resourceGroupName, String vmName) { - return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeallocateAsync(String resourceGroupName, String vmName) { + return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1197,9 +1540,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1209,13 +1552,13 @@ public Observable> beginDeallocate if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginDeallocate(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeallocateDelegate(response); + ServiceResponse clientResponse = beginDeallocateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1224,9 +1567,9 @@ public Observable> call(Response beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginDeallocateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1240,10 +1583,9 @@ private ServiceResponse beginDeallocateDelegate(Re * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner generalize(String resourceGroupName, String vmName) { - return generalizeWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void generalize(String resourceGroupName, String vmName) { + generalizeWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -1255,7 +1597,7 @@ public OperationStatusResponseInner generalize(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture generalizeAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture generalizeAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(generalizeWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1265,12 +1607,12 @@ public ServiceFuture generalizeAsync(String resour * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable generalizeAsync(String resourceGroupName, String vmName) { - return generalizeWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable generalizeAsync(String resourceGroupName, String vmName) { + return generalizeWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1282,9 +1624,9 @@ public OperationStatusResponseInner call(ServiceResponse> generalizeWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> generalizeWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1294,13 +1636,13 @@ public Observable> generalizeWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.generalize(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = generalizeDelegate(response); + ServiceResponse clientResponse = generalizeDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1309,9 +1651,9 @@ public Observable> call(Response generalizeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse generalizeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -1407,7 +1749,7 @@ public Observable>> listByResourceGrou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1512,7 +1854,7 @@ public Observable>> listSinglePageAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1596,14 +1938,18 @@ public Observable>> listAvailableS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.listAvailableSizes(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { ServiceResponse> result = listAvailableSizesDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1627,10 +1973,9 @@ private ServiceResponse> listAvailableSizesDel * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner powerOff(String resourceGroupName, String vmName) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void powerOff(String resourceGroupName, String vmName) { + powerOffWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -1642,7 +1987,7 @@ public OperationStatusResponseInner powerOff(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture powerOffAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture powerOffAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(powerOffWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1654,10 +1999,10 @@ public ServiceFuture powerOffAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable powerOffAsync(String resourceGroupName, String vmName) { - return powerOffWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable powerOffAsync(String resourceGroupName, String vmName) { + return powerOffWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1671,7 +2016,7 @@ public OperationStatusResponseInner call(ServiceResponse> powerOffWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> powerOffWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1681,9 +2026,9 @@ public Observable> powerOffWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.powerOff(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1694,10 +2039,9 @@ public Observable> powerOffWithSer * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginPowerOff(String resourceGroupName, String vmName) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginPowerOff(String resourceGroupName, String vmName) { + beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -1709,7 +2053,7 @@ public OperationStatusResponseInner beginPowerOff(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginPowerOffAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1719,12 +2063,12 @@ public ServiceFuture beginPowerOffAsync(String res * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPowerOffAsync(String resourceGroupName, String vmName) { - return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPowerOffAsync(String resourceGroupName, String vmName) { + return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1736,9 +2080,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1748,13 +2092,13 @@ public Observable> beginPowerOffWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginPowerOff(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPowerOffDelegate(response); + ServiceResponse clientResponse = beginPowerOffDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1763,9 +2107,9 @@ public Observable> call(Response beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPowerOffDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1779,10 +2123,9 @@ private ServiceResponse beginPowerOffDelegate(Resp * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner restart(String resourceGroupName, String vmName) { - return restartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void restart(String resourceGroupName, String vmName) { + restartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -1794,7 +2137,7 @@ public OperationStatusResponseInner restart(String resourceGroupName, String vmN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture restartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture restartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1806,10 +2149,10 @@ public ServiceFuture restartAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable restartAsync(String resourceGroupName, String vmName) { - return restartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable restartAsync(String resourceGroupName, String vmName) { + return restartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1823,7 +2166,7 @@ public OperationStatusResponseInner call(ServiceResponse> restartWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1833,9 +2176,9 @@ public Observable> restartWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.restart(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1846,10 +2189,9 @@ public Observable> restartWithServ * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRestart(String resourceGroupName, String vmName) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginRestart(String resourceGroupName, String vmName) { + beginRestartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -1861,7 +2203,7 @@ public OperationStatusResponseInner beginRestart(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRestartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRestartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1871,12 +2213,12 @@ public ServiceFuture beginRestartAsync(String reso * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRestartAsync(String resourceGroupName, String vmName) { - return beginRestartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRestartAsync(String resourceGroupName, String vmName) { + return beginRestartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1888,9 +2230,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1900,13 +2242,13 @@ public Observable> beginRestartWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginRestart(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRestartDelegate(response); + ServiceResponse clientResponse = beginRestartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1915,9 +2257,9 @@ public Observable> call(Response beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1931,10 +2273,9 @@ private ServiceResponse beginRestartDelegate(Respo * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner start(String resourceGroupName, String vmName) { - return startWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void start(String resourceGroupName, String vmName) { + startWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -1946,7 +2287,7 @@ public OperationStatusResponseInner start(String resourceGroupName, String vmNam * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture startAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture startAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -1958,10 +2299,10 @@ public ServiceFuture startAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable startAsync(String resourceGroupName, String vmName) { - return startWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable startAsync(String resourceGroupName, String vmName) { + return startWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -1975,7 +2316,7 @@ public OperationStatusResponseInner call(ServiceResponse> startWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> startWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1985,9 +2326,9 @@ public Observable> startWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.start(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1998,10 +2339,9 @@ public Observable> startWithServic * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginStart(String resourceGroupName, String vmName) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginStart(String resourceGroupName, String vmName) { + beginStartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -2013,7 +2353,7 @@ public OperationStatusResponseInner beginStart(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginStartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginStartAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2023,12 +2363,12 @@ public ServiceFuture beginStartAsync(String resour * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginStartAsync(String resourceGroupName, String vmName) { - return beginStartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginStartAsync(String resourceGroupName, String vmName) { + return beginStartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2040,9 +2380,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginStartWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2052,13 +2392,13 @@ public Observable> beginStartWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginStart(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginStartDelegate(response); + ServiceResponse clientResponse = beginStartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2067,9 +2407,9 @@ public Observable> call(Response beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2083,10 +2423,9 @@ private ServiceResponse beginStartDelegate(Respons * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner redeploy(String resourceGroupName, String vmName) { - return redeployWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void redeploy(String resourceGroupName, String vmName) { + redeployWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -2098,7 +2437,7 @@ public OperationStatusResponseInner redeploy(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture redeployAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture redeployAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2110,10 +2449,10 @@ public ServiceFuture redeployAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable redeployAsync(String resourceGroupName, String vmName) { - return redeployWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable redeployAsync(String resourceGroupName, String vmName) { + return redeployWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2127,7 +2466,7 @@ public OperationStatusResponseInner call(ServiceResponse> redeployWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> redeployWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2137,9 +2476,9 @@ public Observable> redeployWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.redeploy(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2150,10 +2489,9 @@ public Observable> redeployWithSer * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRedeploy(String resourceGroupName, String vmName) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginRedeploy(String resourceGroupName, String vmName) { + beginRedeployWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -2165,7 +2503,7 @@ public OperationStatusResponseInner beginRedeploy(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginRedeployAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2175,12 +2513,12 @@ public ServiceFuture beginRedeployAsync(String res * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginRedeployAsync(String resourceGroupName, String vmName) { - return beginRedeployWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRedeployAsync(String resourceGroupName, String vmName) { + return beginRedeployWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2192,9 +2530,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2204,13 +2542,13 @@ public Observable> beginRedeployWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginRedeploy(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRedeployDelegate(response); + ServiceResponse clientResponse = beginRedeployDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2219,9 +2557,9 @@ public Observable> call(Response beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRedeployDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2235,10 +2573,9 @@ private ServiceResponse beginRedeployDelegate(Resp * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmName) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); + public void performMaintenance(String resourceGroupName, String vmName) { + performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); } /** @@ -2250,7 +2587,7 @@ public OperationStatusResponseInner performMaintenance(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture performMaintenanceAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2262,10 +2599,10 @@ public ServiceFuture performMaintenanceAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable performMaintenanceAsync(String resourceGroupName, String vmName) { - return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable performMaintenanceAsync(String resourceGroupName, String vmName) { + return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2279,7 +2616,7 @@ public OperationStatusResponseInner call(ServiceResponse> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2289,9 +2626,9 @@ public Observable> performMaintena if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.performMaintenance(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -2302,10 +2639,9 @@ public Observable> performMaintena * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmName) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); + public void beginPerformMaintenance(String resourceGroupName, String vmName) { + beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); } /** @@ -2317,7 +2653,7 @@ public OperationStatusResponseInner beginPerformMaintenance(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { + public ServiceFuture beginPerformMaintenanceAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); } @@ -2327,12 +2663,12 @@ public ServiceFuture beginPerformMaintenanceAsync( * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the OperationStatusResponseInner object + * @return the {@link ServiceResponse} object if successful. */ - public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmName) { - return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginPerformMaintenanceAsync(String resourceGroupName, String vmName) { + return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1, Void>() { @Override - public OperationStatusResponseInner call(ServiceResponse response) { + public Void call(ServiceResponse response) { return response.body(); } }); @@ -2344,9 +2680,9 @@ public OperationStatusResponseInner call(ServiceResponse> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmName) { + public Observable> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2356,13 +2692,13 @@ public Observable> beginPerformMai if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2018-04-01"; return service.beginPerformMaintenance(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); + ServiceResponse clientResponse = beginPerformMaintenanceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2371,9 +2707,9 @@ public Observable> call(Response beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginPerformMaintenanceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -2388,9 +2724,9 @@ private ServiceResponse beginPerformMaintenanceDel * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RunCommandResultInner object if successful. + * @return the List<InstanceViewStatusInner> object if successful. */ - public RunCommandResultInner runCommand(String resourceGroupName, String vmName, RunCommandInputInner parameters) { + public List runCommand(String resourceGroupName, String vmName, RunCommandInput parameters) { return runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().last().body(); } @@ -2404,7 +2740,7 @@ public RunCommandResultInner runCommand(String resourceGroupName, String vmName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture runCommandAsync(String resourceGroupName, String vmName, RunCommandInputInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture> runCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters, final ServiceCallback> serviceCallback) { return ServiceFuture.fromResponse(runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); } @@ -2417,10 +2753,10 @@ public ServiceFuture runCommandAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable runCommandAsync(String resourceGroupName, String vmName, RunCommandInputInner parameters) { - return runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1, RunCommandResultInner>() { + public Observable> runCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { + return runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1>, List>() { @Override - public RunCommandResultInner call(ServiceResponse response) { + public List call(ServiceResponse> response) { return response.body(); } }); @@ -2435,7 +2771,7 @@ public RunCommandResultInner call(ServiceResponse respons * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> runCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInputInner parameters) { + public Observable>> runCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2449,9 +2785,9 @@ 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 = "2018-04-01"; Observable> observable = service.runCommand(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken>() { }.getType()); } /** @@ -2463,9 +2799,9 @@ public Observable> runCommandWithServiceR * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RunCommandResultInner object if successful. + * @return the List<InstanceViewStatusInner> object if successful. */ - public RunCommandResultInner beginRunCommand(String resourceGroupName, String vmName, RunCommandInputInner parameters) { + public List beginRunCommand(String resourceGroupName, String vmName, RunCommandInput parameters) { return beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().single().body(); } @@ -2479,7 +2815,7 @@ public RunCommandResultInner beginRunCommand(String resourceGroupName, String vm * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInputInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture> beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters, final ServiceCallback> serviceCallback) { return ServiceFuture.fromResponse(beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); } @@ -2490,12 +2826,12 @@ public ServiceFuture beginRunCommandAsync(String resource * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Run command operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RunCommandResultInner object + * @return the observable to the List<InstanceViewStatusInner> object */ - public Observable beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInputInner parameters) { - return beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1, RunCommandResultInner>() { + public Observable> beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { + return beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1>, List>() { @Override - public RunCommandResultInner call(ServiceResponse response) { + public List call(ServiceResponse> response) { return response.body(); } }); @@ -2508,9 +2844,9 @@ public RunCommandResultInner call(ServiceResponse respons * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Run command operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RunCommandResultInner object + * @return the observable to the List<InstanceViewStatusInner> object */ - public Observable> beginRunCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInputInner parameters) { + public Observable>> beginRunCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2524,13 +2860,13 @@ 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 = "2018-04-01"; return service.beginRunCommand(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = beginRunCommandDelegate(response); + ServiceResponse> clientResponse = beginRunCommandDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2539,9 +2875,9 @@ public Observable> call(Response beginRunCommandDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> beginRunCommandDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response);