Package com.microsoft.windowsazure.management.compute.models

Examples of com.microsoft.windowsazure.management.compute.models.ConfigurationSet


               
                Element configurationSetsSequenceElement = XmlUtility.getElementByTagNameNS(persistentVMRoleElement, "http://schemas.microsoft.com/windowsazure", "ConfigurationSets");
                if (configurationSetsSequenceElement != null) {
                    for (int i1 = 0; i1 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(configurationSetsSequenceElement, "http://schemas.microsoft.com/windowsazure", "ConfigurationSet").size(); i1 = i1 + 1) {
                        org.w3c.dom.Element configurationSetsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(configurationSetsSequenceElement, "http://schemas.microsoft.com/windowsazure", "ConfigurationSet").get(i1));
                        ConfigurationSet configurationSetInstance = new ConfigurationSet();
                        result.getConfigurationSets().add(configurationSetInstance);
                       
                        Element configurationSetTypeElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "ConfigurationSetType");
                        if (configurationSetTypeElement != null) {
                            String configurationSetTypeInstance;
                            configurationSetTypeInstance = configurationSetTypeElement.getTextContent();
                            configurationSetInstance.setConfigurationSetType(configurationSetTypeInstance);
                        }
                       
                        Element inputEndpointsSequenceElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "InputEndpoints");
                        if (inputEndpointsSequenceElement != null) {
                            for (int i2 = 0; i2 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(inputEndpointsSequenceElement, "http://schemas.microsoft.com/windowsazure", "InputEndpoint").size(); i2 = i2 + 1) {
                                org.w3c.dom.Element inputEndpointsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(inputEndpointsSequenceElement, "http://schemas.microsoft.com/windowsazure", "InputEndpoint").get(i2));
                                InputEndpoint inputEndpointInstance = new InputEndpoint();
                                configurationSetInstance.getInputEndpoints().add(inputEndpointInstance);
                               
                                Element loadBalancedEndpointSetNameElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "LoadBalancedEndpointSetName");
                                if (loadBalancedEndpointSetNameElement != null) {
                                    String loadBalancedEndpointSetNameInstance;
                                    loadBalancedEndpointSetNameInstance = loadBalancedEndpointSetNameElement.getTextContent();
                                    inputEndpointInstance.setLoadBalancedEndpointSetName(loadBalancedEndpointSetNameInstance);
                                }
                               
                                Element localPortElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "LocalPort");
                                if (localPortElement != null && (localPortElement.getTextContent() == null || localPortElement.getTextContent().isEmpty() == true) == false) {
                                    int localPortInstance;
                                    localPortInstance = DatatypeConverter.parseInt(localPortElement.getTextContent());
                                    inputEndpointInstance.setLocalPort(localPortInstance);
                                }
                               
                                Element nameElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "Name");
                                if (nameElement != null) {
                                    String nameInstance;
                                    nameInstance = nameElement.getTextContent();
                                    inputEndpointInstance.setName(nameInstance);
                                }
                               
                                Element portElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "Port");
                                if (portElement != null && (portElement.getTextContent() == null || portElement.getTextContent().isEmpty() == true) == false) {
                                    int portInstance;
                                    portInstance = DatatypeConverter.parseInt(portElement.getTextContent());
                                    inputEndpointInstance.setPort(portInstance);
                                }
                               
                                Element loadBalancerProbeElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "LoadBalancerProbe");
                                if (loadBalancerProbeElement != null) {
                                    LoadBalancerProbe loadBalancerProbeInstance = new LoadBalancerProbe();
                                    inputEndpointInstance.setLoadBalancerProbe(loadBalancerProbeInstance);
                                   
                                    Element pathElement = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "Path");
                                    if (pathElement != null) {
                                        String pathInstance;
                                        pathInstance = pathElement.getTextContent();
                                        loadBalancerProbeInstance.setPath(pathInstance);
                                    }
                                   
                                    Element portElement2 = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "Port");
                                    if (portElement2 != null) {
                                        int portInstance2;
                                        portInstance2 = DatatypeConverter.parseInt(portElement2.getTextContent());
                                        loadBalancerProbeInstance.setPort(portInstance2);
                                    }
                                   
                                    Element protocolElement = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "Protocol");
                                    if (protocolElement != null) {
                                        LoadBalancerProbeTransportProtocol protocolInstance;
                                        protocolInstance = ComputeManagementClientImpl.parseLoadBalancerProbeTransportProtocol(protocolElement.getTextContent());
                                        loadBalancerProbeInstance.setProtocol(protocolInstance);
                                    }
                                   
                                    Element intervalInSecondsElement = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "IntervalInSeconds");
                                    if (intervalInSecondsElement != null && (intervalInSecondsElement.getTextContent() == null || intervalInSecondsElement.getTextContent().isEmpty() == true) == false) {
                                        int intervalInSecondsInstance;
                                        intervalInSecondsInstance = DatatypeConverter.parseInt(intervalInSecondsElement.getTextContent());
                                        loadBalancerProbeInstance.setIntervalInSeconds(intervalInSecondsInstance);
                                    }
                                   
                                    Element timeoutInSecondsElement = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "TimeoutInSeconds");
                                    if (timeoutInSecondsElement != null && (timeoutInSecondsElement.getTextContent() == null || timeoutInSecondsElement.getTextContent().isEmpty() == true) == false) {
                                        int timeoutInSecondsInstance;
                                        timeoutInSecondsInstance = DatatypeConverter.parseInt(timeoutInSecondsElement.getTextContent());
                                        loadBalancerProbeInstance.setTimeoutInSeconds(timeoutInSecondsInstance);
                                    }
                                }
                               
                                Element protocolElement2 = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "Protocol");
                                if (protocolElement2 != null) {
                                    String protocolInstance2;
                                    protocolInstance2 = protocolElement2.getTextContent();
                                    inputEndpointInstance.setProtocol(protocolInstance2);
                                }
                               
                                Element vipElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "Vip");
                                if (vipElement != null) {
                                    InetAddress vipInstance;
                                    vipInstance = InetAddress.getByName(vipElement.getTextContent());
                                    inputEndpointInstance.setVirtualIPAddress(vipInstance);
                                }
                               
                                Element enableDirectServerReturnElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "EnableDirectServerReturn");
                                if (enableDirectServerReturnElement != null && (enableDirectServerReturnElement.getTextContent() == null || enableDirectServerReturnElement.getTextContent().isEmpty() == true) == false) {
                                    boolean enableDirectServerReturnInstance;
                                    enableDirectServerReturnInstance = DatatypeConverter.parseBoolean(enableDirectServerReturnElement.getTextContent().toLowerCase());
                                    inputEndpointInstance.setEnableDirectServerReturn(enableDirectServerReturnInstance);
                                }
                               
                                Element loadBalancerNameElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "LoadBalancerName");
                                if (loadBalancerNameElement != null) {
                                    String loadBalancerNameInstance;
                                    loadBalancerNameInstance = loadBalancerNameElement.getTextContent();
                                    inputEndpointInstance.setLoadBalancerName(loadBalancerNameInstance);
                                }
                               
                                Element endpointAclElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "EndpointAcl");
                                if (endpointAclElement != null) {
                                    EndpointAcl endpointAclInstance = new EndpointAcl();
                                    inputEndpointInstance.setEndpointAcl(endpointAclInstance);
                                   
                                    Element rulesSequenceElement = XmlUtility.getElementByTagNameNS(endpointAclElement, "http://schemas.microsoft.com/windowsazure", "Rules");
                                    if (rulesSequenceElement != null) {
                                        for (int i3 = 0; i3 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(rulesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Rule").size(); i3 = i3 + 1) {
                                            org.w3c.dom.Element rulesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(rulesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Rule").get(i3));
                                            AccessControlListRule ruleInstance = new AccessControlListRule();
                                            endpointAclInstance.getRules().add(ruleInstance);
                                           
                                            Element orderElement = XmlUtility.getElementByTagNameNS(rulesElement, "http://schemas.microsoft.com/windowsazure", "Order");
                                            if (orderElement != null && (orderElement.getTextContent() == null || orderElement.getTextContent().isEmpty() == true) == false) {
                                                int orderInstance;
                                                orderInstance = DatatypeConverter.parseInt(orderElement.getTextContent());
                                                ruleInstance.setOrder(orderInstance);
                                            }
                                           
                                            Element actionElement = XmlUtility.getElementByTagNameNS(rulesElement, "http://schemas.microsoft.com/windowsazure", "Action");
                                            if (actionElement != null) {
                                                String actionInstance;
                                                actionInstance = actionElement.getTextContent();
                                                ruleInstance.setAction(actionInstance);
                                            }
                                           
                                            Element remoteSubnetElement = XmlUtility.getElementByTagNameNS(rulesElement, "http://schemas.microsoft.com/windowsazure", "RemoteSubnet");
                                            if (remoteSubnetElement != null) {
                                                String remoteSubnetInstance;
                                                remoteSubnetInstance = remoteSubnetElement.getTextContent();
                                                ruleInstance.setRemoteSubnet(remoteSubnetInstance);
                                            }
                                           
                                            Element descriptionElement = XmlUtility.getElementByTagNameNS(rulesElement, "http://schemas.microsoft.com/windowsazure", "Description");
                                            if (descriptionElement != null) {
                                                String descriptionInstance;
                                                descriptionInstance = descriptionElement.getTextContent();
                                                ruleInstance.setDescription(descriptionInstance);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                       
                        Element subnetNamesSequenceElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "SubnetNames");
                        if (subnetNamesSequenceElement != null) {
                            for (int i4 = 0; i4 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(subnetNamesSequenceElement, "http://schemas.microsoft.com/windowsazure", "SubnetName").size(); i4 = i4 + 1) {
                                org.w3c.dom.Element subnetNamesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(subnetNamesSequenceElement, "http://schemas.microsoft.com/windowsazure", "SubnetName").get(i4));
                                configurationSetInstance.getSubnetNames().add(subnetNamesElement.getTextContent());
                            }
                        }
                       
                        Element staticVirtualNetworkIPAddressElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "StaticVirtualNetworkIPAddress");
                        if (staticVirtualNetworkIPAddressElement != null) {
                            String staticVirtualNetworkIPAddressInstance;
                            staticVirtualNetworkIPAddressInstance = staticVirtualNetworkIPAddressElement.getTextContent();
                            configurationSetInstance.setStaticVirtualNetworkIPAddress(staticVirtualNetworkIPAddressInstance);
                        }
                       
                        Element publicIPsSequenceElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "PublicIPs");
                        if (publicIPsSequenceElement != null) {
                            for (int i5 = 0; i5 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(publicIPsSequenceElement, "http://schemas.microsoft.com/windowsazure", "PublicIP").size(); i5 = i5 + 1) {
                                org.w3c.dom.Element publicIPsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(publicIPsSequenceElement, "http://schemas.microsoft.com/windowsazure", "PublicIP").get(i5));
                                ConfigurationSet.PublicIP publicIPInstance = new ConfigurationSet.PublicIP();
                                configurationSetInstance.getPublicIPs().add(publicIPInstance);
                               
                                Element nameElement2 = XmlUtility.getElementByTagNameNS(publicIPsElement, "http://schemas.microsoft.com/windowsazure", "Name");
                                if (nameElement2 != null) {
                                    String nameInstance2;
                                    nameInstance2 = nameElement2.getTextContent();
                                    publicIPInstance.setName(nameInstance2);
                                }
                            }
                        }
                       
                        Element computerNameElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "ComputerName");
                        if (computerNameElement != null) {
                            String computerNameInstance;
                            computerNameInstance = computerNameElement.getTextContent();
                            configurationSetInstance.setComputerName(computerNameInstance);
                        }
                       
                        Element adminPasswordElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "AdminPassword");
                        if (adminPasswordElement != null) {
                            String adminPasswordInstance;
                            adminPasswordInstance = adminPasswordElement.getTextContent();
                            configurationSetInstance.setAdminPassword(adminPasswordInstance);
                        }
                       
                        Element resetPasswordOnFirstLogonElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "ResetPasswordOnFirstLogon");
                        if (resetPasswordOnFirstLogonElement != null && (resetPasswordOnFirstLogonElement.getTextContent() == null || resetPasswordOnFirstLogonElement.getTextContent().isEmpty() == true) == false) {
                            boolean resetPasswordOnFirstLogonInstance;
                            resetPasswordOnFirstLogonInstance = DatatypeConverter.parseBoolean(resetPasswordOnFirstLogonElement.getTextContent().toLowerCase());
                            configurationSetInstance.setResetPasswordOnFirstLogon(resetPasswordOnFirstLogonInstance);
                        }
                       
                        Element enableAutomaticUpdatesElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "EnableAutomaticUpdates");
                        if (enableAutomaticUpdatesElement != null && (enableAutomaticUpdatesElement.getTextContent() == null || enableAutomaticUpdatesElement.getTextContent().isEmpty() == true) == false) {
                            boolean enableAutomaticUpdatesInstance;
                            enableAutomaticUpdatesInstance = DatatypeConverter.parseBoolean(enableAutomaticUpdatesElement.getTextContent().toLowerCase());
                            configurationSetInstance.setEnableAutomaticUpdates(enableAutomaticUpdatesInstance);
                        }
                       
                        Element timeZoneElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "TimeZone");
                        if (timeZoneElement != null) {
                            String timeZoneInstance;
                            timeZoneInstance = timeZoneElement.getTextContent();
                            configurationSetInstance.setTimeZone(timeZoneInstance);
                        }
                       
                        Element domainJoinElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "DomainJoin");
                        if (domainJoinElement != null) {
                            DomainJoinSettings domainJoinInstance = new DomainJoinSettings();
                            configurationSetInstance.setDomainJoin(domainJoinInstance);
                           
                            Element credentialsElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "Credentials");
                            if (credentialsElement != null) {
                                DomainJoinCredentials credentialsInstance = new DomainJoinCredentials();
                                domainJoinInstance.setCredentials(credentialsInstance);
                               
                                Element domainElement = XmlUtility.getElementByTagNameNS(credentialsElement, "http://schemas.microsoft.com/windowsazure", "Domain");
                                if (domainElement != null) {
                                    String domainInstance;
                                    domainInstance = domainElement.getTextContent();
                                    credentialsInstance.setDomain(domainInstance);
                                }
                               
                                Element usernameElement = XmlUtility.getElementByTagNameNS(credentialsElement, "http://schemas.microsoft.com/windowsazure", "Username");
                                if (usernameElement != null) {
                                    String usernameInstance;
                                    usernameInstance = usernameElement.getTextContent();
                                    credentialsInstance.setUserName(usernameInstance);
                                }
                               
                                Element passwordElement = XmlUtility.getElementByTagNameNS(credentialsElement, "http://schemas.microsoft.com/windowsazure", "Password");
                                if (passwordElement != null) {
                                    String passwordInstance;
                                    passwordInstance = passwordElement.getTextContent();
                                    credentialsInstance.setPassword(passwordInstance);
                                }
                            }
                           
                            Element joinDomainElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "JoinDomain");
                            if (joinDomainElement != null) {
                                String joinDomainInstance;
                                joinDomainInstance = joinDomainElement.getTextContent();
                                domainJoinInstance.setDomainToJoin(joinDomainInstance);
                            }
                           
                            Element machineObjectOUElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "MachineObjectOU");
                            if (machineObjectOUElement != null) {
                                String machineObjectOUInstance;
                                machineObjectOUInstance = machineObjectOUElement.getTextContent();
                                domainJoinInstance.setLdapMachineObjectOU(machineObjectOUInstance);
                            }
                           
                            Element provisioningElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "Provisioning");
                            if (provisioningElement != null) {
                                DomainJoinProvisioning provisioningInstance = new DomainJoinProvisioning();
                                domainJoinInstance.setProvisioning(provisioningInstance);
                               
                                Element accountDataElement = XmlUtility.getElementByTagNameNS(provisioningElement, "http://schemas.microsoft.com/windowsazure", "AccountData");
                                if (accountDataElement != null) {
                                    String accountDataInstance;
                                    accountDataInstance = accountDataElement.getTextContent();
                                    provisioningInstance.setAccountData(accountDataInstance);
                                }
                            }
                        }
                       
                        Element storedCertificateSettingsSequenceElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "StoredCertificateSettings");
                        if (storedCertificateSettingsSequenceElement != null) {
                            for (int i6 = 0; i6 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(storedCertificateSettingsSequenceElement, "http://schemas.microsoft.com/windowsazure", "CertificateSetting").size(); i6 = i6 + 1) {
                                org.w3c.dom.Element storedCertificateSettingsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(storedCertificateSettingsSequenceElement, "http://schemas.microsoft.com/windowsazure", "CertificateSetting").get(i6));
                                StoredCertificateSettings certificateSettingInstance = new StoredCertificateSettings();
                                configurationSetInstance.getStoredCertificateSettings().add(certificateSettingInstance);
                               
                                Element storeLocationElement = XmlUtility.getElementByTagNameNS(storedCertificateSettingsElement, "http://schemas.microsoft.com/windowsazure", "StoreLocation");
                                if (storeLocationElement != null) {
                                }
                               
                                Element storeNameElement = XmlUtility.getElementByTagNameNS(storedCertificateSettingsElement, "http://schemas.microsoft.com/windowsazure", "StoreName");
                                if (storeNameElement != null) {
                                    String storeNameInstance;
                                    storeNameInstance = storeNameElement.getTextContent();
                                    certificateSettingInstance.setStoreName(storeNameInstance);
                                }
                               
                                Element thumbprintElement = XmlUtility.getElementByTagNameNS(storedCertificateSettingsElement, "http://schemas.microsoft.com/windowsazure", "Thumbprint");
                                if (thumbprintElement != null) {
                                    String thumbprintInstance;
                                    thumbprintInstance = thumbprintElement.getTextContent();
                                    certificateSettingInstance.setThumbprint(thumbprintInstance);
                                }
                            }
                        }
                       
                        Element winRMElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "WinRM");
                        if (winRMElement != null) {
                            WindowsRemoteManagementSettings winRMInstance = new WindowsRemoteManagementSettings();
                            configurationSetInstance.setWindowsRemoteManagement(winRMInstance);
                           
                            Element listenersSequenceElement = XmlUtility.getElementByTagNameNS(winRMElement, "http://schemas.microsoft.com/windowsazure", "Listeners");
                            if (listenersSequenceElement != null) {
                                for (int i7 = 0; i7 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(listenersSequenceElement, "http://schemas.microsoft.com/windowsazure", "Listener").size(); i7 = i7 + 1) {
                                    org.w3c.dom.Element listenersElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(listenersSequenceElement, "http://schemas.microsoft.com/windowsazure", "Listener").get(i7));
                                    WindowsRemoteManagementListener listenerInstance = new WindowsRemoteManagementListener();
                                    winRMInstance.getListeners().add(listenerInstance);
                                   
                                    Element protocolElement3 = XmlUtility.getElementByTagNameNS(listenersElement, "http://schemas.microsoft.com/windowsazure", "Protocol");
                                    if (protocolElement3 != null) {
                                        VirtualMachineWindowsRemoteManagementListenerType protocolInstance3;
                                        protocolInstance3 = VirtualMachineWindowsRemoteManagementListenerType.valueOf(protocolElement3.getTextContent());
                                        listenerInstance.setListenerType(protocolInstance3);
                                    }
                                   
                                    Element certificateThumbprintElement = XmlUtility.getElementByTagNameNS(listenersElement, "http://schemas.microsoft.com/windowsazure", "CertificateThumbprint");
                                    if (certificateThumbprintElement != null) {
                                        String certificateThumbprintInstance;
                                        certificateThumbprintInstance = certificateThumbprintElement.getTextContent();
                                        listenerInstance.setCertificateThumbprint(certificateThumbprintInstance);
                                    }
                                }
                            }
                        }
                       
                        Element adminUsernameElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "AdminUsername");
                        if (adminUsernameElement != null) {
                            String adminUsernameInstance;
                            adminUsernameInstance = adminUsernameElement.getTextContent();
                            configurationSetInstance.setAdminUserName(adminUsernameInstance);
                        }
                       
                        Element hostNameElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "HostName");
                        if (hostNameElement != null) {
                            String hostNameInstance;
                            hostNameInstance = hostNameElement.getTextContent();
                            configurationSetInstance.setHostName(hostNameInstance);
                        }
                       
                        Element userNameElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "UserName");
                        if (userNameElement != null) {
                            String userNameInstance;
                            userNameInstance = userNameElement.getTextContent();
                            configurationSetInstance.setUserName(userNameInstance);
                        }
                       
                        Element userPasswordElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "UserPassword");
                        if (userPasswordElement != null) {
                            String userPasswordInstance;
                            userPasswordInstance = userPasswordElement.getTextContent();
                            configurationSetInstance.setUserPassword(userPasswordInstance);
                        }
                       
                        Element disableSshPasswordAuthenticationElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "DisableSshPasswordAuthentication");
                        if (disableSshPasswordAuthenticationElement != null && (disableSshPasswordAuthenticationElement.getTextContent() == null || disableSshPasswordAuthenticationElement.getTextContent().isEmpty() == true) == false) {
                            boolean disableSshPasswordAuthenticationInstance;
                            disableSshPasswordAuthenticationInstance = DatatypeConverter.parseBoolean(disableSshPasswordAuthenticationElement.getTextContent().toLowerCase());
                            configurationSetInstance.setDisableSshPasswordAuthentication(disableSshPasswordAuthenticationInstance);
                        }
                       
                        Element sSHElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "SSH");
                        if (sSHElement != null) {
                            SshSettings sSHInstance = new SshSettings();
                            configurationSetInstance.setSshSettings(sSHInstance);
                           
                            Element publicKeysSequenceElement = XmlUtility.getElementByTagNameNS(sSHElement, "http://schemas.microsoft.com/windowsazure", "PublicKeys");
                            if (publicKeysSequenceElement != null) {
                                for (int i8 = 0; i8 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(publicKeysSequenceElement, "http://schemas.microsoft.com/windowsazure", "PublicKey").size(); i8 = i8 + 1) {
                                    org.w3c.dom.Element publicKeysElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(publicKeysSequenceElement, "http://schemas.microsoft.com/windowsazure", "PublicKey").get(i8));
                                    SshSettingPublicKey publicKeyInstance = new SshSettingPublicKey();
                                    sSHInstance.getPublicKeys().add(publicKeyInstance);
                                   
                                    Element fingerprintElement = XmlUtility.getElementByTagNameNS(publicKeysElement, "http://schemas.microsoft.com/windowsazure", "Fingerprint");
                                    if (fingerprintElement != null) {
                                        String fingerprintInstance;
                                        fingerprintInstance = fingerprintElement.getTextContent();
                                        publicKeyInstance.setFingerprint(fingerprintInstance);
                                    }
                                   
                                    Element pathElement2 = XmlUtility.getElementByTagNameNS(publicKeysElement, "http://schemas.microsoft.com/windowsazure", "Path");
                                    if (pathElement2 != null) {
                                        String pathInstance2;
                                        pathInstance2 = pathElement2.getTextContent();
                                        publicKeyInstance.setPath(pathInstance2);
                                    }
                                }
                            }
                           
                            Element keyPairsSequenceElement = XmlUtility.getElementByTagNameNS(sSHElement, "http://schemas.microsoft.com/windowsazure", "KeyPairs");
                            if (keyPairsSequenceElement != null) {
                                for (int i9 = 0; i9 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").size(); i9 = i9 + 1) {
                                    org.w3c.dom.Element keyPairsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").get(i9));
                                    SshSettingKeyPair keyPairInstance = new SshSettingKeyPair();
                                    sSHInstance.getKeyPairs().add(keyPairInstance);
                                   
                                    Element fingerprintElement2 = XmlUtility.getElementByTagNameNS(keyPairsElement, "http://schemas.microsoft.com/windowsazure", "Fingerprint");
                                    if (fingerprintElement2 != null) {
                                        String fingerprintInstance2;
                                        fingerprintInstance2 = fingerprintElement2.getTextContent();
                                        keyPairInstance.setFingerprint(fingerprintInstance2);
                                    }
                                   
                                    Element pathElement3 = XmlUtility.getElementByTagNameNS(keyPairsElement, "http://schemas.microsoft.com/windowsazure", "Path");
                                    if (pathElement3 != null) {
                                        String pathInstance3;
                                        pathInstance3 = pathElement3.getTextContent();
                                        keyPairInstance.setPath(pathInstance3);
                                    }
                                }
                            }
                        }
                       
                        Element customDataElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "CustomData");
                        if (customDataElement != null) {
                            String customDataInstance;
                            customDataInstance = customDataElement.getTextContent();
                            configurationSetInstance.setCustomData(customDataInstance);
                        }
                    }
                }
               
                Element dataVirtualHardDisksSequenceElement = XmlUtility.getElementByTagNameNS(persistentVMRoleElement, "http://schemas.microsoft.com/windowsazure", "DataVirtualHardDisks");
View Full Code Here


                       
                        Element configurationSetsSequenceElement = XmlUtility.getElementByTagNameNS(roleListElement, "http://schemas.microsoft.com/windowsazure", "ConfigurationSets");
                        if (configurationSetsSequenceElement != null) {
                            for (int i11 = 0; i11 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(configurationSetsSequenceElement, "http://schemas.microsoft.com/windowsazure", "ConfigurationSet").size(); i11 = i11 + 1) {
                                org.w3c.dom.Element configurationSetsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(configurationSetsSequenceElement, "http://schemas.microsoft.com/windowsazure", "ConfigurationSet").get(i11));
                                ConfigurationSet configurationSetInstance = new ConfigurationSet();
                                roleInstance.getConfigurationSets().add(configurationSetInstance);
                               
                                Element configurationSetTypeElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "ConfigurationSetType");
                                if (configurationSetTypeElement != null) {
                                    String configurationSetTypeInstance;
                                    configurationSetTypeInstance = configurationSetTypeElement.getTextContent();
                                    configurationSetInstance.setConfigurationSetType(configurationSetTypeInstance);
                                }
                               
                                Element inputEndpointsSequenceElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "InputEndpoints");
                                if (inputEndpointsSequenceElement != null) {
                                    for (int i12 = 0; i12 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(inputEndpointsSequenceElement, "http://schemas.microsoft.com/windowsazure", "InputEndpoint").size(); i12 = i12 + 1) {
                                        org.w3c.dom.Element inputEndpointsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(inputEndpointsSequenceElement, "http://schemas.microsoft.com/windowsazure", "InputEndpoint").get(i12));
                                        InputEndpoint inputEndpointInstance = new InputEndpoint();
                                        configurationSetInstance.getInputEndpoints().add(inputEndpointInstance);
                                       
                                        Element loadBalancedEndpointSetNameElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "LoadBalancedEndpointSetName");
                                        if (loadBalancedEndpointSetNameElement != null) {
                                            String loadBalancedEndpointSetNameInstance;
                                            loadBalancedEndpointSetNameInstance = loadBalancedEndpointSetNameElement.getTextContent();
                                            inputEndpointInstance.setLoadBalancedEndpointSetName(loadBalancedEndpointSetNameInstance);
                                        }
                                       
                                        Element localPortElement2 = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "LocalPort");
                                        if (localPortElement2 != null && (localPortElement2.getTextContent() == null || localPortElement2.getTextContent().isEmpty() == true) == false) {
                                            int localPortInstance2;
                                            localPortInstance2 = DatatypeConverter.parseInt(localPortElement2.getTextContent());
                                            inputEndpointInstance.setLocalPort(localPortInstance2);
                                        }
                                       
                                        Element nameElement6 = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "Name");
                                        if (nameElement6 != null) {
                                            String nameInstance6;
                                            nameInstance6 = nameElement6.getTextContent();
                                            inputEndpointInstance.setName(nameInstance6);
                                        }
                                       
                                        Element portElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "Port");
                                        if (portElement != null && (portElement.getTextContent() == null || portElement.getTextContent().isEmpty() == true) == false) {
                                            int portInstance;
                                            portInstance = DatatypeConverter.parseInt(portElement.getTextContent());
                                            inputEndpointInstance.setPort(portInstance);
                                        }
                                       
                                        Element loadBalancerProbeElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "LoadBalancerProbe");
                                        if (loadBalancerProbeElement != null) {
                                            LoadBalancerProbe loadBalancerProbeInstance = new LoadBalancerProbe();
                                            inputEndpointInstance.setLoadBalancerProbe(loadBalancerProbeInstance);
                                           
                                            Element pathElement = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "Path");
                                            if (pathElement != null) {
                                                String pathInstance;
                                                pathInstance = pathElement.getTextContent();
                                                loadBalancerProbeInstance.setPath(pathInstance);
                                            }
                                           
                                            Element portElement2 = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "Port");
                                            if (portElement2 != null) {
                                                int portInstance2;
                                                portInstance2 = DatatypeConverter.parseInt(portElement2.getTextContent());
                                                loadBalancerProbeInstance.setPort(portInstance2);
                                            }
                                           
                                            Element protocolElement2 = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "Protocol");
                                            if (protocolElement2 != null) {
                                                LoadBalancerProbeTransportProtocol protocolInstance2;
                                                protocolInstance2 = com.microsoft.windowsazure.management.compute.ComputeManagementClientImpl.parseLoadBalancerProbeTransportProtocol(protocolElement2.getTextContent());
                                                loadBalancerProbeInstance.setProtocol(protocolInstance2);
                                            }
                                           
                                            Element intervalInSecondsElement = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "IntervalInSeconds");
                                            if (intervalInSecondsElement != null && (intervalInSecondsElement.getTextContent() == null || intervalInSecondsElement.getTextContent().isEmpty() == true) == false) {
                                                int intervalInSecondsInstance;
                                                intervalInSecondsInstance = DatatypeConverter.parseInt(intervalInSecondsElement.getTextContent());
                                                loadBalancerProbeInstance.setIntervalInSeconds(intervalInSecondsInstance);
                                            }
                                           
                                            Element timeoutInSecondsElement = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "TimeoutInSeconds");
                                            if (timeoutInSecondsElement != null && (timeoutInSecondsElement.getTextContent() == null || timeoutInSecondsElement.getTextContent().isEmpty() == true) == false) {
                                                int timeoutInSecondsInstance;
                                                timeoutInSecondsInstance = DatatypeConverter.parseInt(timeoutInSecondsElement.getTextContent());
                                                loadBalancerProbeInstance.setTimeoutInSeconds(timeoutInSecondsInstance);
                                            }
                                        }
                                       
                                        Element protocolElement3 = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "Protocol");
                                        if (protocolElement3 != null) {
                                            String protocolInstance3;
                                            protocolInstance3 = protocolElement3.getTextContent();
                                            inputEndpointInstance.setProtocol(protocolInstance3);
                                        }
                                       
                                        Element vipElement2 = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "Vip");
                                        if (vipElement2 != null) {
                                            InetAddress vipInstance2;
                                            vipInstance2 = InetAddress.getByName(vipElement2.getTextContent());
                                            inputEndpointInstance.setVirtualIPAddress(vipInstance2);
                                        }
                                       
                                        Element enableDirectServerReturnElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "EnableDirectServerReturn");
                                        if (enableDirectServerReturnElement != null && (enableDirectServerReturnElement.getTextContent() == null || enableDirectServerReturnElement.getTextContent().isEmpty() == true) == false) {
                                            boolean enableDirectServerReturnInstance;
                                            enableDirectServerReturnInstance = DatatypeConverter.parseBoolean(enableDirectServerReturnElement.getTextContent().toLowerCase());
                                            inputEndpointInstance.setEnableDirectServerReturn(enableDirectServerReturnInstance);
                                        }
                                       
                                        Element loadBalancerNameElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "LoadBalancerName");
                                        if (loadBalancerNameElement != null) {
                                            String loadBalancerNameInstance;
                                            loadBalancerNameInstance = loadBalancerNameElement.getTextContent();
                                            inputEndpointInstance.setLoadBalancerName(loadBalancerNameInstance);
                                        }
                                       
                                        Element endpointAclElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "EndpointAcl");
                                        if (endpointAclElement != null) {
                                            EndpointAcl endpointAclInstance = new EndpointAcl();
                                            inputEndpointInstance.setEndpointAcl(endpointAclInstance);
                                           
                                            Element rulesSequenceElement = XmlUtility.getElementByTagNameNS(endpointAclElement, "http://schemas.microsoft.com/windowsazure", "Rules");
                                            if (rulesSequenceElement != null) {
                                                for (int i13 = 0; i13 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(rulesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Rule").size(); i13 = i13 + 1) {
                                                    org.w3c.dom.Element rulesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(rulesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Rule").get(i13));
                                                    AccessControlListRule ruleInstance = new AccessControlListRule();
                                                    endpointAclInstance.getRules().add(ruleInstance);
                                                   
                                                    Element orderElement = XmlUtility.getElementByTagNameNS(rulesElement, "http://schemas.microsoft.com/windowsazure", "Order");
                                                    if (orderElement != null && (orderElement.getTextContent() == null || orderElement.getTextContent().isEmpty() == true) == false) {
                                                        int orderInstance;
                                                        orderInstance = DatatypeConverter.parseInt(orderElement.getTextContent());
                                                        ruleInstance.setOrder(orderInstance);
                                                    }
                                                   
                                                    Element actionElement = XmlUtility.getElementByTagNameNS(rulesElement, "http://schemas.microsoft.com/windowsazure", "Action");
                                                    if (actionElement != null) {
                                                        String actionInstance;
                                                        actionInstance = actionElement.getTextContent();
                                                        ruleInstance.setAction(actionInstance);
                                                    }
                                                   
                                                    Element remoteSubnetElement = XmlUtility.getElementByTagNameNS(rulesElement, "http://schemas.microsoft.com/windowsazure", "RemoteSubnet");
                                                    if (remoteSubnetElement != null) {
                                                        String remoteSubnetInstance;
                                                        remoteSubnetInstance = remoteSubnetElement.getTextContent();
                                                        ruleInstance.setRemoteSubnet(remoteSubnetInstance);
                                                    }
                                                   
                                                    Element descriptionElement = XmlUtility.getElementByTagNameNS(rulesElement, "http://schemas.microsoft.com/windowsazure", "Description");
                                                    if (descriptionElement != null) {
                                                        String descriptionInstance;
                                                        descriptionInstance = descriptionElement.getTextContent();
                                                        ruleInstance.setDescription(descriptionInstance);
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                               
                                Element subnetNamesSequenceElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "SubnetNames");
                                if (subnetNamesSequenceElement != null) {
                                    for (int i14 = 0; i14 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(subnetNamesSequenceElement, "http://schemas.microsoft.com/windowsazure", "SubnetName").size(); i14 = i14 + 1) {
                                        org.w3c.dom.Element subnetNamesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(subnetNamesSequenceElement, "http://schemas.microsoft.com/windowsazure", "SubnetName").get(i14));
                                        configurationSetInstance.getSubnetNames().add(subnetNamesElement.getTextContent());
                                    }
                                }
                               
                                Element staticVirtualNetworkIPAddressElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "StaticVirtualNetworkIPAddress");
                                if (staticVirtualNetworkIPAddressElement != null) {
                                    String staticVirtualNetworkIPAddressInstance;
                                    staticVirtualNetworkIPAddressInstance = staticVirtualNetworkIPAddressElement.getTextContent();
                                    configurationSetInstance.setStaticVirtualNetworkIPAddress(staticVirtualNetworkIPAddressInstance);
                                }
                               
                                Element publicIPsSequenceElement2 = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "PublicIPs");
                                if (publicIPsSequenceElement2 != null) {
                                    for (int i15 = 0; i15 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(publicIPsSequenceElement2, "http://schemas.microsoft.com/windowsazure", "PublicIP").size(); i15 = i15 + 1) {
                                        org.w3c.dom.Element publicIPsElement2 = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(publicIPsSequenceElement2, "http://schemas.microsoft.com/windowsazure", "PublicIP").get(i15));
                                        ConfigurationSet.PublicIP publicIPInstance2 = new ConfigurationSet.PublicIP();
                                        configurationSetInstance.getPublicIPs().add(publicIPInstance2);
                                       
                                        Element nameElement7 = XmlUtility.getElementByTagNameNS(publicIPsElement2, "http://schemas.microsoft.com/windowsazure", "Name");
                                        if (nameElement7 != null) {
                                            String nameInstance7;
                                            nameInstance7 = nameElement7.getTextContent();
                                            publicIPInstance2.setName(nameInstance7);
                                        }
                                    }
                                }
                               
                                Element computerNameElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "ComputerName");
                                if (computerNameElement != null) {
                                    String computerNameInstance;
                                    computerNameInstance = computerNameElement.getTextContent();
                                    configurationSetInstance.setComputerName(computerNameInstance);
                                }
                               
                                Element adminPasswordElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "AdminPassword");
                                if (adminPasswordElement != null) {
                                    String adminPasswordInstance;
                                    adminPasswordInstance = adminPasswordElement.getTextContent();
                                    configurationSetInstance.setAdminPassword(adminPasswordInstance);
                                }
                               
                                Element resetPasswordOnFirstLogonElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "ResetPasswordOnFirstLogon");
                                if (resetPasswordOnFirstLogonElement != null && (resetPasswordOnFirstLogonElement.getTextContent() == null || resetPasswordOnFirstLogonElement.getTextContent().isEmpty() == true) == false) {
                                    boolean resetPasswordOnFirstLogonInstance;
                                    resetPasswordOnFirstLogonInstance = DatatypeConverter.parseBoolean(resetPasswordOnFirstLogonElement.getTextContent().toLowerCase());
                                    configurationSetInstance.setResetPasswordOnFirstLogon(resetPasswordOnFirstLogonInstance);
                                }
                               
                                Element enableAutomaticUpdatesElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "EnableAutomaticUpdates");
                                if (enableAutomaticUpdatesElement != null && (enableAutomaticUpdatesElement.getTextContent() == null || enableAutomaticUpdatesElement.getTextContent().isEmpty() == true) == false) {
                                    boolean enableAutomaticUpdatesInstance;
                                    enableAutomaticUpdatesInstance = DatatypeConverter.parseBoolean(enableAutomaticUpdatesElement.getTextContent().toLowerCase());
                                    configurationSetInstance.setEnableAutomaticUpdates(enableAutomaticUpdatesInstance);
                                }
                               
                                Element timeZoneElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "TimeZone");
                                if (timeZoneElement != null) {
                                    String timeZoneInstance;
                                    timeZoneInstance = timeZoneElement.getTextContent();
                                    configurationSetInstance.setTimeZone(timeZoneInstance);
                                }
                               
                                Element domainJoinElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "DomainJoin");
                                if (domainJoinElement != null) {
                                    DomainJoinSettings domainJoinInstance = new DomainJoinSettings();
                                    configurationSetInstance.setDomainJoin(domainJoinInstance);
                                   
                                    Element credentialsElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "Credentials");
                                    if (credentialsElement != null) {
                                        DomainJoinCredentials credentialsInstance = new DomainJoinCredentials();
                                        domainJoinInstance.setCredentials(credentialsInstance);
                                       
                                        Element domainElement = XmlUtility.getElementByTagNameNS(credentialsElement, "http://schemas.microsoft.com/windowsazure", "Domain");
                                        if (domainElement != null) {
                                            String domainInstance;
                                            domainInstance = domainElement.getTextContent();
                                            credentialsInstance.setDomain(domainInstance);
                                        }
                                       
                                        Element usernameElement = XmlUtility.getElementByTagNameNS(credentialsElement, "http://schemas.microsoft.com/windowsazure", "Username");
                                        if (usernameElement != null) {
                                            String usernameInstance;
                                            usernameInstance = usernameElement.getTextContent();
                                            credentialsInstance.setUserName(usernameInstance);
                                        }
                                       
                                        Element passwordElement = XmlUtility.getElementByTagNameNS(credentialsElement, "http://schemas.microsoft.com/windowsazure", "Password");
                                        if (passwordElement != null) {
                                            String passwordInstance;
                                            passwordInstance = passwordElement.getTextContent();
                                            credentialsInstance.setPassword(passwordInstance);
                                        }
                                    }
                                   
                                    Element joinDomainElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "JoinDomain");
                                    if (joinDomainElement != null) {
                                        String joinDomainInstance;
                                        joinDomainInstance = joinDomainElement.getTextContent();
                                        domainJoinInstance.setDomainToJoin(joinDomainInstance);
                                    }
                                   
                                    Element machineObjectOUElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "MachineObjectOU");
                                    if (machineObjectOUElement != null) {
                                        String machineObjectOUInstance;
                                        machineObjectOUInstance = machineObjectOUElement.getTextContent();
                                        domainJoinInstance.setLdapMachineObjectOU(machineObjectOUInstance);
                                    }
                                   
                                    Element provisioningElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "Provisioning");
                                    if (provisioningElement != null) {
                                        DomainJoinProvisioning provisioningInstance = new DomainJoinProvisioning();
                                        domainJoinInstance.setProvisioning(provisioningInstance);
                                       
                                        Element accountDataElement = XmlUtility.getElementByTagNameNS(provisioningElement, "http://schemas.microsoft.com/windowsazure", "AccountData");
                                        if (accountDataElement != null) {
                                            String accountDataInstance;
                                            accountDataInstance = accountDataElement.getTextContent();
                                            provisioningInstance.setAccountData(accountDataInstance);
                                        }
                                    }
                                }
                               
                                Element storedCertificateSettingsSequenceElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "StoredCertificateSettings");
                                if (storedCertificateSettingsSequenceElement != null) {
                                    for (int i16 = 0; i16 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(storedCertificateSettingsSequenceElement, "http://schemas.microsoft.com/windowsazure", "CertificateSetting").size(); i16 = i16 + 1) {
                                        org.w3c.dom.Element storedCertificateSettingsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(storedCertificateSettingsSequenceElement, "http://schemas.microsoft.com/windowsazure", "CertificateSetting").get(i16));
                                        StoredCertificateSettings certificateSettingInstance = new StoredCertificateSettings();
                                        configurationSetInstance.getStoredCertificateSettings().add(certificateSettingInstance);
                                       
                                        Element storeLocationElement = XmlUtility.getElementByTagNameNS(storedCertificateSettingsElement, "http://schemas.microsoft.com/windowsazure", "StoreLocation");
                                        if (storeLocationElement != null) {
                                        }
                                       
                                        Element storeNameElement = XmlUtility.getElementByTagNameNS(storedCertificateSettingsElement, "http://schemas.microsoft.com/windowsazure", "StoreName");
                                        if (storeNameElement != null) {
                                            String storeNameInstance;
                                            storeNameInstance = storeNameElement.getTextContent();
                                            certificateSettingInstance.setStoreName(storeNameInstance);
                                        }
                                       
                                        Element thumbprintElement = XmlUtility.getElementByTagNameNS(storedCertificateSettingsElement, "http://schemas.microsoft.com/windowsazure", "Thumbprint");
                                        if (thumbprintElement != null) {
                                            String thumbprintInstance;
                                            thumbprintInstance = thumbprintElement.getTextContent();
                                            certificateSettingInstance.setThumbprint(thumbprintInstance);
                                        }
                                    }
                                }
                               
                                Element winRMElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "WinRM");
                                if (winRMElement != null) {
                                    WindowsRemoteManagementSettings winRMInstance = new WindowsRemoteManagementSettings();
                                    configurationSetInstance.setWindowsRemoteManagement(winRMInstance);
                                   
                                    Element listenersSequenceElement = XmlUtility.getElementByTagNameNS(winRMElement, "http://schemas.microsoft.com/windowsazure", "Listeners");
                                    if (listenersSequenceElement != null) {
                                        for (int i17 = 0; i17 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(listenersSequenceElement, "http://schemas.microsoft.com/windowsazure", "Listener").size(); i17 = i17 + 1) {
                                            org.w3c.dom.Element listenersElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(listenersSequenceElement, "http://schemas.microsoft.com/windowsazure", "Listener").get(i17));
                                            WindowsRemoteManagementListener listenerInstance = new WindowsRemoteManagementListener();
                                            winRMInstance.getListeners().add(listenerInstance);
                                           
                                            Element protocolElement4 = XmlUtility.getElementByTagNameNS(listenersElement, "http://schemas.microsoft.com/windowsazure", "Protocol");
                                            if (protocolElement4 != null) {
                                                VirtualMachineWindowsRemoteManagementListenerType protocolInstance4;
                                                protocolInstance4 = VirtualMachineWindowsRemoteManagementListenerType.valueOf(protocolElement4.getTextContent());
                                                listenerInstance.setListenerType(protocolInstance4);
                                            }
                                           
                                            Element certificateThumbprintElement = XmlUtility.getElementByTagNameNS(listenersElement, "http://schemas.microsoft.com/windowsazure", "CertificateThumbprint");
                                            if (certificateThumbprintElement != null) {
                                                String certificateThumbprintInstance;
                                                certificateThumbprintInstance = certificateThumbprintElement.getTextContent();
                                                listenerInstance.setCertificateThumbprint(certificateThumbprintInstance);
                                            }
                                        }
                                    }
                                }
                               
                                Element adminUsernameElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "AdminUsername");
                                if (adminUsernameElement != null) {
                                    String adminUsernameInstance;
                                    adminUsernameInstance = adminUsernameElement.getTextContent();
                                    configurationSetInstance.setAdminUserName(adminUsernameInstance);
                                }
                               
                                Element hostNameElement2 = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "HostName");
                                if (hostNameElement2 != null) {
                                    String hostNameInstance2;
                                    hostNameInstance2 = hostNameElement2.getTextContent();
                                    configurationSetInstance.setHostName(hostNameInstance2);
                                }
                               
                                Element userNameElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "UserName");
                                if (userNameElement != null) {
                                    String userNameInstance;
                                    userNameInstance = userNameElement.getTextContent();
                                    configurationSetInstance.setUserName(userNameInstance);
                                }
                               
                                Element userPasswordElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "UserPassword");
                                if (userPasswordElement != null) {
                                    String userPasswordInstance;
                                    userPasswordInstance = userPasswordElement.getTextContent();
                                    configurationSetInstance.setUserPassword(userPasswordInstance);
                                }
                               
                                Element disableSshPasswordAuthenticationElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "DisableSshPasswordAuthentication");
                                if (disableSshPasswordAuthenticationElement != null && (disableSshPasswordAuthenticationElement.getTextContent() == null || disableSshPasswordAuthenticationElement.getTextContent().isEmpty() == true) == false) {
                                    boolean disableSshPasswordAuthenticationInstance;
                                    disableSshPasswordAuthenticationInstance = DatatypeConverter.parseBoolean(disableSshPasswordAuthenticationElement.getTextContent().toLowerCase());
                                    configurationSetInstance.setDisableSshPasswordAuthentication(disableSshPasswordAuthenticationInstance);
                                }
                               
                                Element sSHElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "SSH");
                                if (sSHElement != null) {
                                    SshSettings sSHInstance = new SshSettings();
                                    configurationSetInstance.setSshSettings(sSHInstance);
                                   
                                    Element publicKeysSequenceElement = XmlUtility.getElementByTagNameNS(sSHElement, "http://schemas.microsoft.com/windowsazure", "PublicKeys");
                                    if (publicKeysSequenceElement != null) {
                                        for (int i18 = 0; i18 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(publicKeysSequenceElement, "http://schemas.microsoft.com/windowsazure", "PublicKey").size(); i18 = i18 + 1) {
                                            org.w3c.dom.Element publicKeysElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(publicKeysSequenceElement, "http://schemas.microsoft.com/windowsazure", "PublicKey").get(i18));
                                            SshSettingPublicKey publicKeyInstance = new SshSettingPublicKey();
                                            sSHInstance.getPublicKeys().add(publicKeyInstance);
                                           
                                            Element fingerprintElement = XmlUtility.getElementByTagNameNS(publicKeysElement, "http://schemas.microsoft.com/windowsazure", "Fingerprint");
                                            if (fingerprintElement != null) {
                                                String fingerprintInstance;
                                                fingerprintInstance = fingerprintElement.getTextContent();
                                                publicKeyInstance.setFingerprint(fingerprintInstance);
                                            }
                                           
                                            Element pathElement2 = XmlUtility.getElementByTagNameNS(publicKeysElement, "http://schemas.microsoft.com/windowsazure", "Path");
                                            if (pathElement2 != null) {
                                                String pathInstance2;
                                                pathInstance2 = pathElement2.getTextContent();
                                                publicKeyInstance.setPath(pathInstance2);
                                            }
                                        }
                                    }
                                   
                                    Element keyPairsSequenceElement = XmlUtility.getElementByTagNameNS(sSHElement, "http://schemas.microsoft.com/windowsazure", "KeyPairs");
                                    if (keyPairsSequenceElement != null) {
                                        for (int i19 = 0; i19 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").size(); i19 = i19 + 1) {
                                            org.w3c.dom.Element keyPairsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").get(i19));
                                            SshSettingKeyPair keyPairInstance = new SshSettingKeyPair();
                                            sSHInstance.getKeyPairs().add(keyPairInstance);
                                           
                                            Element fingerprintElement2 = XmlUtility.getElementByTagNameNS(keyPairsElement, "http://schemas.microsoft.com/windowsazure", "Fingerprint");
                                            if (fingerprintElement2 != null) {
                                                String fingerprintInstance2;
                                                fingerprintInstance2 = fingerprintElement2.getTextContent();
                                                keyPairInstance.setFingerprint(fingerprintInstance2);
                                            }
                                           
                                            Element pathElement3 = XmlUtility.getElementByTagNameNS(keyPairsElement, "http://schemas.microsoft.com/windowsazure", "Path");
                                            if (pathElement3 != null) {
                                                String pathInstance3;
                                                pathInstance3 = pathElement3.getTextContent();
                                                keyPairInstance.setPath(pathInstance3);
                                            }
                                        }
                                    }
                                }
                               
                                Element customDataElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "CustomData");
                                if (customDataElement != null) {
                                    String customDataInstance;
                                    customDataInstance = customDataElement.getTextContent();
                                    configurationSetInstance.setCustomData(customDataInstance);
                                }
                            }
                        }
                       
                        Element resourceExtensionReferencesSequenceElement = XmlUtility.getElementByTagNameNS(roleListElement, "http://schemas.microsoft.com/windowsazure", "ResourceExtensionReferences");
View Full Code Here

                       
                        Element configurationSetsSequenceElement = XmlUtility.getElementByTagNameNS(roleListElement, "http://schemas.microsoft.com/windowsazure", "ConfigurationSets");
                        if (configurationSetsSequenceElement != null) {
                            for (int i11 = 0; i11 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(configurationSetsSequenceElement, "http://schemas.microsoft.com/windowsazure", "ConfigurationSet").size(); i11 = i11 + 1) {
                                org.w3c.dom.Element configurationSetsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(configurationSetsSequenceElement, "http://schemas.microsoft.com/windowsazure", "ConfigurationSet").get(i11));
                                ConfigurationSet configurationSetInstance = new ConfigurationSet();
                                roleInstance.getConfigurationSets().add(configurationSetInstance);
                               
                                Element configurationSetTypeElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "ConfigurationSetType");
                                if (configurationSetTypeElement != null) {
                                    String configurationSetTypeInstance;
                                    configurationSetTypeInstance = configurationSetTypeElement.getTextContent();
                                    configurationSetInstance.setConfigurationSetType(configurationSetTypeInstance);
                                }
                               
                                Element inputEndpointsSequenceElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "InputEndpoints");
                                if (inputEndpointsSequenceElement != null) {
                                    for (int i12 = 0; i12 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(inputEndpointsSequenceElement, "http://schemas.microsoft.com/windowsazure", "InputEndpoint").size(); i12 = i12 + 1) {
                                        org.w3c.dom.Element inputEndpointsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(inputEndpointsSequenceElement, "http://schemas.microsoft.com/windowsazure", "InputEndpoint").get(i12));
                                        InputEndpoint inputEndpointInstance = new InputEndpoint();
                                        configurationSetInstance.getInputEndpoints().add(inputEndpointInstance);
                                       
                                        Element loadBalancedEndpointSetNameElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "LoadBalancedEndpointSetName");
                                        if (loadBalancedEndpointSetNameElement != null) {
                                            String loadBalancedEndpointSetNameInstance;
                                            loadBalancedEndpointSetNameInstance = loadBalancedEndpointSetNameElement.getTextContent();
                                            inputEndpointInstance.setLoadBalancedEndpointSetName(loadBalancedEndpointSetNameInstance);
                                        }
                                       
                                        Element localPortElement2 = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "LocalPort");
                                        if (localPortElement2 != null && (localPortElement2.getTextContent() == null || localPortElement2.getTextContent().isEmpty() == true) == false) {
                                            int localPortInstance2;
                                            localPortInstance2 = DatatypeConverter.parseInt(localPortElement2.getTextContent());
                                            inputEndpointInstance.setLocalPort(localPortInstance2);
                                        }
                                       
                                        Element nameElement6 = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "Name");
                                        if (nameElement6 != null) {
                                            String nameInstance6;
                                            nameInstance6 = nameElement6.getTextContent();
                                            inputEndpointInstance.setName(nameInstance6);
                                        }
                                       
                                        Element portElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "Port");
                                        if (portElement != null && (portElement.getTextContent() == null || portElement.getTextContent().isEmpty() == true) == false) {
                                            int portInstance;
                                            portInstance = DatatypeConverter.parseInt(portElement.getTextContent());
                                            inputEndpointInstance.setPort(portInstance);
                                        }
                                       
                                        Element loadBalancerProbeElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "LoadBalancerProbe");
                                        if (loadBalancerProbeElement != null) {
                                            LoadBalancerProbe loadBalancerProbeInstance = new LoadBalancerProbe();
                                            inputEndpointInstance.setLoadBalancerProbe(loadBalancerProbeInstance);
                                           
                                            Element pathElement = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "Path");
                                            if (pathElement != null) {
                                                String pathInstance;
                                                pathInstance = pathElement.getTextContent();
                                                loadBalancerProbeInstance.setPath(pathInstance);
                                            }
                                           
                                            Element portElement2 = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "Port");
                                            if (portElement2 != null) {
                                                int portInstance2;
                                                portInstance2 = DatatypeConverter.parseInt(portElement2.getTextContent());
                                                loadBalancerProbeInstance.setPort(portInstance2);
                                            }
                                           
                                            Element protocolElement2 = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "Protocol");
                                            if (protocolElement2 != null) {
                                                LoadBalancerProbeTransportProtocol protocolInstance2;
                                                protocolInstance2 = com.microsoft.windowsazure.management.compute.ComputeManagementClientImpl.parseLoadBalancerProbeTransportProtocol(protocolElement2.getTextContent());
                                                loadBalancerProbeInstance.setProtocol(protocolInstance2);
                                            }
                                           
                                            Element intervalInSecondsElement = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "IntervalInSeconds");
                                            if (intervalInSecondsElement != null && (intervalInSecondsElement.getTextContent() == null || intervalInSecondsElement.getTextContent().isEmpty() == true) == false) {
                                                int intervalInSecondsInstance;
                                                intervalInSecondsInstance = DatatypeConverter.parseInt(intervalInSecondsElement.getTextContent());
                                                loadBalancerProbeInstance.setIntervalInSeconds(intervalInSecondsInstance);
                                            }
                                           
                                            Element timeoutInSecondsElement = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "TimeoutInSeconds");
                                            if (timeoutInSecondsElement != null && (timeoutInSecondsElement.getTextContent() == null || timeoutInSecondsElement.getTextContent().isEmpty() == true) == false) {
                                                int timeoutInSecondsInstance;
                                                timeoutInSecondsInstance = DatatypeConverter.parseInt(timeoutInSecondsElement.getTextContent());
                                                loadBalancerProbeInstance.setTimeoutInSeconds(timeoutInSecondsInstance);
                                            }
                                        }
                                       
                                        Element protocolElement3 = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "Protocol");
                                        if (protocolElement3 != null) {
                                            String protocolInstance3;
                                            protocolInstance3 = protocolElement3.getTextContent();
                                            inputEndpointInstance.setProtocol(protocolInstance3);
                                        }
                                       
                                        Element vipElement2 = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "Vip");
                                        if (vipElement2 != null) {
                                            InetAddress vipInstance2;
                                            vipInstance2 = InetAddress.getByName(vipElement2.getTextContent());
                                            inputEndpointInstance.setVirtualIPAddress(vipInstance2);
                                        }
                                       
                                        Element enableDirectServerReturnElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "EnableDirectServerReturn");
                                        if (enableDirectServerReturnElement != null && (enableDirectServerReturnElement.getTextContent() == null || enableDirectServerReturnElement.getTextContent().isEmpty() == true) == false) {
                                            boolean enableDirectServerReturnInstance;
                                            enableDirectServerReturnInstance = DatatypeConverter.parseBoolean(enableDirectServerReturnElement.getTextContent().toLowerCase());
                                            inputEndpointInstance.setEnableDirectServerReturn(enableDirectServerReturnInstance);
                                        }
                                       
                                        Element loadBalancerNameElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "LoadBalancerName");
                                        if (loadBalancerNameElement != null) {
                                            String loadBalancerNameInstance;
                                            loadBalancerNameInstance = loadBalancerNameElement.getTextContent();
                                            inputEndpointInstance.setLoadBalancerName(loadBalancerNameInstance);
                                        }
                                       
                                        Element endpointAclElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "EndpointAcl");
                                        if (endpointAclElement != null) {
                                            EndpointAcl endpointAclInstance = new EndpointAcl();
                                            inputEndpointInstance.setEndpointAcl(endpointAclInstance);
                                           
                                            Element rulesSequenceElement = XmlUtility.getElementByTagNameNS(endpointAclElement, "http://schemas.microsoft.com/windowsazure", "Rules");
                                            if (rulesSequenceElement != null) {
                                                for (int i13 = 0; i13 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(rulesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Rule").size(); i13 = i13 + 1) {
                                                    org.w3c.dom.Element rulesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(rulesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Rule").get(i13));
                                                    AccessControlListRule ruleInstance = new AccessControlListRule();
                                                    endpointAclInstance.getRules().add(ruleInstance);
                                                   
                                                    Element orderElement = XmlUtility.getElementByTagNameNS(rulesElement, "http://schemas.microsoft.com/windowsazure", "Order");
                                                    if (orderElement != null && (orderElement.getTextContent() == null || orderElement.getTextContent().isEmpty() == true) == false) {
                                                        int orderInstance;
                                                        orderInstance = DatatypeConverter.parseInt(orderElement.getTextContent());
                                                        ruleInstance.setOrder(orderInstance);
                                                    }
                                                   
                                                    Element actionElement = XmlUtility.getElementByTagNameNS(rulesElement, "http://schemas.microsoft.com/windowsazure", "Action");
                                                    if (actionElement != null) {
                                                        String actionInstance;
                                                        actionInstance = actionElement.getTextContent();
                                                        ruleInstance.setAction(actionInstance);
                                                    }
                                                   
                                                    Element remoteSubnetElement = XmlUtility.getElementByTagNameNS(rulesElement, "http://schemas.microsoft.com/windowsazure", "RemoteSubnet");
                                                    if (remoteSubnetElement != null) {
                                                        String remoteSubnetInstance;
                                                        remoteSubnetInstance = remoteSubnetElement.getTextContent();
                                                        ruleInstance.setRemoteSubnet(remoteSubnetInstance);
                                                    }
                                                   
                                                    Element descriptionElement = XmlUtility.getElementByTagNameNS(rulesElement, "http://schemas.microsoft.com/windowsazure", "Description");
                                                    if (descriptionElement != null) {
                                                        String descriptionInstance;
                                                        descriptionInstance = descriptionElement.getTextContent();
                                                        ruleInstance.setDescription(descriptionInstance);
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                               
                                Element subnetNamesSequenceElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "SubnetNames");
                                if (subnetNamesSequenceElement != null) {
                                    for (int i14 = 0; i14 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(subnetNamesSequenceElement, "http://schemas.microsoft.com/windowsazure", "SubnetName").size(); i14 = i14 + 1) {
                                        org.w3c.dom.Element subnetNamesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(subnetNamesSequenceElement, "http://schemas.microsoft.com/windowsazure", "SubnetName").get(i14));
                                        configurationSetInstance.getSubnetNames().add(subnetNamesElement.getTextContent());
                                    }
                                }
                               
                                Element staticVirtualNetworkIPAddressElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "StaticVirtualNetworkIPAddress");
                                if (staticVirtualNetworkIPAddressElement != null) {
                                    String staticVirtualNetworkIPAddressInstance;
                                    staticVirtualNetworkIPAddressInstance = staticVirtualNetworkIPAddressElement.getTextContent();
                                    configurationSetInstance.setStaticVirtualNetworkIPAddress(staticVirtualNetworkIPAddressInstance);
                                }
                               
                                Element publicIPsSequenceElement2 = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "PublicIPs");
                                if (publicIPsSequenceElement2 != null) {
                                    for (int i15 = 0; i15 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(publicIPsSequenceElement2, "http://schemas.microsoft.com/windowsazure", "PublicIP").size(); i15 = i15 + 1) {
                                        org.w3c.dom.Element publicIPsElement2 = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(publicIPsSequenceElement2, "http://schemas.microsoft.com/windowsazure", "PublicIP").get(i15));
                                        ConfigurationSet.PublicIP publicIPInstance2 = new ConfigurationSet.PublicIP();
                                        configurationSetInstance.getPublicIPs().add(publicIPInstance2);
                                       
                                        Element nameElement7 = XmlUtility.getElementByTagNameNS(publicIPsElement2, "http://schemas.microsoft.com/windowsazure", "Name");
                                        if (nameElement7 != null) {
                                            String nameInstance7;
                                            nameInstance7 = nameElement7.getTextContent();
                                            publicIPInstance2.setName(nameInstance7);
                                        }
                                    }
                                }
                               
                                Element computerNameElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "ComputerName");
                                if (computerNameElement != null) {
                                    String computerNameInstance;
                                    computerNameInstance = computerNameElement.getTextContent();
                                    configurationSetInstance.setComputerName(computerNameInstance);
                                }
                               
                                Element adminPasswordElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "AdminPassword");
                                if (adminPasswordElement != null) {
                                    String adminPasswordInstance;
                                    adminPasswordInstance = adminPasswordElement.getTextContent();
                                    configurationSetInstance.setAdminPassword(adminPasswordInstance);
                                }
                               
                                Element resetPasswordOnFirstLogonElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "ResetPasswordOnFirstLogon");
                                if (resetPasswordOnFirstLogonElement != null && (resetPasswordOnFirstLogonElement.getTextContent() == null || resetPasswordOnFirstLogonElement.getTextContent().isEmpty() == true) == false) {
                                    boolean resetPasswordOnFirstLogonInstance;
                                    resetPasswordOnFirstLogonInstance = DatatypeConverter.parseBoolean(resetPasswordOnFirstLogonElement.getTextContent().toLowerCase());
                                    configurationSetInstance.setResetPasswordOnFirstLogon(resetPasswordOnFirstLogonInstance);
                                }
                               
                                Element enableAutomaticUpdatesElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "EnableAutomaticUpdates");
                                if (enableAutomaticUpdatesElement != null && (enableAutomaticUpdatesElement.getTextContent() == null || enableAutomaticUpdatesElement.getTextContent().isEmpty() == true) == false) {
                                    boolean enableAutomaticUpdatesInstance;
                                    enableAutomaticUpdatesInstance = DatatypeConverter.parseBoolean(enableAutomaticUpdatesElement.getTextContent().toLowerCase());
                                    configurationSetInstance.setEnableAutomaticUpdates(enableAutomaticUpdatesInstance);
                                }
                               
                                Element timeZoneElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "TimeZone");
                                if (timeZoneElement != null) {
                                    String timeZoneInstance;
                                    timeZoneInstance = timeZoneElement.getTextContent();
                                    configurationSetInstance.setTimeZone(timeZoneInstance);
                                }
                               
                                Element domainJoinElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "DomainJoin");
                                if (domainJoinElement != null) {
                                    DomainJoinSettings domainJoinInstance = new DomainJoinSettings();
                                    configurationSetInstance.setDomainJoin(domainJoinInstance);
                                   
                                    Element credentialsElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "Credentials");
                                    if (credentialsElement != null) {
                                        DomainJoinCredentials credentialsInstance = new DomainJoinCredentials();
                                        domainJoinInstance.setCredentials(credentialsInstance);
                                       
                                        Element domainElement = XmlUtility.getElementByTagNameNS(credentialsElement, "http://schemas.microsoft.com/windowsazure", "Domain");
                                        if (domainElement != null) {
                                            String domainInstance;
                                            domainInstance = domainElement.getTextContent();
                                            credentialsInstance.setDomain(domainInstance);
                                        }
                                       
                                        Element usernameElement = XmlUtility.getElementByTagNameNS(credentialsElement, "http://schemas.microsoft.com/windowsazure", "Username");
                                        if (usernameElement != null) {
                                            String usernameInstance;
                                            usernameInstance = usernameElement.getTextContent();
                                            credentialsInstance.setUserName(usernameInstance);
                                        }
                                       
                                        Element passwordElement = XmlUtility.getElementByTagNameNS(credentialsElement, "http://schemas.microsoft.com/windowsazure", "Password");
                                        if (passwordElement != null) {
                                            String passwordInstance;
                                            passwordInstance = passwordElement.getTextContent();
                                            credentialsInstance.setPassword(passwordInstance);
                                        }
                                    }
                                   
                                    Element joinDomainElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "JoinDomain");
                                    if (joinDomainElement != null) {
                                        String joinDomainInstance;
                                        joinDomainInstance = joinDomainElement.getTextContent();
                                        domainJoinInstance.setDomainToJoin(joinDomainInstance);
                                    }
                                   
                                    Element machineObjectOUElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "MachineObjectOU");
                                    if (machineObjectOUElement != null) {
                                        String machineObjectOUInstance;
                                        machineObjectOUInstance = machineObjectOUElement.getTextContent();
                                        domainJoinInstance.setLdapMachineObjectOU(machineObjectOUInstance);
                                    }
                                   
                                    Element provisioningElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "Provisioning");
                                    if (provisioningElement != null) {
                                        DomainJoinProvisioning provisioningInstance = new DomainJoinProvisioning();
                                        domainJoinInstance.setProvisioning(provisioningInstance);
                                       
                                        Element accountDataElement = XmlUtility.getElementByTagNameNS(provisioningElement, "http://schemas.microsoft.com/windowsazure", "AccountData");
                                        if (accountDataElement != null) {
                                            String accountDataInstance;
                                            accountDataInstance = accountDataElement.getTextContent();
                                            provisioningInstance.setAccountData(accountDataInstance);
                                        }
                                    }
                                }
                               
                                Element storedCertificateSettingsSequenceElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "StoredCertificateSettings");
                                if (storedCertificateSettingsSequenceElement != null) {
                                    for (int i16 = 0; i16 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(storedCertificateSettingsSequenceElement, "http://schemas.microsoft.com/windowsazure", "CertificateSetting").size(); i16 = i16 + 1) {
                                        org.w3c.dom.Element storedCertificateSettingsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(storedCertificateSettingsSequenceElement, "http://schemas.microsoft.com/windowsazure", "CertificateSetting").get(i16));
                                        StoredCertificateSettings certificateSettingInstance = new StoredCertificateSettings();
                                        configurationSetInstance.getStoredCertificateSettings().add(certificateSettingInstance);
                                       
                                        Element storeLocationElement = XmlUtility.getElementByTagNameNS(storedCertificateSettingsElement, "http://schemas.microsoft.com/windowsazure", "StoreLocation");
                                        if (storeLocationElement != null) {
                                        }
                                       
                                        Element storeNameElement = XmlUtility.getElementByTagNameNS(storedCertificateSettingsElement, "http://schemas.microsoft.com/windowsazure", "StoreName");
                                        if (storeNameElement != null) {
                                            String storeNameInstance;
                                            storeNameInstance = storeNameElement.getTextContent();
                                            certificateSettingInstance.setStoreName(storeNameInstance);
                                        }
                                       
                                        Element thumbprintElement = XmlUtility.getElementByTagNameNS(storedCertificateSettingsElement, "http://schemas.microsoft.com/windowsazure", "Thumbprint");
                                        if (thumbprintElement != null) {
                                            String thumbprintInstance;
                                            thumbprintInstance = thumbprintElement.getTextContent();
                                            certificateSettingInstance.setThumbprint(thumbprintInstance);
                                        }
                                    }
                                }
                               
                                Element winRMElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "WinRM");
                                if (winRMElement != null) {
                                    WindowsRemoteManagementSettings winRMInstance = new WindowsRemoteManagementSettings();
                                    configurationSetInstance.setWindowsRemoteManagement(winRMInstance);
                                   
                                    Element listenersSequenceElement = XmlUtility.getElementByTagNameNS(winRMElement, "http://schemas.microsoft.com/windowsazure", "Listeners");
                                    if (listenersSequenceElement != null) {
                                        for (int i17 = 0; i17 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(listenersSequenceElement, "http://schemas.microsoft.com/windowsazure", "Listener").size(); i17 = i17 + 1) {
                                            org.w3c.dom.Element listenersElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(listenersSequenceElement, "http://schemas.microsoft.com/windowsazure", "Listener").get(i17));
                                            WindowsRemoteManagementListener listenerInstance = new WindowsRemoteManagementListener();
                                            winRMInstance.getListeners().add(listenerInstance);
                                           
                                            Element protocolElement4 = XmlUtility.getElementByTagNameNS(listenersElement, "http://schemas.microsoft.com/windowsazure", "Protocol");
                                            if (protocolElement4 != null) {
                                                VirtualMachineWindowsRemoteManagementListenerType protocolInstance4;
                                                protocolInstance4 = VirtualMachineWindowsRemoteManagementListenerType.valueOf(protocolElement4.getTextContent());
                                                listenerInstance.setListenerType(protocolInstance4);
                                            }
                                           
                                            Element certificateThumbprintElement = XmlUtility.getElementByTagNameNS(listenersElement, "http://schemas.microsoft.com/windowsazure", "CertificateThumbprint");
                                            if (certificateThumbprintElement != null) {
                                                String certificateThumbprintInstance;
                                                certificateThumbprintInstance = certificateThumbprintElement.getTextContent();
                                                listenerInstance.setCertificateThumbprint(certificateThumbprintInstance);
                                            }
                                        }
                                    }
                                }
                               
                                Element adminUsernameElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "AdminUsername");
                                if (adminUsernameElement != null) {
                                    String adminUsernameInstance;
                                    adminUsernameInstance = adminUsernameElement.getTextContent();
                                    configurationSetInstance.setAdminUserName(adminUsernameInstance);
                                }
                               
                                Element hostNameElement2 = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "HostName");
                                if (hostNameElement2 != null) {
                                    String hostNameInstance2;
                                    hostNameInstance2 = hostNameElement2.getTextContent();
                                    configurationSetInstance.setHostName(hostNameInstance2);
                                }
                               
                                Element userNameElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "UserName");
                                if (userNameElement != null) {
                                    String userNameInstance;
                                    userNameInstance = userNameElement.getTextContent();
                                    configurationSetInstance.setUserName(userNameInstance);
                                }
                               
                                Element userPasswordElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "UserPassword");
                                if (userPasswordElement != null) {
                                    String userPasswordInstance;
                                    userPasswordInstance = userPasswordElement.getTextContent();
                                    configurationSetInstance.setUserPassword(userPasswordInstance);
                                }
                               
                                Element disableSshPasswordAuthenticationElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "DisableSshPasswordAuthentication");
                                if (disableSshPasswordAuthenticationElement != null && (disableSshPasswordAuthenticationElement.getTextContent() == null || disableSshPasswordAuthenticationElement.getTextContent().isEmpty() == true) == false) {
                                    boolean disableSshPasswordAuthenticationInstance;
                                    disableSshPasswordAuthenticationInstance = DatatypeConverter.parseBoolean(disableSshPasswordAuthenticationElement.getTextContent().toLowerCase());
                                    configurationSetInstance.setDisableSshPasswordAuthentication(disableSshPasswordAuthenticationInstance);
                                }
                               
                                Element sSHElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "SSH");
                                if (sSHElement != null) {
                                    SshSettings sSHInstance = new SshSettings();
                                    configurationSetInstance.setSshSettings(sSHInstance);
                                   
                                    Element publicKeysSequenceElement = XmlUtility.getElementByTagNameNS(sSHElement, "http://schemas.microsoft.com/windowsazure", "PublicKeys");
                                    if (publicKeysSequenceElement != null) {
                                        for (int i18 = 0; i18 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(publicKeysSequenceElement, "http://schemas.microsoft.com/windowsazure", "PublicKey").size(); i18 = i18 + 1) {
                                            org.w3c.dom.Element publicKeysElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(publicKeysSequenceElement, "http://schemas.microsoft.com/windowsazure", "PublicKey").get(i18));
                                            SshSettingPublicKey publicKeyInstance = new SshSettingPublicKey();
                                            sSHInstance.getPublicKeys().add(publicKeyInstance);
                                           
                                            Element fingerprintElement = XmlUtility.getElementByTagNameNS(publicKeysElement, "http://schemas.microsoft.com/windowsazure", "Fingerprint");
                                            if (fingerprintElement != null) {
                                                String fingerprintInstance;
                                                fingerprintInstance = fingerprintElement.getTextContent();
                                                publicKeyInstance.setFingerprint(fingerprintInstance);
                                            }
                                           
                                            Element pathElement2 = XmlUtility.getElementByTagNameNS(publicKeysElement, "http://schemas.microsoft.com/windowsazure", "Path");
                                            if (pathElement2 != null) {
                                                String pathInstance2;
                                                pathInstance2 = pathElement2.getTextContent();
                                                publicKeyInstance.setPath(pathInstance2);
                                            }
                                        }
                                    }
                                   
                                    Element keyPairsSequenceElement = XmlUtility.getElementByTagNameNS(sSHElement, "http://schemas.microsoft.com/windowsazure", "KeyPairs");
                                    if (keyPairsSequenceElement != null) {
                                        for (int i19 = 0; i19 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").size(); i19 = i19 + 1) {
                                            org.w3c.dom.Element keyPairsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").get(i19));
                                            SshSettingKeyPair keyPairInstance = new SshSettingKeyPair();
                                            sSHInstance.getKeyPairs().add(keyPairInstance);
                                           
                                            Element fingerprintElement2 = XmlUtility.getElementByTagNameNS(keyPairsElement, "http://schemas.microsoft.com/windowsazure", "Fingerprint");
                                            if (fingerprintElement2 != null) {
                                                String fingerprintInstance2;
                                                fingerprintInstance2 = fingerprintElement2.getTextContent();
                                                keyPairInstance.setFingerprint(fingerprintInstance2);
                                            }
                                           
                                            Element pathElement3 = XmlUtility.getElementByTagNameNS(keyPairsElement, "http://schemas.microsoft.com/windowsazure", "Path");
                                            if (pathElement3 != null) {
                                                String pathInstance3;
                                                pathInstance3 = pathElement3.getTextContent();
                                                keyPairInstance.setPath(pathInstance3);
                                            }
                                        }
                                    }
                                }
                               
                                Element customDataElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "CustomData");
                                if (customDataElement != null) {
                                    String customDataInstance;
                                    customDataInstance = customDataElement.getTextContent();
                                    configurationSetInstance.setCustomData(customDataInstance);
                                }
                            }
                        }
                       
                        Element resourceExtensionReferencesSequenceElement = XmlUtility.getElementByTagNameNS(roleListElement, "http://schemas.microsoft.com/windowsazure", "ResourceExtensionReferences");
View Full Code Here

                               
                                Element configurationSetsSequenceElement = XmlUtility.getElementByTagNameNS(roleListElement, "http://schemas.microsoft.com/windowsazure", "ConfigurationSets");
                                if (configurationSetsSequenceElement != null) {
                                    for (int i12 = 0; i12 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(configurationSetsSequenceElement, "http://schemas.microsoft.com/windowsazure", "ConfigurationSet").size(); i12 = i12 + 1) {
                                        org.w3c.dom.Element configurationSetsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(configurationSetsSequenceElement, "http://schemas.microsoft.com/windowsazure", "ConfigurationSet").get(i12));
                                        ConfigurationSet configurationSetInstance = new ConfigurationSet();
                                        roleInstance.getConfigurationSets().add(configurationSetInstance);
                                       
                                        Element configurationSetTypeElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "ConfigurationSetType");
                                        if (configurationSetTypeElement != null) {
                                            String configurationSetTypeInstance;
                                            configurationSetTypeInstance = configurationSetTypeElement.getTextContent();
                                            configurationSetInstance.setConfigurationSetType(configurationSetTypeInstance);
                                        }
                                       
                                        Element inputEndpointsSequenceElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "InputEndpoints");
                                        if (inputEndpointsSequenceElement != null) {
                                            for (int i13 = 0; i13 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(inputEndpointsSequenceElement, "http://schemas.microsoft.com/windowsazure", "InputEndpoint").size(); i13 = i13 + 1) {
                                                org.w3c.dom.Element inputEndpointsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(inputEndpointsSequenceElement, "http://schemas.microsoft.com/windowsazure", "InputEndpoint").get(i13));
                                                InputEndpoint inputEndpointInstance = new InputEndpoint();
                                                configurationSetInstance.getInputEndpoints().add(inputEndpointInstance);
                                               
                                                Element loadBalancedEndpointSetNameElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "LoadBalancedEndpointSetName");
                                                if (loadBalancedEndpointSetNameElement != null) {
                                                    String loadBalancedEndpointSetNameInstance;
                                                    loadBalancedEndpointSetNameInstance = loadBalancedEndpointSetNameElement.getTextContent();
                                                    inputEndpointInstance.setLoadBalancedEndpointSetName(loadBalancedEndpointSetNameInstance);
                                                }
                                               
                                                Element localPortElement2 = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "LocalPort");
                                                if (localPortElement2 != null && (localPortElement2.getTextContent() == null || localPortElement2.getTextContent().isEmpty() == true) == false) {
                                                    int localPortInstance2;
                                                    localPortInstance2 = DatatypeConverter.parseInt(localPortElement2.getTextContent());
                                                    inputEndpointInstance.setLocalPort(localPortInstance2);
                                                }
                                               
                                                Element nameElement6 = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "Name");
                                                if (nameElement6 != null) {
                                                    String nameInstance6;
                                                    nameInstance6 = nameElement6.getTextContent();
                                                    inputEndpointInstance.setName(nameInstance6);
                                                }
                                               
                                                Element portElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "Port");
                                                if (portElement != null && (portElement.getTextContent() == null || portElement.getTextContent().isEmpty() == true) == false) {
                                                    int portInstance;
                                                    portInstance = DatatypeConverter.parseInt(portElement.getTextContent());
                                                    inputEndpointInstance.setPort(portInstance);
                                                }
                                               
                                                Element loadBalancerProbeElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "LoadBalancerProbe");
                                                if (loadBalancerProbeElement != null) {
                                                    LoadBalancerProbe loadBalancerProbeInstance = new LoadBalancerProbe();
                                                    inputEndpointInstance.setLoadBalancerProbe(loadBalancerProbeInstance);
                                                   
                                                    Element pathElement = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "Path");
                                                    if (pathElement != null) {
                                                        String pathInstance;
                                                        pathInstance = pathElement.getTextContent();
                                                        loadBalancerProbeInstance.setPath(pathInstance);
                                                    }
                                                   
                                                    Element portElement2 = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "Port");
                                                    if (portElement2 != null) {
                                                        int portInstance2;
                                                        portInstance2 = DatatypeConverter.parseInt(portElement2.getTextContent());
                                                        loadBalancerProbeInstance.setPort(portInstance2);
                                                    }
                                                   
                                                    Element protocolElement2 = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "Protocol");
                                                    if (protocolElement2 != null) {
                                                        LoadBalancerProbeTransportProtocol protocolInstance2;
                                                        protocolInstance2 = com.microsoft.windowsazure.management.compute.ComputeManagementClientImpl.parseLoadBalancerProbeTransportProtocol(protocolElement2.getTextContent());
                                                        loadBalancerProbeInstance.setProtocol(protocolInstance2);
                                                    }
                                                   
                                                    Element intervalInSecondsElement = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "IntervalInSeconds");
                                                    if (intervalInSecondsElement != null && (intervalInSecondsElement.getTextContent() == null || intervalInSecondsElement.getTextContent().isEmpty() == true) == false) {
                                                        int intervalInSecondsInstance;
                                                        intervalInSecondsInstance = DatatypeConverter.parseInt(intervalInSecondsElement.getTextContent());
                                                        loadBalancerProbeInstance.setIntervalInSeconds(intervalInSecondsInstance);
                                                    }
                                                   
                                                    Element timeoutInSecondsElement = XmlUtility.getElementByTagNameNS(loadBalancerProbeElement, "http://schemas.microsoft.com/windowsazure", "TimeoutInSeconds");
                                                    if (timeoutInSecondsElement != null && (timeoutInSecondsElement.getTextContent() == null || timeoutInSecondsElement.getTextContent().isEmpty() == true) == false) {
                                                        int timeoutInSecondsInstance;
                                                        timeoutInSecondsInstance = DatatypeConverter.parseInt(timeoutInSecondsElement.getTextContent());
                                                        loadBalancerProbeInstance.setTimeoutInSeconds(timeoutInSecondsInstance);
                                                    }
                                                }
                                               
                                                Element protocolElement3 = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "Protocol");
                                                if (protocolElement3 != null) {
                                                    String protocolInstance3;
                                                    protocolInstance3 = protocolElement3.getTextContent();
                                                    inputEndpointInstance.setProtocol(protocolInstance3);
                                                }
                                               
                                                Element vipElement2 = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "Vip");
                                                if (vipElement2 != null) {
                                                    InetAddress vipInstance2;
                                                    vipInstance2 = InetAddress.getByName(vipElement2.getTextContent());
                                                    inputEndpointInstance.setVirtualIPAddress(vipInstance2);
                                                }
                                               
                                                Element enableDirectServerReturnElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "EnableDirectServerReturn");
                                                if (enableDirectServerReturnElement != null && (enableDirectServerReturnElement.getTextContent() == null || enableDirectServerReturnElement.getTextContent().isEmpty() == true) == false) {
                                                    boolean enableDirectServerReturnInstance;
                                                    enableDirectServerReturnInstance = DatatypeConverter.parseBoolean(enableDirectServerReturnElement.getTextContent().toLowerCase());
                                                    inputEndpointInstance.setEnableDirectServerReturn(enableDirectServerReturnInstance);
                                                }
                                               
                                                Element loadBalancerNameElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "LoadBalancerName");
                                                if (loadBalancerNameElement != null) {
                                                    String loadBalancerNameInstance;
                                                    loadBalancerNameInstance = loadBalancerNameElement.getTextContent();
                                                    inputEndpointInstance.setLoadBalancerName(loadBalancerNameInstance);
                                                }
                                               
                                                Element endpointAclElement = XmlUtility.getElementByTagNameNS(inputEndpointsElement, "http://schemas.microsoft.com/windowsazure", "EndpointAcl");
                                                if (endpointAclElement != null) {
                                                    EndpointAcl endpointAclInstance = new EndpointAcl();
                                                    inputEndpointInstance.setEndpointAcl(endpointAclInstance);
                                                   
                                                    Element rulesSequenceElement = XmlUtility.getElementByTagNameNS(endpointAclElement, "http://schemas.microsoft.com/windowsazure", "Rules");
                                                    if (rulesSequenceElement != null) {
                                                        for (int i14 = 0; i14 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(rulesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Rule").size(); i14 = i14 + 1) {
                                                            org.w3c.dom.Element rulesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(rulesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Rule").get(i14));
                                                            AccessControlListRule ruleInstance = new AccessControlListRule();
                                                            endpointAclInstance.getRules().add(ruleInstance);
                                                           
                                                            Element orderElement = XmlUtility.getElementByTagNameNS(rulesElement, "http://schemas.microsoft.com/windowsazure", "Order");
                                                            if (orderElement != null && (orderElement.getTextContent() == null || orderElement.getTextContent().isEmpty() == true) == false) {
                                                                int orderInstance;
                                                                orderInstance = DatatypeConverter.parseInt(orderElement.getTextContent());
                                                                ruleInstance.setOrder(orderInstance);
                                                            }
                                                           
                                                            Element actionElement = XmlUtility.getElementByTagNameNS(rulesElement, "http://schemas.microsoft.com/windowsazure", "Action");
                                                            if (actionElement != null) {
                                                                String actionInstance;
                                                                actionInstance = actionElement.getTextContent();
                                                                ruleInstance.setAction(actionInstance);
                                                            }
                                                           
                                                            Element remoteSubnetElement = XmlUtility.getElementByTagNameNS(rulesElement, "http://schemas.microsoft.com/windowsazure", "RemoteSubnet");
                                                            if (remoteSubnetElement != null) {
                                                                String remoteSubnetInstance;
                                                                remoteSubnetInstance = remoteSubnetElement.getTextContent();
                                                                ruleInstance.setRemoteSubnet(remoteSubnetInstance);
                                                            }
                                                           
                                                            Element descriptionElement = XmlUtility.getElementByTagNameNS(rulesElement, "http://schemas.microsoft.com/windowsazure", "Description");
                                                            if (descriptionElement != null) {
                                                                String descriptionInstance;
                                                                descriptionInstance = descriptionElement.getTextContent();
                                                                ruleInstance.setDescription(descriptionInstance);
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                       
                                        Element subnetNamesSequenceElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "SubnetNames");
                                        if (subnetNamesSequenceElement != null) {
                                            for (int i15 = 0; i15 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(subnetNamesSequenceElement, "http://schemas.microsoft.com/windowsazure", "SubnetName").size(); i15 = i15 + 1) {
                                                org.w3c.dom.Element subnetNamesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(subnetNamesSequenceElement, "http://schemas.microsoft.com/windowsazure", "SubnetName").get(i15));
                                                configurationSetInstance.getSubnetNames().add(subnetNamesElement.getTextContent());
                                            }
                                        }
                                       
                                        Element staticVirtualNetworkIPAddressElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "StaticVirtualNetworkIPAddress");
                                        if (staticVirtualNetworkIPAddressElement != null) {
                                            String staticVirtualNetworkIPAddressInstance;
                                            staticVirtualNetworkIPAddressInstance = staticVirtualNetworkIPAddressElement.getTextContent();
                                            configurationSetInstance.setStaticVirtualNetworkIPAddress(staticVirtualNetworkIPAddressInstance);
                                        }
                                       
                                        Element publicIPsSequenceElement2 = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "PublicIPs");
                                        if (publicIPsSequenceElement2 != null) {
                                            for (int i16 = 0; i16 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(publicIPsSequenceElement2, "http://schemas.microsoft.com/windowsazure", "PublicIP").size(); i16 = i16 + 1) {
                                                org.w3c.dom.Element publicIPsElement2 = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(publicIPsSequenceElement2, "http://schemas.microsoft.com/windowsazure", "PublicIP").get(i16));
                                                ConfigurationSet.PublicIP publicIPInstance2 = new ConfigurationSet.PublicIP();
                                                configurationSetInstance.getPublicIPs().add(publicIPInstance2);
                                               
                                                Element nameElement7 = XmlUtility.getElementByTagNameNS(publicIPsElement2, "http://schemas.microsoft.com/windowsazure", "Name");
                                                if (nameElement7 != null) {
                                                    String nameInstance7;
                                                    nameInstance7 = nameElement7.getTextContent();
                                                    publicIPInstance2.setName(nameInstance7);
                                                }
                                            }
                                        }
                                       
                                        Element computerNameElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "ComputerName");
                                        if (computerNameElement != null) {
                                            String computerNameInstance;
                                            computerNameInstance = computerNameElement.getTextContent();
                                            configurationSetInstance.setComputerName(computerNameInstance);
                                        }
                                       
                                        Element adminPasswordElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "AdminPassword");
                                        if (adminPasswordElement != null) {
                                            String adminPasswordInstance;
                                            adminPasswordInstance = adminPasswordElement.getTextContent();
                                            configurationSetInstance.setAdminPassword(adminPasswordInstance);
                                        }
                                       
                                        Element resetPasswordOnFirstLogonElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "ResetPasswordOnFirstLogon");
                                        if (resetPasswordOnFirstLogonElement != null && (resetPasswordOnFirstLogonElement.getTextContent() == null || resetPasswordOnFirstLogonElement.getTextContent().isEmpty() == true) == false) {
                                            boolean resetPasswordOnFirstLogonInstance;
                                            resetPasswordOnFirstLogonInstance = DatatypeConverter.parseBoolean(resetPasswordOnFirstLogonElement.getTextContent().toLowerCase());
                                            configurationSetInstance.setResetPasswordOnFirstLogon(resetPasswordOnFirstLogonInstance);
                                        }
                                       
                                        Element enableAutomaticUpdatesElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "EnableAutomaticUpdates");
                                        if (enableAutomaticUpdatesElement != null && (enableAutomaticUpdatesElement.getTextContent() == null || enableAutomaticUpdatesElement.getTextContent().isEmpty() == true) == false) {
                                            boolean enableAutomaticUpdatesInstance;
                                            enableAutomaticUpdatesInstance = DatatypeConverter.parseBoolean(enableAutomaticUpdatesElement.getTextContent().toLowerCase());
                                            configurationSetInstance.setEnableAutomaticUpdates(enableAutomaticUpdatesInstance);
                                        }
                                       
                                        Element timeZoneElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "TimeZone");
                                        if (timeZoneElement != null) {
                                            String timeZoneInstance;
                                            timeZoneInstance = timeZoneElement.getTextContent();
                                            configurationSetInstance.setTimeZone(timeZoneInstance);
                                        }
                                       
                                        Element domainJoinElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "DomainJoin");
                                        if (domainJoinElement != null) {
                                            DomainJoinSettings domainJoinInstance = new DomainJoinSettings();
                                            configurationSetInstance.setDomainJoin(domainJoinInstance);
                                           
                                            Element credentialsElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "Credentials");
                                            if (credentialsElement != null) {
                                                DomainJoinCredentials credentialsInstance = new DomainJoinCredentials();
                                                domainJoinInstance.setCredentials(credentialsInstance);
                                               
                                                Element domainElement = XmlUtility.getElementByTagNameNS(credentialsElement, "http://schemas.microsoft.com/windowsazure", "Domain");
                                                if (domainElement != null) {
                                                    String domainInstance;
                                                    domainInstance = domainElement.getTextContent();
                                                    credentialsInstance.setDomain(domainInstance);
                                                }
                                               
                                                Element usernameElement = XmlUtility.getElementByTagNameNS(credentialsElement, "http://schemas.microsoft.com/windowsazure", "Username");
                                                if (usernameElement != null) {
                                                    String usernameInstance;
                                                    usernameInstance = usernameElement.getTextContent();
                                                    credentialsInstance.setUserName(usernameInstance);
                                                }
                                               
                                                Element passwordElement = XmlUtility.getElementByTagNameNS(credentialsElement, "http://schemas.microsoft.com/windowsazure", "Password");
                                                if (passwordElement != null) {
                                                    String passwordInstance;
                                                    passwordInstance = passwordElement.getTextContent();
                                                    credentialsInstance.setPassword(passwordInstance);
                                                }
                                            }
                                           
                                            Element joinDomainElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "JoinDomain");
                                            if (joinDomainElement != null) {
                                                String joinDomainInstance;
                                                joinDomainInstance = joinDomainElement.getTextContent();
                                                domainJoinInstance.setDomainToJoin(joinDomainInstance);
                                            }
                                           
                                            Element machineObjectOUElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "MachineObjectOU");
                                            if (machineObjectOUElement != null) {
                                                String machineObjectOUInstance;
                                                machineObjectOUInstance = machineObjectOUElement.getTextContent();
                                                domainJoinInstance.setLdapMachineObjectOU(machineObjectOUInstance);
                                            }
                                           
                                            Element provisioningElement = XmlUtility.getElementByTagNameNS(domainJoinElement, "http://schemas.microsoft.com/windowsazure", "Provisioning");
                                            if (provisioningElement != null) {
                                                DomainJoinProvisioning provisioningInstance = new DomainJoinProvisioning();
                                                domainJoinInstance.setProvisioning(provisioningInstance);
                                               
                                                Element accountDataElement = XmlUtility.getElementByTagNameNS(provisioningElement, "http://schemas.microsoft.com/windowsazure", "AccountData");
                                                if (accountDataElement != null) {
                                                    String accountDataInstance;
                                                    accountDataInstance = accountDataElement.getTextContent();
                                                    provisioningInstance.setAccountData(accountDataInstance);
                                                }
                                            }
                                        }
                                       
                                        Element storedCertificateSettingsSequenceElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "StoredCertificateSettings");
                                        if (storedCertificateSettingsSequenceElement != null) {
                                            for (int i17 = 0; i17 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(storedCertificateSettingsSequenceElement, "http://schemas.microsoft.com/windowsazure", "CertificateSetting").size(); i17 = i17 + 1) {
                                                org.w3c.dom.Element storedCertificateSettingsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(storedCertificateSettingsSequenceElement, "http://schemas.microsoft.com/windowsazure", "CertificateSetting").get(i17));
                                                StoredCertificateSettings certificateSettingInstance = new StoredCertificateSettings();
                                                configurationSetInstance.getStoredCertificateSettings().add(certificateSettingInstance);
                                               
                                                Element storeLocationElement = XmlUtility.getElementByTagNameNS(storedCertificateSettingsElement, "http://schemas.microsoft.com/windowsazure", "StoreLocation");
                                                if (storeLocationElement != null) {
                                                }
                                               
                                                Element storeNameElement = XmlUtility.getElementByTagNameNS(storedCertificateSettingsElement, "http://schemas.microsoft.com/windowsazure", "StoreName");
                                                if (storeNameElement != null) {
                                                    String storeNameInstance;
                                                    storeNameInstance = storeNameElement.getTextContent();
                                                    certificateSettingInstance.setStoreName(storeNameInstance);
                                                }
                                               
                                                Element thumbprintElement = XmlUtility.getElementByTagNameNS(storedCertificateSettingsElement, "http://schemas.microsoft.com/windowsazure", "Thumbprint");
                                                if (thumbprintElement != null) {
                                                    String thumbprintInstance;
                                                    thumbprintInstance = thumbprintElement.getTextContent();
                                                    certificateSettingInstance.setThumbprint(thumbprintInstance);
                                                }
                                            }
                                        }
                                       
                                        Element winRMElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "WinRM");
                                        if (winRMElement != null) {
                                            WindowsRemoteManagementSettings winRMInstance = new WindowsRemoteManagementSettings();
                                            configurationSetInstance.setWindowsRemoteManagement(winRMInstance);
                                           
                                            Element listenersSequenceElement = XmlUtility.getElementByTagNameNS(winRMElement, "http://schemas.microsoft.com/windowsazure", "Listeners");
                                            if (listenersSequenceElement != null) {
                                                for (int i18 = 0; i18 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(listenersSequenceElement, "http://schemas.microsoft.com/windowsazure", "Listener").size(); i18 = i18 + 1) {
                                                    org.w3c.dom.Element listenersElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(listenersSequenceElement, "http://schemas.microsoft.com/windowsazure", "Listener").get(i18));
                                                    WindowsRemoteManagementListener listenerInstance = new WindowsRemoteManagementListener();
                                                    winRMInstance.getListeners().add(listenerInstance);
                                                   
                                                    Element protocolElement4 = XmlUtility.getElementByTagNameNS(listenersElement, "http://schemas.microsoft.com/windowsazure", "Protocol");
                                                    if (protocolElement4 != null) {
                                                        VirtualMachineWindowsRemoteManagementListenerType protocolInstance4;
                                                        protocolInstance4 = VirtualMachineWindowsRemoteManagementListenerType.valueOf(protocolElement4.getTextContent());
                                                        listenerInstance.setListenerType(protocolInstance4);
                                                    }
                                                   
                                                    Element certificateThumbprintElement = XmlUtility.getElementByTagNameNS(listenersElement, "http://schemas.microsoft.com/windowsazure", "CertificateThumbprint");
                                                    if (certificateThumbprintElement != null) {
                                                        String certificateThumbprintInstance;
                                                        certificateThumbprintInstance = certificateThumbprintElement.getTextContent();
                                                        listenerInstance.setCertificateThumbprint(certificateThumbprintInstance);
                                                    }
                                                }
                                            }
                                        }
                                       
                                        Element adminUsernameElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "AdminUsername");
                                        if (adminUsernameElement != null) {
                                            String adminUsernameInstance;
                                            adminUsernameInstance = adminUsernameElement.getTextContent();
                                            configurationSetInstance.setAdminUserName(adminUsernameInstance);
                                        }
                                       
                                        Element hostNameElement2 = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "HostName");
                                        if (hostNameElement2 != null) {
                                            String hostNameInstance2;
                                            hostNameInstance2 = hostNameElement2.getTextContent();
                                            configurationSetInstance.setHostName(hostNameInstance2);
                                        }
                                       
                                        Element userNameElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "UserName");
                                        if (userNameElement != null) {
                                            String userNameInstance;
                                            userNameInstance = userNameElement.getTextContent();
                                            configurationSetInstance.setUserName(userNameInstance);
                                        }
                                       
                                        Element userPasswordElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "UserPassword");
                                        if (userPasswordElement != null) {
                                            String userPasswordInstance;
                                            userPasswordInstance = userPasswordElement.getTextContent();
                                            configurationSetInstance.setUserPassword(userPasswordInstance);
                                        }
                                       
                                        Element disableSshPasswordAuthenticationElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "DisableSshPasswordAuthentication");
                                        if (disableSshPasswordAuthenticationElement != null && (disableSshPasswordAuthenticationElement.getTextContent() == null || disableSshPasswordAuthenticationElement.getTextContent().isEmpty() == true) == false) {
                                            boolean disableSshPasswordAuthenticationInstance;
                                            disableSshPasswordAuthenticationInstance = DatatypeConverter.parseBoolean(disableSshPasswordAuthenticationElement.getTextContent().toLowerCase());
                                            configurationSetInstance.setDisableSshPasswordAuthentication(disableSshPasswordAuthenticationInstance);
                                        }
                                       
                                        Element sSHElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "SSH");
                                        if (sSHElement != null) {
                                            SshSettings sSHInstance = new SshSettings();
                                            configurationSetInstance.setSshSettings(sSHInstance);
                                           
                                            Element publicKeysSequenceElement = XmlUtility.getElementByTagNameNS(sSHElement, "http://schemas.microsoft.com/windowsazure", "PublicKeys");
                                            if (publicKeysSequenceElement != null) {
                                                for (int i19 = 0; i19 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(publicKeysSequenceElement, "http://schemas.microsoft.com/windowsazure", "PublicKey").size(); i19 = i19 + 1) {
                                                    org.w3c.dom.Element publicKeysElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(publicKeysSequenceElement, "http://schemas.microsoft.com/windowsazure", "PublicKey").get(i19));
                                                    SshSettingPublicKey publicKeyInstance = new SshSettingPublicKey();
                                                    sSHInstance.getPublicKeys().add(publicKeyInstance);
                                                   
                                                    Element fingerprintElement = XmlUtility.getElementByTagNameNS(publicKeysElement, "http://schemas.microsoft.com/windowsazure", "Fingerprint");
                                                    if (fingerprintElement != null) {
                                                        String fingerprintInstance;
                                                        fingerprintInstance = fingerprintElement.getTextContent();
                                                        publicKeyInstance.setFingerprint(fingerprintInstance);
                                                    }
                                                   
                                                    Element pathElement2 = XmlUtility.getElementByTagNameNS(publicKeysElement, "http://schemas.microsoft.com/windowsazure", "Path");
                                                    if (pathElement2 != null) {
                                                        String pathInstance2;
                                                        pathInstance2 = pathElement2.getTextContent();
                                                        publicKeyInstance.setPath(pathInstance2);
                                                    }
                                                }
                                            }
                                           
                                            Element keyPairsSequenceElement = XmlUtility.getElementByTagNameNS(sSHElement, "http://schemas.microsoft.com/windowsazure", "KeyPairs");
                                            if (keyPairsSequenceElement != null) {
                                                for (int i20 = 0; i20 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").size(); i20 = i20 + 1) {
                                                    org.w3c.dom.Element keyPairsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").get(i20));
                                                    SshSettingKeyPair keyPairInstance = new SshSettingKeyPair();
                                                    sSHInstance.getKeyPairs().add(keyPairInstance);
                                                   
                                                    Element fingerprintElement2 = XmlUtility.getElementByTagNameNS(keyPairsElement, "http://schemas.microsoft.com/windowsazure", "Fingerprint");
                                                    if (fingerprintElement2 != null) {
                                                        String fingerprintInstance2;
                                                        fingerprintInstance2 = fingerprintElement2.getTextContent();
                                                        keyPairInstance.setFingerprint(fingerprintInstance2);
                                                    }
                                                   
                                                    Element pathElement3 = XmlUtility.getElementByTagNameNS(keyPairsElement, "http://schemas.microsoft.com/windowsazure", "Path");
                                                    if (pathElement3 != null) {
                                                        String pathInstance3;
                                                        pathInstance3 = pathElement3.getTextContent();
                                                        keyPairInstance.setPath(pathInstance3);
                                                    }
                                                }
                                            }
                                        }
                                       
                                        Element customDataElement = XmlUtility.getElementByTagNameNS(configurationSetsElement, "http://schemas.microsoft.com/windowsazure", "CustomData");
                                        if (customDataElement != null) {
                                            String customDataInstance;
                                            customDataInstance = customDataElement.getTextContent();
                                            configurationSetInstance.setCustomData(customDataInstance);
                                        }
                                    }
                                }
                               
                                Element resourceExtensionReferencesSequenceElement = XmlUtility.getElementByTagNameNS(roleListElement, "http://schemas.microsoft.com/windowsazure", "ResourceExtensionReferences");
View Full Code Here

TOP

Related Classes of com.microsoft.windowsazure.management.compute.models.ConfigurationSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.