/** * Initializes a new instance of the * VirtualMachineCreateDeploymentParameters class. * */ public VirtualMachineCreateDeploymentParameters() { this.setLoadBalancers(new LazyArrayList<LoadBalancer>()); this.setRoles(new LazyArrayList<Role>()); } }
if (parameters.getLabel() == null) { throw new NullPointerException("parameters.Label"); if (parameters.getLabel().length() > 100) { throw new IllegalArgumentException("parameters.Label"); if (parameters.getName() == null) { throw new NullPointerException("parameters.Name"); if (parameters.getRoles() == null) { throw new NullPointerException("parameters.Roles"); if (parameters.getRoles() != null) { for (Role rolesParameterItem : parameters.getRoles()) { if (rolesParameterItem.getConfigurationSets() != null) { for (ConfigurationSet configurationSetsParameterItem : rolesParameterItem.getConfigurationSets()) { nameElement.appendChild(requestDoc.createTextNode(parameters.getName())); deploymentElement.appendChild(nameElement); deploymentSlotElement.appendChild(requestDoc.createTextNode(parameters.getDeploymentSlot().toString())); deploymentElement.appendChild(deploymentSlotElement); labelElement.appendChild(requestDoc.createTextNode(Base64.encode(parameters.getLabel().getBytes()))); deploymentElement.appendChild(labelElement); for (Role roleListItem : parameters.getRoles()) { Element roleElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "Role"); roleListSequenceElement.appendChild(roleElement);
VirtualMachineCreateDeploymentParameters deploymentParameters = new VirtualMachineCreateDeploymentParameters(); deploymentParameters.setDeploymentSlot(DeploymentSlot.Staging); deploymentParameters.setName(a.getName()); deploymentParameters.setLabel(a.getName()); deploymentParameters.setRoles(rolelist); deploymentParameters.setDeploymentSlot(DeploymentSlot.Production);
if (parameters.getDeploymentSlot() == null) { throw new NullPointerException("parameters.DeploymentSlot"); if (parameters.getLabel() == null) { throw new NullPointerException("parameters.Label"); if (parameters.getLabel().length() > 100) { throw new IllegalArgumentException("parameters.Label"); if (parameters.getName() == null) { throw new NullPointerException("parameters.Name"); if (parameters.getRoles() == null) { throw new NullPointerException("parameters.Roles"); if (parameters.getRoles() != null) { for (Role rolesParameterItem : parameters.getRoles()) { if (rolesParameterItem.getConfigurationSets() != null) { for (ConfigurationSet configurationSetsParameterItem : rolesParameterItem.getConfigurationSets()) { nameElement.appendChild(requestDoc.createTextNode(parameters.getName())); deploymentElement.appendChild(nameElement); deploymentSlotElement.appendChild(requestDoc.createTextNode(parameters.getDeploymentSlot().toString())); deploymentElement.appendChild(deploymentSlotElement); labelElement.appendChild(requestDoc.createTextNode(parameters.getLabel())); deploymentElement.appendChild(labelElement);