diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/pom.xml b/vmwarecloudsimple/resource-manager/v2019_04_01/pom.xml index d99de1d06398..6759fe08206d 100644 --- a/vmwarecloudsimple/resource-manager/v2019_04_01/pom.xml +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/pom.xml @@ -11,8 +11,8 @@ com.microsoft.azure azure-arm-parent - 1.1.0 - ../../../pom.management.xml + 0.0.3-beta + ../../../pom.xml azure-mgmt-vmwarecloudsimple 1.0.0-beta @@ -71,8 +71,6 @@ azure-arm-client-runtime test-jar test - - 1.6.5 diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationHostName.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationHostName.java new file mode 100644 index 000000000000..dbe9bb59e82a --- /dev/null +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationHostName.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.vmwarecloudsimple.v2019_04_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Host name model. + */ +public class CustomizationHostName { + /** + * Hostname. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Type of host name. Possible values include: 'USER_DEFINED', + * 'PREFIX_BASED', 'FIXED', 'VIRTUAL_MACHINE_NAME', 'CUSTOM_NAME'. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get hostname. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set hostname. + * + * @param name the name value to set + * @return the CustomizationHostName object itself. + */ + public CustomizationHostName withName(String name) { + this.name = name; + return this; + } + + /** + * Get type of host name. Possible values include: 'USER_DEFINED', 'PREFIX_BASED', 'FIXED', 'VIRTUAL_MACHINE_NAME', 'CUSTOM_NAME'. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set type of host name. Possible values include: 'USER_DEFINED', 'PREFIX_BASED', 'FIXED', 'VIRTUAL_MACHINE_NAME', 'CUSTOM_NAME'. + * + * @param type the type value to set + * @return the CustomizationHostName object itself. + */ + public CustomizationHostName withType(String type) { + this.type = type; + return this; + } + +} diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationIPAddress.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationIPAddress.java new file mode 100644 index 000000000000..972d302948e6 --- /dev/null +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationIPAddress.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.vmwarecloudsimple.v2019_04_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The CustomizationIPAddress model. + */ +public class CustomizationIPAddress { + /** + * Argument when Custom ip type is selected. + */ + @JsonProperty(value = "argument") + private String argument; + + /** + * Defined Ip Address when Fixed ip type is selected. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * Customization Specification ip type. Possible values include: 'CUSTOM', + * 'DHCP_IP', 'FIXED_IP', 'USER_DEFINED'. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get argument when Custom ip type is selected. + * + * @return the argument value + */ + public String argument() { + return this.argument; + } + + /** + * Set argument when Custom ip type is selected. + * + * @param argument the argument value to set + * @return the CustomizationIPAddress object itself. + */ + public CustomizationIPAddress withArgument(String argument) { + this.argument = argument; + return this; + } + + /** + * Get defined Ip Address when Fixed ip type is selected. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set defined Ip Address when Fixed ip type is selected. + * + * @param ipAddress the ipAddress value to set + * @return the CustomizationIPAddress object itself. + */ + public CustomizationIPAddress withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get customization Specification ip type. Possible values include: 'CUSTOM', 'DHCP_IP', 'FIXED_IP', 'USER_DEFINED'. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set customization Specification ip type. Possible values include: 'CUSTOM', 'DHCP_IP', 'FIXED_IP', 'USER_DEFINED'. + * + * @param type the type value to set + * @return the CustomizationIPAddress object itself. + */ + public CustomizationIPAddress withType(String type) { + this.type = type; + return this; + } + +} diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationIPSettings.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationIPSettings.java new file mode 100644 index 000000000000..b66c9d343175 --- /dev/null +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationIPSettings.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.vmwarecloudsimple.v2019_04_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The CustomizationIPSettings model. + */ +public class CustomizationIPSettings { + /** + * The list of gateways. + */ + @JsonProperty(value = "gateway") + private List gateway; + + /** + * Ip address customization settings. + */ + @JsonProperty(value = "ip") + private CustomizationIPAddress ip; + + /** + * Adapter subnet mask. + */ + @JsonProperty(value = "subnetMask") + private String subnetMask; + + /** + * Get the list of gateways. + * + * @return the gateway value + */ + public List gateway() { + return this.gateway; + } + + /** + * Set the list of gateways. + * + * @param gateway the gateway value to set + * @return the CustomizationIPSettings object itself. + */ + public CustomizationIPSettings withGateway(List gateway) { + this.gateway = gateway; + return this; + } + + /** + * Get ip address customization settings. + * + * @return the ip value + */ + public CustomizationIPAddress ip() { + return this.ip; + } + + /** + * Set ip address customization settings. + * + * @param ip the ip value to set + * @return the CustomizationIPSettings object itself. + */ + public CustomizationIPSettings withIp(CustomizationIPAddress ip) { + this.ip = ip; + return this; + } + + /** + * Get adapter subnet mask. + * + * @return the subnetMask value + */ + public String subnetMask() { + return this.subnetMask; + } + + /** + * Set adapter subnet mask. + * + * @param subnetMask the subnetMask value to set + * @return the CustomizationIPSettings object itself. + */ + public CustomizationIPSettings withSubnetMask(String subnetMask) { + this.subnetMask = subnetMask; + return this; + } + +} diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationIdentity.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationIdentity.java new file mode 100644 index 000000000000..2c459048a885 --- /dev/null +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationIdentity.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.vmwarecloudsimple.v2019_04_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The CustomizationIdentity model. + */ +public class CustomizationIdentity { + /** + * Windows Text Identity. Prepared data. + */ + @JsonProperty(value = "data") + private String data; + + /** + * Virtual machine host name settings. + */ + @JsonProperty(value = "hostName") + private CustomizationHostName hostName; + + /** + * Identity type. Possible values include: 'WINDOWS_TEXT', 'WINDOWS', + * 'LINUX'. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Windows Identity. User data customization. + */ + @JsonProperty(value = "userData") + private CustomizationIdentityUserData userData; + + /** + * Get windows Text Identity. Prepared data. + * + * @return the data value + */ + public String data() { + return this.data; + } + + /** + * Set windows Text Identity. Prepared data. + * + * @param data the data value to set + * @return the CustomizationIdentity object itself. + */ + public CustomizationIdentity withData(String data) { + this.data = data; + return this; + } + + /** + * Get virtual machine host name settings. + * + * @return the hostName value + */ + public CustomizationHostName hostName() { + return this.hostName; + } + + /** + * Set virtual machine host name settings. + * + * @param hostName the hostName value to set + * @return the CustomizationIdentity object itself. + */ + public CustomizationIdentity withHostName(CustomizationHostName hostName) { + this.hostName = hostName; + return this; + } + + /** + * Get identity type. Possible values include: 'WINDOWS_TEXT', 'WINDOWS', 'LINUX'. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set identity type. Possible values include: 'WINDOWS_TEXT', 'WINDOWS', 'LINUX'. + * + * @param type the type value to set + * @return the CustomizationIdentity object itself. + */ + public CustomizationIdentity withType(String type) { + this.type = type; + return this; + } + + /** + * Get windows Identity. User data customization. + * + * @return the userData value + */ + public CustomizationIdentityUserData userData() { + return this.userData; + } + + /** + * Set windows Identity. User data customization. + * + * @param userData the userData value to set + * @return the CustomizationIdentity object itself. + */ + public CustomizationIdentity withUserData(CustomizationIdentityUserData userData) { + this.userData = userData; + return this; + } + +} diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationIdentityUserData.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationIdentityUserData.java new file mode 100644 index 000000000000..e618fa00d51d --- /dev/null +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationIdentityUserData.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.vmwarecloudsimple.v2019_04_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Windows Identity. User data customization. + */ +public class CustomizationIdentityUserData { + /** + * Is password predefined in customization policy. + */ + @JsonProperty(value = "isPasswordPredefined") + private Boolean isPasswordPredefined; + + /** + * Get is password predefined in customization policy. + * + * @return the isPasswordPredefined value + */ + public Boolean isPasswordPredefined() { + return this.isPasswordPredefined; + } + + /** + * Set is password predefined in customization policy. + * + * @param isPasswordPredefined the isPasswordPredefined value to set + * @return the CustomizationIdentityUserData object itself. + */ + public CustomizationIdentityUserData withIsPasswordPredefined(Boolean isPasswordPredefined) { + this.isPasswordPredefined = isPasswordPredefined; + return this; + } + +} diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationNicSetting.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationNicSetting.java new file mode 100644 index 000000000000..c7cc64a7ed27 --- /dev/null +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationNicSetting.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.vmwarecloudsimple.v2019_04_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The CustomizationNicSetting model. + */ +public class CustomizationNicSetting { + /** + * The list of adapters' settings. + */ + @JsonProperty(value = "adapter") + private CustomizationIPSettings adapter; + + /** + * NIC mac address. + */ + @JsonProperty(value = "macAddress") + private String macAddress; + + /** + * Get the list of adapters' settings. + * + * @return the adapter value + */ + public CustomizationIPSettings adapter() { + return this.adapter; + } + + /** + * Set the list of adapters' settings. + * + * @param adapter the adapter value to set + * @return the CustomizationNicSetting object itself. + */ + public CustomizationNicSetting withAdapter(CustomizationIPSettings adapter) { + this.adapter = adapter; + return this; + } + + /** + * Get nIC mac address. + * + * @return the macAddress value + */ + public String macAddress() { + return this.macAddress; + } + + /** + * Set nIC mac address. + * + * @param macAddress the macAddress value to set + * @return the CustomizationNicSetting object itself. + */ + public CustomizationNicSetting withMacAddress(String macAddress) { + this.macAddress = macAddress; + return this; + } + +} diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationPolicies.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationPolicies.java new file mode 100644 index 000000000000..63e169ee756c --- /dev/null +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationPolicies.java @@ -0,0 +1,42 @@ +/** + * 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.vmwarecloudsimple.v2019_04_01; + +import rx.Observable; +import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.implementation.CustomizationPoliciesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing CustomizationPolicies. + */ +public interface CustomizationPolicies extends HasInner { + /** + * Implements get of customization policy. + * Returns customization policy by its name. + * + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param customizationPolicyName customization policy name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String regionId, String pcName, String customizationPolicyName); + + /** + * Implements get of customization policies list. + * Returns list of customization policies in region for private cloud. + * + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String regionId, final String pcName); + +} diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationPolicy.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationPolicy.java new file mode 100644 index 000000000000..06ef098effcb --- /dev/null +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationPolicy.java @@ -0,0 +1,67 @@ +/** + * 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.vmwarecloudsimple.v2019_04_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.implementation.CustomizationPolicyInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.implementation.VMwareCloudSimpleManager; + +/** + * Type representing CustomizationPolicy. + */ +public interface CustomizationPolicy extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the customizationPolicyPropertiesType value. + */ + String customizationPolicyPropertiesType(); + + /** + * @return the description value. + */ + String description(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the privateCloudId value. + */ + String privateCloudId(); + + /** + * @return the specification value. + */ + CustomizationSpecification specification(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the version value. + */ + String version(); + +} diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationSpecification.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationSpecification.java new file mode 100644 index 000000000000..6a08e2f92f27 --- /dev/null +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/CustomizationSpecification.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.vmwarecloudsimple.v2019_04_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The specification for Customization Policy. + */ +public class CustomizationSpecification { + /** + * Customization Identity. It contains data about user and hostname. + */ + @JsonProperty(value = "identity") + private CustomizationIdentity identity; + + /** + * Network interface settings. + */ + @JsonProperty(value = "nicSettings") + private List nicSettings; + + /** + * Get customization Identity. It contains data about user and hostname. + * + * @return the identity value + */ + public CustomizationIdentity identity() { + return this.identity; + } + + /** + * Set customization Identity. It contains data about user and hostname. + * + * @param identity the identity value to set + * @return the CustomizationSpecification object itself. + */ + public CustomizationSpecification withIdentity(CustomizationIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get network interface settings. + * + * @return the nicSettings value + */ + public List nicSettings() { + return this.nicSettings; + } + + /** + * Set network interface settings. + * + * @param nicSettings the nicSettings value to set + * @return the CustomizationSpecification object itself. + */ + public CustomizationSpecification withNicSettings(List nicSettings) { + this.nicSettings = nicSettings; + return this; + } + +} diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/DedicatedCloudService.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/DedicatedCloudService.java index fa455685ccac..ffd1b57113f6 100644 --- a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/DedicatedCloudService.java +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/DedicatedCloudService.java @@ -78,71 +78,23 @@ interface WithGatewaySubnet { WithCreate withGatewaySubnet(String gatewaySubnet); } - /** - * The stage of the dedicatedcloudservice definition allowing to specify Nodes. - */ - interface WithNodes { - /** - * Specifies nodes. - * @param nodes total nodes purchased - * @return the next definition stage - */ - WithCreate withNodes(Integer nodes); - } - - /** - * The stage of the dedicatedcloudservice definition allowing to specify ServiceURL. - */ - interface WithServiceURL { - /** - * Specifies serviceURL. - * @param serviceURL link to a service management web portal - * @return the next definition stage - */ - WithCreate withServiceURL(String serviceURL); - } - /** * The stage of the definition which contains all the minimum required inputs for * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithNodes, DefinitionStages.WithServiceURL { + interface WithCreate extends Creatable, Resource.DefinitionWithTags { } } /** * The template for a DedicatedCloudService update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithNodes, UpdateStages.WithServiceURL { + interface Update extends Appliable, Resource.UpdateWithTags { } /** * Grouping of DedicatedCloudService update stages. */ interface UpdateStages { - /** - * The stage of the dedicatedcloudservice update allowing to specify Nodes. - */ - interface WithNodes { - /** - * Specifies nodes. - * @param nodes total nodes purchased - * @return the next update stage - */ - Update withNodes(Integer nodes); - } - - /** - * The stage of the dedicatedcloudservice update allowing to specify ServiceURL. - */ - interface WithServiceURL { - /** - * Specifies serviceURL. - * @param serviceURL link to a service management web portal - * @return the next update stage - */ - Update withServiceURL(String serviceURL); - } - } } diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/GuestOSCustomization.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/GuestOSCustomization.java new file mode 100644 index 000000000000..9f752dfec5c7 --- /dev/null +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/GuestOSCustomization.java @@ -0,0 +1,148 @@ +/** + * 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.vmwarecloudsimple.v2019_04_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Guest OS Customization properties. + */ +public class GuestOSCustomization { + /** + * List of dns servers to use. + */ + @JsonProperty(value = "dnsServers") + private List dnsServers; + + /** + * Virtual Machine hostname. + */ + @JsonProperty(value = "hostName") + private String hostName; + + /** + * Password for login. + */ + @JsonProperty(value = "password") + private String password; + + /** + * id of customization policy. + */ + @JsonProperty(value = "policyId") + private String policyId; + + /** + * Username for login. + */ + @JsonProperty(value = "username") + private String username; + + /** + * Get list of dns servers to use. + * + * @return the dnsServers value + */ + public List dnsServers() { + return this.dnsServers; + } + + /** + * Set list of dns servers to use. + * + * @param dnsServers the dnsServers value to set + * @return the GuestOSCustomization object itself. + */ + public GuestOSCustomization withDnsServers(List dnsServers) { + this.dnsServers = dnsServers; + return this; + } + + /** + * Get virtual Machine hostname. + * + * @return the hostName value + */ + public String hostName() { + return this.hostName; + } + + /** + * Set virtual Machine hostname. + * + * @param hostName the hostName value to set + * @return the GuestOSCustomization object itself. + */ + public GuestOSCustomization withHostName(String hostName) { + this.hostName = hostName; + return this; + } + + /** + * Get password for login. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set password for login. + * + * @param password the password value to set + * @return the GuestOSCustomization object itself. + */ + public GuestOSCustomization withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get id of customization policy. + * + * @return the policyId value + */ + public String policyId() { + return this.policyId; + } + + /** + * Set id of customization policy. + * + * @param policyId the policyId value to set + * @return the GuestOSCustomization object itself. + */ + public GuestOSCustomization withPolicyId(String policyId) { + this.policyId = policyId; + return this; + } + + /** + * Get username for login. + * + * @return the username value + */ + public String username() { + return this.username; + } + + /** + * Set username for login. + * + * @param username the username value to set + * @return the GuestOSCustomization object itself. + */ + public GuestOSCustomization withUsername(String username) { + this.username = username; + return this; + } + +} diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/GuestOSNICCustomization.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/GuestOSNICCustomization.java new file mode 100644 index 000000000000..2508022fe241 --- /dev/null +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/GuestOSNICCustomization.java @@ -0,0 +1,201 @@ +/** + * 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.vmwarecloudsimple.v2019_04_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Guest OS nic customization. + */ +public class GuestOSNICCustomization { + /** + * IP address allocation method. Possible values include: 'static', + * 'dynamic'. + */ + @JsonProperty(value = "allocation") + private String allocation; + + /** + * List of dns servers to use. + */ + @JsonProperty(value = "dnsServers") + private List dnsServers; + + /** + * Gateway addresses assigned to nic. + */ + @JsonProperty(value = "gateway") + private List gateway; + + /** + * Static ip address for nic. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * Network mask for nic. + */ + @JsonProperty(value = "mask") + private String mask; + + /** + * primary WINS server for Windows. + */ + @JsonProperty(value = "primaryWinsServer") + private String primaryWinsServer; + + /** + * secondary WINS server for Windows. + */ + @JsonProperty(value = "secondaryWinsServer") + private String secondaryWinsServer; + + /** + * Get iP address allocation method. Possible values include: 'static', 'dynamic'. + * + * @return the allocation value + */ + public String allocation() { + return this.allocation; + } + + /** + * Set iP address allocation method. Possible values include: 'static', 'dynamic'. + * + * @param allocation the allocation value to set + * @return the GuestOSNICCustomization object itself. + */ + public GuestOSNICCustomization withAllocation(String allocation) { + this.allocation = allocation; + return this; + } + + /** + * Get list of dns servers to use. + * + * @return the dnsServers value + */ + public List dnsServers() { + return this.dnsServers; + } + + /** + * Set list of dns servers to use. + * + * @param dnsServers the dnsServers value to set + * @return the GuestOSNICCustomization object itself. + */ + public GuestOSNICCustomization withDnsServers(List dnsServers) { + this.dnsServers = dnsServers; + return this; + } + + /** + * Get gateway addresses assigned to nic. + * + * @return the gateway value + */ + public List gateway() { + return this.gateway; + } + + /** + * Set gateway addresses assigned to nic. + * + * @param gateway the gateway value to set + * @return the GuestOSNICCustomization object itself. + */ + public GuestOSNICCustomization withGateway(List gateway) { + this.gateway = gateway; + return this; + } + + /** + * Get static ip address for nic. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set static ip address for nic. + * + * @param ipAddress the ipAddress value to set + * @return the GuestOSNICCustomization object itself. + */ + public GuestOSNICCustomization withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get network mask for nic. + * + * @return the mask value + */ + public String mask() { + return this.mask; + } + + /** + * Set network mask for nic. + * + * @param mask the mask value to set + * @return the GuestOSNICCustomization object itself. + */ + public GuestOSNICCustomization withMask(String mask) { + this.mask = mask; + return this; + } + + /** + * Get primary WINS server for Windows. + * + * @return the primaryWinsServer value + */ + public String primaryWinsServer() { + return this.primaryWinsServer; + } + + /** + * Set primary WINS server for Windows. + * + * @param primaryWinsServer the primaryWinsServer value to set + * @return the GuestOSNICCustomization object itself. + */ + public GuestOSNICCustomization withPrimaryWinsServer(String primaryWinsServer) { + this.primaryWinsServer = primaryWinsServer; + return this; + } + + /** + * Get secondary WINS server for Windows. + * + * @return the secondaryWinsServer value + */ + public String secondaryWinsServer() { + return this.secondaryWinsServer; + } + + /** + * Set secondary WINS server for Windows. + * + * @param secondaryWinsServer the secondaryWinsServer value to set + * @return the GuestOSNICCustomization object itself. + */ + public GuestOSNICCustomization withSecondaryWinsServer(String secondaryWinsServer) { + this.secondaryWinsServer = secondaryWinsServer; + return this; + } + +} diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/VirtualMachine.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/VirtualMachine.java index d1ce51f7cfed..e7ded60a078f 100644 --- a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/VirtualMachine.java +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/VirtualMachine.java @@ -36,6 +36,11 @@ public interface VirtualMachine extends HasInner, Resource, */ List controllers(); + /** + * @return the customization value. + */ + GuestOSCustomization customization(); + /** * @return the disks value. */ @@ -189,6 +194,18 @@ interface WithPrivateCloudId { WithCreate withPrivateCloudId(String privateCloudId); } + /** + * The stage of the virtualmachine definition allowing to specify Customization. + */ + interface WithCustomization { + /** + * Specifies customization. + * @param customization Virtual machine properties + * @return the next definition stage + */ + WithCreate withCustomization(GuestOSCustomization customization); + } + /** * The stage of the virtualmachine definition allowing to specify Disks. */ @@ -231,7 +248,7 @@ interface WithNics { interface WithPassword { /** * Specifies password. - * @param password Password for login + * @param password Password for login. Deprecated - use customization property * @return the next definition stage */ WithCreate withPassword(String password); @@ -267,7 +284,7 @@ interface WithTemplateId { interface WithUsername { /** * Specifies username. - * @param username Username for login + * @param username Username for login. Deprecated - use customization property * @return the next definition stage */ WithCreate withUsername(String username); @@ -290,19 +307,31 @@ interface WithVSphereNetworks { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithDisks, DefinitionStages.WithExposeToGuestVM, DefinitionStages.WithNics, DefinitionStages.WithPassword, DefinitionStages.WithResourcePool, DefinitionStages.WithTemplateId, DefinitionStages.WithUsername, DefinitionStages.WithVSphereNetworks { + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithCustomization, DefinitionStages.WithDisks, DefinitionStages.WithExposeToGuestVM, DefinitionStages.WithNics, DefinitionStages.WithPassword, DefinitionStages.WithResourcePool, DefinitionStages.WithTemplateId, DefinitionStages.WithUsername, DefinitionStages.WithVSphereNetworks { } } /** * The template for a VirtualMachine update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithDisks, UpdateStages.WithExposeToGuestVM, UpdateStages.WithNics, UpdateStages.WithPassword, UpdateStages.WithResourcePool, UpdateStages.WithTemplateId, UpdateStages.WithUsername, UpdateStages.WithVSphereNetworks { + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithCustomization, UpdateStages.WithDisks, UpdateStages.WithExposeToGuestVM, UpdateStages.WithNics, UpdateStages.WithPassword, UpdateStages.WithResourcePool, UpdateStages.WithTemplateId, UpdateStages.WithUsername, UpdateStages.WithVSphereNetworks { } /** * Grouping of VirtualMachine update stages. */ interface UpdateStages { + /** + * The stage of the virtualmachine update allowing to specify Customization. + */ + interface WithCustomization { + /** + * Specifies customization. + * @param customization Virtual machine properties + * @return the next update stage + */ + Update withCustomization(GuestOSCustomization customization); + } + /** * The stage of the virtualmachine update allowing to specify Disks. */ @@ -345,7 +374,7 @@ interface WithNics { interface WithPassword { /** * Specifies password. - * @param password Password for login + * @param password Password for login. Deprecated - use customization property * @return the next update stage */ Update withPassword(String password); @@ -381,7 +410,7 @@ interface WithTemplateId { interface WithUsername { /** * Specifies username. - * @param username Username for login + * @param username Username for login. Deprecated - use customization property * @return the next update stage */ Update withUsername(String username); diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/VirtualNic.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/VirtualNic.java index 0b928a730e89..9337b5ebd716 100644 --- a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/VirtualNic.java +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/VirtualNic.java @@ -16,6 +16,12 @@ * Virtual NIC model. */ public class VirtualNic { + /** + * guest OS customization for nic. + */ + @JsonProperty(value = "customization") + private GuestOSNICCustomization customization; + /** * NIC ip address. */ @@ -59,6 +65,26 @@ public class VirtualNic { @JsonProperty(value = "virtualNicName", access = JsonProperty.Access.WRITE_ONLY) private String virtualNicName; + /** + * Get guest OS customization for nic. + * + * @return the customization value + */ + public GuestOSNICCustomization customization() { + return this.customization; + } + + /** + * Set guest OS customization for nic. + * + * @param customization the customization value to set + * @return the VirtualNic object itself. + */ + public VirtualNic withCustomization(GuestOSNICCustomization customization) { + this.customization = customization; + return this; + } + /** * Get nIC ip address. * diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/CustomizationPoliciesImpl.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/CustomizationPoliciesImpl.java new file mode 100644 index 000000000000..1660199fcdb2 --- /dev/null +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/CustomizationPoliciesImpl.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.vmwarecloudsimple.v2019_04_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.CustomizationPolicies; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.CustomizationPolicy; + +class CustomizationPoliciesImpl extends WrapperImpl implements CustomizationPolicies { + private final VMwareCloudSimpleManager manager; + + CustomizationPoliciesImpl(VMwareCloudSimpleManager manager) { + super(manager.inner().customizationPolicies()); + this.manager = manager; + } + + public VMwareCloudSimpleManager manager() { + return this.manager; + } + + private CustomizationPolicyImpl wrapModel(CustomizationPolicyInner inner) { + return new CustomizationPolicyImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String regionId, final String pcName) { + CustomizationPoliciesInner client = this.inner(); + return client.listAsync(regionId, pcName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public CustomizationPolicy call(CustomizationPolicyInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String regionId, String pcName, String customizationPolicyName) { + CustomizationPoliciesInner client = this.inner(); + return client.getAsync(regionId, pcName, customizationPolicyName) + .flatMap(new Func1>() { + @Override + public Observable call(CustomizationPolicyInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((CustomizationPolicy)wrapModel(inner)); + } + } + }); + } + +} diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/CustomizationPoliciesInner.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/CustomizationPoliciesInner.java new file mode 100644 index 000000000000..7d27319e91a4 --- /dev/null +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/CustomizationPoliciesInner.java @@ -0,0 +1,542 @@ +/** + * 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.vmwarecloudsimple.v2019_04_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.CSRPErrorException; +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 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.Path; +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 CustomizationPolicies. + */ +public class CustomizationPoliciesInner { + /** The Retrofit service to perform REST calls. */ + private CustomizationPoliciesService service; + /** The service client containing this operation class. */ + private VMwareCloudSimpleClientImpl client; + + /** + * Initializes an instance of CustomizationPoliciesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public CustomizationPoliciesInner(Retrofit retrofit, VMwareCloudSimpleClientImpl client) { + this.service = retrofit.create(CustomizationPoliciesService.class); + this.client = client; + } + + /** + * The interface defining all the services for CustomizationPolicies to be + * used by Retrofit to perform actually REST calls. + */ + interface CustomizationPoliciesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.CustomizationPolicies list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/customizationPolicies") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("regionId") String regionId, @Path("pcName") String pcName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @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.vmwarecloudsimple.v2019_04_01.CustomizationPolicies get" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/customizationPolicies/{customizationPolicyName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("regionId") String regionId, @Path("pcName") String pcName, @Path("customizationPolicyName") String customizationPolicyName, @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.vmwarecloudsimple.v2019_04_01.CustomizationPolicies listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Implements get of customization policies list. + * Returns list of customization policies in region for private cloud. + * + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CSRPErrorException 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<CustomizationPolicyInner> object if successful. + */ + public PagedList list(final String regionId, final String pcName) { + ServiceResponse> response = listSinglePageAsync(regionId, pcName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Implements get of customization policies list. + * Returns list of customization policies in region for private cloud. + * + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @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 String regionId, final String pcName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(regionId, pcName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Implements get of customization policies list. + * Returns list of customization policies in region for private cloud. + * + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CustomizationPolicyInner> object + */ + public Observable> listAsync(final String regionId, final String pcName) { + return listWithServiceResponseAsync(regionId, pcName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Implements get of customization policies list. + * Returns list of customization policies in region for private cloud. + * + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CustomizationPolicyInner> object + */ + public Observable>> listWithServiceResponseAsync(final String regionId, final String pcName) { + return listSinglePageAsync(regionId, pcName) + .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)); + } + }); + } + + /** + * Implements get of customization policies list. + * Returns list of customization policies in region for private cloud. + * + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CustomizationPolicyInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String regionId, final String pcName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (regionId == null) { + throw new IllegalArgumentException("Parameter regionId is required and cannot be null."); + } + if (pcName == null) { + throw new IllegalArgumentException("Parameter pcName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + return service.list(this.client.subscriptionId(), regionId, pcName, this.client.apiVersion(), filter, 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); + } + } + }); + } + + /** + * Implements get of customization policies list. + * Returns list of customization policies in region for private cloud. + * + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param filter The filter to apply on the list operation. only type is allowed here as a filter e.g. $filter=type eq 'xxxx' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CSRPErrorException 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<CustomizationPolicyInner> object if successful. + */ + public PagedList list(final String regionId, final String pcName, final String filter) { + ServiceResponse> response = listSinglePageAsync(regionId, pcName, filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Implements get of customization policies list. + * Returns list of customization policies in region for private cloud. + * + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param filter The filter to apply on the list operation. only type is allowed here as a filter e.g. $filter=type eq 'xxxx' + * @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 String regionId, final String pcName, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(regionId, pcName, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Implements get of customization policies list. + * Returns list of customization policies in region for private cloud. + * + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param filter The filter to apply on the list operation. only type is allowed here as a filter e.g. $filter=type eq 'xxxx' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CustomizationPolicyInner> object + */ + public Observable> listAsync(final String regionId, final String pcName, final String filter) { + return listWithServiceResponseAsync(regionId, pcName, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Implements get of customization policies list. + * Returns list of customization policies in region for private cloud. + * + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param filter The filter to apply on the list operation. only type is allowed here as a filter e.g. $filter=type eq 'xxxx' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<CustomizationPolicyInner> object + */ + public Observable>> listWithServiceResponseAsync(final String regionId, final String pcName, final String filter) { + return listSinglePageAsync(regionId, pcName, filter) + .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)); + } + }); + } + + /** + * Implements get of customization policies list. + * Returns list of customization policies in region for private cloud. + * + ServiceResponse> * @param regionId The region Id (westus, eastus) + ServiceResponse> * @param pcName The private cloud name + ServiceResponse> * @param filter The filter to apply on the list operation. only type is allowed here as a filter e.g. $filter=type eq 'xxxx' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CustomizationPolicyInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String regionId, final String pcName, final String filter) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (regionId == null) { + throw new IllegalArgumentException("Parameter regionId is required and cannot be null."); + } + if (pcName == null) { + throw new IllegalArgumentException("Parameter pcName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), regionId, pcName, this.client.apiVersion(), filter, 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 CSRPErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CSRPErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CSRPErrorException.class) + .build(response); + } + + /** + * Implements get of customization policy. + * Returns customization policy by its name. + * + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param customizationPolicyName customization policy name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CSRPErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CustomizationPolicyInner object if successful. + */ + public CustomizationPolicyInner get(String regionId, String pcName, String customizationPolicyName) { + return getWithServiceResponseAsync(regionId, pcName, customizationPolicyName).toBlocking().single().body(); + } + + /** + * Implements get of customization policy. + * Returns customization policy by its name. + * + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param customizationPolicyName customization policy name + * @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 regionId, String pcName, String customizationPolicyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(regionId, pcName, customizationPolicyName), serviceCallback); + } + + /** + * Implements get of customization policy. + * Returns customization policy by its name. + * + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param customizationPolicyName customization policy name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CustomizationPolicyInner object + */ + public Observable getAsync(String regionId, String pcName, String customizationPolicyName) { + return getWithServiceResponseAsync(regionId, pcName, customizationPolicyName).map(new Func1, CustomizationPolicyInner>() { + @Override + public CustomizationPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Implements get of customization policy. + * Returns customization policy by its name. + * + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param customizationPolicyName customization policy name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CustomizationPolicyInner object + */ + public Observable> getWithServiceResponseAsync(String regionId, String pcName, String customizationPolicyName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (regionId == null) { + throw new IllegalArgumentException("Parameter regionId is required and cannot be null."); + } + if (pcName == null) { + throw new IllegalArgumentException("Parameter pcName is required and cannot be null."); + } + if (customizationPolicyName == null) { + throw new IllegalArgumentException("Parameter customizationPolicyName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), regionId, pcName, customizationPolicyName, this.client.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 CSRPErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CSRPErrorException.class) + .build(response); + } + + /** + * Implements get of customization policies list. + * Returns list of customization policies in region for private cloud. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CSRPErrorException 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<CustomizationPolicyInner> 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(); + } + }; + } + + /** + * Implements get of customization policies list. + * Returns list of customization policies in region for private cloud. + * + * @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); + } + + /** + * Implements get of customization policies list. + * Returns list of customization policies in region for private cloud. + * + * @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<CustomizationPolicyInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Implements get of customization policies list. + * Returns list of customization policies in region for private cloud. + * + * @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<CustomizationPolicyInner> 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)); + } + }); + } + + /** + * Implements get of customization policies list. + * Returns list of customization policies in region for private cloud. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<CustomizationPolicyInner> 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 CSRPErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CSRPErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CSRPErrorException.class) + .build(response); + } + +} diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/CustomizationPolicyImpl.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/CustomizationPolicyImpl.java new file mode 100644 index 000000000000..079ab3ac7f32 --- /dev/null +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/CustomizationPolicyImpl.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.vmwarecloudsimple.v2019_04_01.implementation; + +import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.CustomizationPolicy; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.CustomizationSpecification; + +class CustomizationPolicyImpl extends IndexableRefreshableWrapperImpl implements CustomizationPolicy { + private final VMwareCloudSimpleManager manager; + private String regionId; + private String pcName; + private String customizationPolicyName; + + CustomizationPolicyImpl(CustomizationPolicyInner inner, VMwareCloudSimpleManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.regionId = IdParsingUtils.getValueFromIdByName(inner.id(), "locations"); + this.pcName = IdParsingUtils.getValueFromIdByName(inner.id(), "privateClouds"); + this.customizationPolicyName = IdParsingUtils.getValueFromIdByName(inner.id(), "customizationPolicies"); + } + + @Override + public VMwareCloudSimpleManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + CustomizationPoliciesInner client = this.manager().inner().customizationPolicies(); + return client.getAsync(this.regionId, this.pcName, this.customizationPolicyName); + } + + + + @Override + public String customizationPolicyPropertiesType() { + return this.inner().customizationPolicyPropertiesType(); + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String privateCloudId() { + return this.inner().privateCloudId(); + } + + @Override + public CustomizationSpecification specification() { + return this.inner().specification(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String version() { + return this.inner().version(); + } + +} diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/CustomizationPolicyInner.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/CustomizationPolicyInner.java new file mode 100644 index 000000000000..cd3b1da58b7e --- /dev/null +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/CustomizationPolicyInner.java @@ -0,0 +1,233 @@ +/** + * 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.vmwarecloudsimple.v2019_04_01.implementation; + +import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.CustomizationSpecification; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The virtual machine customization policy. + */ +@JsonFlatten +public class CustomizationPolicyInner { + /** + * Customization policy azure id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Azure region. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Customization policy name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Policy description. + */ + @JsonProperty(value = "properties.description") + private String description; + + /** + * The Private cloud id. + */ + @JsonProperty(value = "properties.privateCloudId") + private String privateCloudId; + + /** + * Detailed customization policy specification. + */ + @JsonProperty(value = "properties.specification") + private CustomizationSpecification specification; + + /** + * The type of customization (Linux or Windows). Possible values include: + * 'LINUX', 'WINDOWS'. + */ + @JsonProperty(value = "properties.type") + private String customizationPolicyPropertiesType; + + /** + * Policy version. + */ + @JsonProperty(value = "properties.version") + private String version; + + /** + * The type property. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get customization policy azure id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set customization policy azure id. + * + * @param id the id value to set + * @return the CustomizationPolicyInner object itself. + */ + public CustomizationPolicyInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get azure region. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set azure region. + * + * @param location the location value to set + * @return the CustomizationPolicyInner object itself. + */ + public CustomizationPolicyInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get customization policy name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get policy description. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set policy description. + * + * @param description the description value to set + * @return the CustomizationPolicyInner object itself. + */ + public CustomizationPolicyInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the Private cloud id. + * + * @return the privateCloudId value + */ + public String privateCloudId() { + return this.privateCloudId; + } + + /** + * Set the Private cloud id. + * + * @param privateCloudId the privateCloudId value to set + * @return the CustomizationPolicyInner object itself. + */ + public CustomizationPolicyInner withPrivateCloudId(String privateCloudId) { + this.privateCloudId = privateCloudId; + return this; + } + + /** + * Get detailed customization policy specification. + * + * @return the specification value + */ + public CustomizationSpecification specification() { + return this.specification; + } + + /** + * Set detailed customization policy specification. + * + * @param specification the specification value to set + * @return the CustomizationPolicyInner object itself. + */ + public CustomizationPolicyInner withSpecification(CustomizationSpecification specification) { + this.specification = specification; + return this; + } + + /** + * Get the type of customization (Linux or Windows). Possible values include: 'LINUX', 'WINDOWS'. + * + * @return the customizationPolicyPropertiesType value + */ + public String customizationPolicyPropertiesType() { + return this.customizationPolicyPropertiesType; + } + + /** + * Set the type of customization (Linux or Windows). Possible values include: 'LINUX', 'WINDOWS'. + * + * @param customizationPolicyPropertiesType the customizationPolicyPropertiesType value to set + * @return the CustomizationPolicyInner object itself. + */ + public CustomizationPolicyInner withCustomizationPolicyPropertiesType(String customizationPolicyPropertiesType) { + this.customizationPolicyPropertiesType = customizationPolicyPropertiesType; + return this; + } + + /** + * Get policy version. + * + * @return the version value + */ + public String version() { + return this.version; + } + + /** + * Set policy version. + * + * @param version the version value to set + * @return the CustomizationPolicyInner object itself. + */ + public CustomizationPolicyInner withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the type value. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/DedicatedCloudServiceImpl.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/DedicatedCloudServiceImpl.java index d270af0f89c4..89d9399666d0 100644 --- a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/DedicatedCloudServiceImpl.java +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/DedicatedCloudServiceImpl.java @@ -70,16 +70,4 @@ public DedicatedCloudServiceImpl withGatewaySubnet(String gatewaySubnet) { return this; } - @Override - public DedicatedCloudServiceImpl withNodes(Integer nodes) { - this.inner().withNodes(nodes); - return this; - } - - @Override - public DedicatedCloudServiceImpl withServiceURL(String serviceURL) { - this.inner().withServiceURL(serviceURL); - return this; - } - } diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/DedicatedCloudServiceInner.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/DedicatedCloudServiceInner.java index 766894432884..ff9980beb2fc 100644 --- a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/DedicatedCloudServiceInner.java +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/DedicatedCloudServiceInner.java @@ -36,13 +36,13 @@ public class DedicatedCloudServiceInner extends Resource { /** * total nodes purchased. */ - @JsonProperty(value = "properties.nodes") + @JsonProperty(value = "properties.nodes", access = JsonProperty.Access.WRITE_ONLY) private Integer nodes; /** * link to a service management web portal. */ - @JsonProperty(value = "properties.serviceURL") + @JsonProperty(value = "properties.serviceURL", access = JsonProperty.Access.WRITE_ONLY) private String serviceURL; /** @@ -83,17 +83,6 @@ public Integer nodes() { return this.nodes; } - /** - * Set total nodes purchased. - * - * @param nodes the nodes value to set - * @return the DedicatedCloudServiceInner object itself. - */ - public DedicatedCloudServiceInner withNodes(Integer nodes) { - this.nodes = nodes; - return this; - } - /** * Get link to a service management web portal. * @@ -103,15 +92,4 @@ public String serviceURL() { return this.serviceURL; } - /** - * Set link to a service management web portal. - * - * @param serviceURL the serviceURL value to set - * @return the DedicatedCloudServiceInner object itself. - */ - public DedicatedCloudServiceInner withServiceURL(String serviceURL) { - this.serviceURL = serviceURL; - return this; - } - } diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/OperationsImpl.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/OperationsImpl.java index 84fc7d2f66b6..d22f39cda6df 100644 --- a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/OperationsImpl.java +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/OperationsImpl.java @@ -62,14 +62,10 @@ public AvailableOperation call(AvailableOperationInner inner) { public Observable getAsync(String regionId, String operationId) { OperationsInner client = this.inner(); return client.getAsync(regionId, operationId) - .flatMap(new Func1>() { + .map(new Func1() { @Override - public Observable call(OperationResourceInner inner) { - if (inner == null) { - return Observable.empty(); - } else { - return Observable.just((OperationResource)wrapOperationResourceModel(inner)); - } + public OperationResource call(OperationResourceInner inner) { + return wrapOperationResourceModel(inner); } }); } diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/PrivateCloudsImpl.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/PrivateCloudsImpl.java index fd0ad7d4771a..dfdf6806e880 100644 --- a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/PrivateCloudsImpl.java +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/PrivateCloudsImpl.java @@ -54,14 +54,10 @@ public PrivateCloud call(PrivateCloudInner inner) { public Observable getAsync(String pcName, String regionId) { PrivateCloudsInner client = this.inner(); return client.getAsync(pcName, regionId) - .flatMap(new Func1>() { + .map(new Func1() { @Override - public Observable call(PrivateCloudInner inner) { - if (inner == null) { - return Observable.empty(); - } else { - return Observable.just((PrivateCloud)wrapModel(inner)); - } + public PrivateCloud call(PrivateCloudInner inner) { + return wrapModel(inner); } }); } diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/ResourcePoolsImpl.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/ResourcePoolsImpl.java index 9410173f6d7e..e7f2014b6180 100644 --- a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/ResourcePoolsImpl.java +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/ResourcePoolsImpl.java @@ -54,14 +54,10 @@ public ResourcePool call(ResourcePoolInner inner) { public Observable getAsync(String regionId, String pcName, String resourcePoolName) { ResourcePoolsInner client = this.inner(); return client.getAsync(regionId, pcName, resourcePoolName) - .flatMap(new Func1>() { + .map(new Func1() { @Override - public Observable call(ResourcePoolInner inner) { - if (inner == null) { - return Observable.empty(); - } else { - return Observable.just((ResourcePool)wrapModel(inner)); - } + public ResourcePool call(ResourcePoolInner inner) { + return wrapModel(inner); } }); } diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VMwareCloudSimpleClientImpl.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VMwareCloudSimpleClientImpl.java index 2416099eaf91..8b39449da65c 100644 --- a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VMwareCloudSimpleClientImpl.java +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VMwareCloudSimpleClientImpl.java @@ -220,6 +220,19 @@ public PrivateCloudsInner privateClouds() { return this.privateClouds; } + /** + * The CustomizationPoliciesInner object to access its operations. + */ + private CustomizationPoliciesInner customizationPolicies; + + /** + * Gets the CustomizationPoliciesInner object to access its operations. + * @return the CustomizationPoliciesInner object. + */ + public CustomizationPoliciesInner customizationPolicies() { + return this.customizationPolicies; + } + /** * The ResourcePoolsInner object to access its operations. */ @@ -325,6 +338,7 @@ protected void initialize() { this.dedicatedCloudServices = new DedicatedCloudServicesInner(restClient().retrofit(), this); this.skusAvailabilitys = new SkusAvailabilitysInner(restClient().retrofit(), this); this.privateClouds = new PrivateCloudsInner(restClient().retrofit(), this); + this.customizationPolicies = new CustomizationPoliciesInner(restClient().retrofit(), this); this.resourcePools = new ResourcePoolsInner(restClient().retrofit(), this); this.virtualMachineTemplates = new VirtualMachineTemplatesInner(restClient().retrofit(), this); this.virtualNetworks = new VirtualNetworksInner(restClient().retrofit(), this); diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VMwareCloudSimpleManager.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VMwareCloudSimpleManager.java index 5149b33dfd49..86a0589a6b43 100644 --- a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VMwareCloudSimpleManager.java +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VMwareCloudSimpleManager.java @@ -21,6 +21,7 @@ import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.DedicatedCloudServices; import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.SkusAvailabilitys; import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.PrivateClouds; +import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.CustomizationPolicies; import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.ResourcePools; import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.VirtualMachineTemplates; import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.VirtualNetworks; @@ -38,6 +39,7 @@ public final class VMwareCloudSimpleManager extends ManagerCore controllers() { return this.inner().controllers(); } + @Override + public GuestOSCustomization customization() { + return this.inner().customization(); + } + @Override public List disks() { return this.inner().disks(); @@ -178,6 +184,12 @@ public VirtualMachineImpl withPrivateCloudId(String privateCloudId) { return this; } + @Override + public VirtualMachineImpl withCustomization(GuestOSCustomization customization) { + this.inner().withCustomization(customization); + return this; + } + @Override public VirtualMachineImpl withDisks(List disks) { this.inner().withDisks(disks); diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VirtualMachineInner.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VirtualMachineInner.java index 27c729b99a36..34a45e0cd38e 100644 --- a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VirtualMachineInner.java +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VirtualMachineInner.java @@ -10,6 +10,7 @@ import java.util.List; import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.VirtualDiskController; +import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.GuestOSCustomization; import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.VirtualDisk; import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.GuestOSType; import com.microsoft.azure.management.vmwarecloudsimple.v2019_04_01.VirtualNic; @@ -35,6 +36,12 @@ public class VirtualMachineInner extends Resource { @JsonProperty(value = "properties.controllers", access = JsonProperty.Access.WRITE_ONLY) private List controllers; + /** + * Virtual machine properties. + */ + @JsonProperty(value = "properties.customization") + private GuestOSCustomization customization; + /** * The list of Virtual Disks. */ @@ -84,7 +91,7 @@ public class VirtualMachineInner extends Resource { private int numberOfCores; /** - * Password for login. + * Password for login. Deprecated - use customization property. */ @JsonProperty(value = "properties.password") private String password; @@ -127,7 +134,7 @@ public class VirtualMachineInner extends Resource { private String templateId; /** - * Username for login. + * Username for login. Deprecated - use customization property. */ @JsonProperty(value = "properties.username") private String username; @@ -179,6 +186,26 @@ public List controllers() { return this.controllers; } + /** + * Get virtual machine properties. + * + * @return the customization value + */ + public GuestOSCustomization customization() { + return this.customization; + } + + /** + * Set virtual machine properties. + * + * @param customization the customization value to set + * @return the VirtualMachineInner object itself. + */ + public VirtualMachineInner withCustomization(GuestOSCustomization customization) { + this.customization = customization; + return this; + } + /** * Get the list of Virtual Disks. * @@ -296,7 +323,7 @@ public VirtualMachineInner withNumberOfCores(int numberOfCores) { } /** - * Get password for login. + * Get password for login. Deprecated - use customization property. * * @return the password value */ @@ -305,7 +332,7 @@ public String password() { } /** - * Set password for login. + * Set password for login. Deprecated - use customization property. * * @param password the password value to set * @return the VirtualMachineInner object itself. @@ -403,7 +430,7 @@ public VirtualMachineInner withTemplateId(String templateId) { } /** - * Get username for login. + * Get username for login. Deprecated - use customization property. * * @return the username value */ @@ -412,7 +439,7 @@ public String username() { } /** - * Set username for login. + * Set username for login. Deprecated - use customization property. * * @param username the username value to set * @return the VirtualMachineInner object itself. diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VirtualMachineTemplatesImpl.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VirtualMachineTemplatesImpl.java index 2e92ed8dc533..253c9a559812 100644 --- a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VirtualMachineTemplatesImpl.java +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VirtualMachineTemplatesImpl.java @@ -54,14 +54,10 @@ public VirtualMachineTemplate call(VirtualMachineTemplateInner inner) { public Observable getAsync(String regionId, String pcName, String virtualMachineTemplateName) { VirtualMachineTemplatesInner client = this.inner(); return client.getAsync(regionId, pcName, virtualMachineTemplateName) - .flatMap(new Func1>() { + .map(new Func1() { @Override - public Observable call(VirtualMachineTemplateInner inner) { - if (inner == null) { - return Observable.empty(); - } else { - return Observable.just((VirtualMachineTemplate)wrapModel(inner)); - } + public VirtualMachineTemplate call(VirtualMachineTemplateInner inner) { + return wrapModel(inner); } }); } diff --git a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VirtualNetworksImpl.java b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VirtualNetworksImpl.java index 06e43bdbf833..d63cccbc03ae 100644 --- a/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VirtualNetworksImpl.java +++ b/vmwarecloudsimple/resource-manager/v2019_04_01/src/main/java/com/microsoft/azure/management/vmwarecloudsimple/v2019_04_01/implementation/VirtualNetworksImpl.java @@ -54,14 +54,10 @@ public VirtualNetwork call(VirtualNetworkInner inner) { public Observable getAsync(String regionId, String pcName, String virtualNetworkName) { VirtualNetworksInner client = this.inner(); return client.getAsync(regionId, pcName, virtualNetworkName) - .flatMap(new Func1>() { + .map(new Func1() { @Override - public Observable call(VirtualNetworkInner inner) { - if (inner == null) { - return Observable.empty(); - } else { - return Observable.just((VirtualNetwork)wrapModel(inner)); - } + public VirtualNetwork call(VirtualNetworkInner inner) { + return wrapModel(inner); } }); }