Examples of StorageAccountProperties


Examples of com.microsoft.windowsazure.management.storage.models.StorageAccountProperties

                    storageServiceInstance.setName(serviceNameInstance);
                }
               
                Element storageServicePropertiesElement = XmlUtility.getElementByTagNameNS(storageServiceElement, "http://schemas.microsoft.com/windowsazure", "StorageServiceProperties");
                if (storageServicePropertiesElement != null) {
                    StorageAccountProperties storageServicePropertiesInstance = new StorageAccountProperties();
                    storageServiceInstance.setProperties(storageServicePropertiesInstance);
                   
                    Element descriptionElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "Description");
                    if (descriptionElement != null) {
                        boolean isNil = false;
                        Attr nilAttribute = descriptionElement.getAttributeNodeNS("http://www.w3.org/2001/XMLSchema-instance", "nil");
                        if (nilAttribute != null) {
                            isNil = "true".equals(nilAttribute.getValue());
                        }
                        if (isNil == false) {
                            String descriptionInstance;
                            descriptionInstance = descriptionElement.getTextContent();
                            storageServicePropertiesInstance.setDescription(descriptionInstance);
                        }
                    }
                   
                    Element affinityGroupElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "AffinityGroup");
                    if (affinityGroupElement != null) {
                        String affinityGroupInstance;
                        affinityGroupInstance = affinityGroupElement.getTextContent();
                        storageServicePropertiesInstance.setAffinityGroup(affinityGroupInstance);
                    }
                   
                    Element locationElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "Location");
                    if (locationElement != null) {
                        String locationInstance;
                        locationInstance = locationElement.getTextContent();
                        storageServicePropertiesInstance.setLocation(locationInstance);
                    }
                   
                    Element labelElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "Label");
                    if (labelElement != null) {
                        String labelInstance;
                        labelInstance = labelElement.getTextContent() != null ? new String(Base64.decode(labelElement.getTextContent())) : null;
                        storageServicePropertiesInstance.setLabel(labelInstance);
                    }
                   
                    Element statusElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "Status");
                    if (statusElement != null) {
                        StorageAccountStatus statusInstance;
                        statusInstance = StorageAccountStatus.valueOf(statusElement.getTextContent());
                        storageServicePropertiesInstance.setStatus(statusInstance);
                    }
                   
                    Element endpointsSequenceElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "Endpoints");
                    if (endpointsSequenceElement != null) {
                        for (int i1 = 0; i1 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(endpointsSequenceElement, "http://schemas.microsoft.com/windowsazure", "Endpoint").size(); i1 = i1 + 1) {
                            org.w3c.dom.Element endpointsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(endpointsSequenceElement, "http://schemas.microsoft.com/windowsazure", "Endpoint").get(i1));
                            storageServicePropertiesInstance.getEndpoints().add(new URI(endpointsElement.getTextContent()));
                        }
                    }
                   
                    Element geoReplicationEnabledElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "GeoReplicationEnabled");
                    if (geoReplicationEnabledElement != null) {
                        boolean geoReplicationEnabledInstance;
                        geoReplicationEnabledInstance = DatatypeConverter.parseBoolean(geoReplicationEnabledElement.getTextContent().toLowerCase());
                        storageServicePropertiesInstance.setGeoReplicationEnabled(geoReplicationEnabledInstance);
                    }
                   
                    Element geoPrimaryRegionElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "GeoPrimaryRegion");
                    if (geoPrimaryRegionElement != null) {
                        String geoPrimaryRegionInstance;
                        geoPrimaryRegionInstance = geoPrimaryRegionElement.getTextContent();
                        storageServicePropertiesInstance.setGeoPrimaryRegion(geoPrimaryRegionInstance);
                    }
                   
                    Element statusOfPrimaryElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "StatusOfPrimary");
                    if (statusOfPrimaryElement != null && (statusOfPrimaryElement.getTextContent() == null || statusOfPrimaryElement.getTextContent().isEmpty() == true) == false) {
                        GeoRegionStatus statusOfPrimaryInstance;
                        statusOfPrimaryInstance = GeoRegionStatus.valueOf(statusOfPrimaryElement.getTextContent());
                        storageServicePropertiesInstance.setStatusOfGeoPrimaryRegion(statusOfPrimaryInstance);
                    }
                   
                    Element lastGeoFailoverTimeElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "LastGeoFailoverTime");
                    if (lastGeoFailoverTimeElement != null && (lastGeoFailoverTimeElement.getTextContent() == null || lastGeoFailoverTimeElement.getTextContent().isEmpty() == true) == false) {
                        Calendar lastGeoFailoverTimeInstance;
                        lastGeoFailoverTimeInstance = DatatypeConverter.parseDateTime(lastGeoFailoverTimeElement.getTextContent());
                        storageServicePropertiesInstance.setLastGeoFailoverTime(lastGeoFailoverTimeInstance);
                    }
                   
                    Element geoSecondaryRegionElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "GeoSecondaryRegion");
                    if (geoSecondaryRegionElement != null) {
                        String geoSecondaryRegionInstance;
                        geoSecondaryRegionInstance = geoSecondaryRegionElement.getTextContent();
                        storageServicePropertiesInstance.setGeoSecondaryRegion(geoSecondaryRegionInstance);
                    }
                   
                    Element statusOfSecondaryElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "StatusOfSecondary");
                    if (statusOfSecondaryElement != null && (statusOfSecondaryElement.getTextContent() == null || statusOfSecondaryElement.getTextContent().isEmpty() == true) == false) {
                        GeoRegionStatus statusOfSecondaryInstance;
                        statusOfSecondaryInstance = GeoRegionStatus.valueOf(statusOfSecondaryElement.getTextContent());
                        storageServicePropertiesInstance.setStatusOfGeoSecondaryRegion(statusOfSecondaryInstance);
                    }
                }
               
                Element extendedPropertiesSequenceElement = XmlUtility.getElementByTagNameNS(storageServiceElement, "http://schemas.microsoft.com/windowsazure", "ExtendedProperties");
                if (extendedPropertiesSequenceElement != null) {
View Full Code Here

Examples of com.microsoft.windowsazure.management.storage.models.StorageAccountProperties

                        storageServiceInstance.setName(serviceNameInstance);
                    }
                   
                    Element storageServicePropertiesElement = XmlUtility.getElementByTagNameNS(storageServicesElement, "http://schemas.microsoft.com/windowsazure", "StorageServiceProperties");
                    if (storageServicePropertiesElement != null) {
                        StorageAccountProperties storageServicePropertiesInstance = new StorageAccountProperties();
                        storageServiceInstance.setProperties(storageServicePropertiesInstance);
                       
                        Element descriptionElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "Description");
                        if (descriptionElement != null) {
                            boolean isNil = false;
                            Attr nilAttribute = descriptionElement.getAttributeNodeNS("http://www.w3.org/2001/XMLSchema-instance", "nil");
                            if (nilAttribute != null) {
                                isNil = "true".equals(nilAttribute.getValue());
                            }
                            if (isNil == false) {
                                String descriptionInstance;
                                descriptionInstance = descriptionElement.getTextContent();
                                storageServicePropertiesInstance.setDescription(descriptionInstance);
                            }
                        }
                       
                        Element affinityGroupElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "AffinityGroup");
                        if (affinityGroupElement != null) {
                            String affinityGroupInstance;
                            affinityGroupInstance = affinityGroupElement.getTextContent();
                            storageServicePropertiesInstance.setAffinityGroup(affinityGroupInstance);
                        }
                       
                        Element locationElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "Location");
                        if (locationElement != null) {
                            String locationInstance;
                            locationInstance = locationElement.getTextContent();
                            storageServicePropertiesInstance.setLocation(locationInstance);
                        }
                       
                        Element labelElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "Label");
                        if (labelElement != null) {
                            String labelInstance;
                            labelInstance = labelElement.getTextContent() != null ? new String(Base64.decode(labelElement.getTextContent())) : null;
                            storageServicePropertiesInstance.setLabel(labelInstance);
                        }
                       
                        Element statusElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "Status");
                        if (statusElement != null) {
                            StorageAccountStatus statusInstance;
                            statusInstance = StorageAccountStatus.valueOf(statusElement.getTextContent());
                            storageServicePropertiesInstance.setStatus(statusInstance);
                        }
                       
                        Element endpointsSequenceElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "Endpoints");
                        if (endpointsSequenceElement != null) {
                            for (int i2 = 0; i2 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(endpointsSequenceElement, "http://schemas.microsoft.com/windowsazure", "Endpoint").size(); i2 = i2 + 1) {
                                org.w3c.dom.Element endpointsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(endpointsSequenceElement, "http://schemas.microsoft.com/windowsazure", "Endpoint").get(i2));
                                storageServicePropertiesInstance.getEndpoints().add(new URI(endpointsElement.getTextContent()));
                            }
                        }
                       
                        Element geoReplicationEnabledElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "GeoReplicationEnabled");
                        if (geoReplicationEnabledElement != null) {
                            boolean geoReplicationEnabledInstance;
                            geoReplicationEnabledInstance = DatatypeConverter.parseBoolean(geoReplicationEnabledElement.getTextContent().toLowerCase());
                            storageServicePropertiesInstance.setGeoReplicationEnabled(geoReplicationEnabledInstance);
                        }
                       
                        Element geoPrimaryRegionElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "GeoPrimaryRegion");
                        if (geoPrimaryRegionElement != null) {
                            String geoPrimaryRegionInstance;
                            geoPrimaryRegionInstance = geoPrimaryRegionElement.getTextContent();
                            storageServicePropertiesInstance.setGeoPrimaryRegion(geoPrimaryRegionInstance);
                        }
                       
                        Element statusOfPrimaryElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "StatusOfPrimary");
                        if (statusOfPrimaryElement != null && (statusOfPrimaryElement.getTextContent() == null || statusOfPrimaryElement.getTextContent().isEmpty() == true) == false) {
                            GeoRegionStatus statusOfPrimaryInstance;
                            statusOfPrimaryInstance = GeoRegionStatus.valueOf(statusOfPrimaryElement.getTextContent());
                            storageServicePropertiesInstance.setStatusOfGeoPrimaryRegion(statusOfPrimaryInstance);
                        }
                       
                        Element lastGeoFailoverTimeElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "LastGeoFailoverTime");
                        if (lastGeoFailoverTimeElement != null && (lastGeoFailoverTimeElement.getTextContent() == null || lastGeoFailoverTimeElement.getTextContent().isEmpty() == true) == false) {
                            Calendar lastGeoFailoverTimeInstance;
                            lastGeoFailoverTimeInstance = DatatypeConverter.parseDateTime(lastGeoFailoverTimeElement.getTextContent());
                            storageServicePropertiesInstance.setLastGeoFailoverTime(lastGeoFailoverTimeInstance);
                        }
                       
                        Element geoSecondaryRegionElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "GeoSecondaryRegion");
                        if (geoSecondaryRegionElement != null) {
                            String geoSecondaryRegionInstance;
                            geoSecondaryRegionInstance = geoSecondaryRegionElement.getTextContent();
                            storageServicePropertiesInstance.setGeoSecondaryRegion(geoSecondaryRegionInstance);
                        }
                       
                        Element statusOfSecondaryElement = XmlUtility.getElementByTagNameNS(storageServicePropertiesElement, "http://schemas.microsoft.com/windowsazure", "StatusOfSecondary");
                        if (statusOfSecondaryElement != null && (statusOfSecondaryElement.getTextContent() == null || statusOfSecondaryElement.getTextContent().isEmpty() == true) == false) {
                            GeoRegionStatus statusOfSecondaryInstance;
                            statusOfSecondaryInstance = GeoRegionStatus.valueOf(statusOfSecondaryElement.getTextContent());
                            storageServicePropertiesInstance.setStatusOfGeoSecondaryRegion(statusOfSecondaryInstance);
                        }
                    }
                   
                    Element extendedPropertiesSequenceElement = XmlUtility.getElementByTagNameNS(storageServicesElement, "http://schemas.microsoft.com/windowsazure", "ExtendedProperties");
                    if (extendedPropertiesSequenceElement != null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.