public ModifyDBInstanceRequest unmarshall(Node node) throws Exception { if (node == null) return null; ModifyDBInstanceRequest modifyDBInstanceRequest = new ModifyDBInstanceRequest(); Node dBInstanceIdentifierNode = XpathUtils.asNode("DBInstanceIdentifier", node); modifyDBInstanceRequest.setDBInstanceIdentifier( new StringUnmarshaller().unmarshall(dBInstanceIdentifierNode)); Node allocatedStorageNode = XpathUtils.asNode("AllocatedStorage", node); modifyDBInstanceRequest.setAllocatedStorage( new IntegerUnmarshaller().unmarshall(allocatedStorageNode)); Node dBInstanceClassNode = XpathUtils.asNode("DBInstanceClass", node); modifyDBInstanceRequest.setDBInstanceClass( new StringUnmarshaller().unmarshall(dBInstanceClassNode)); NodeList dBSecurityGroupsNodes = XpathUtils.asNodeList("DBSecurityGroups/DBSecurityGroupName", node); for (int dBSecurityGroupsIndex = 0; dBSecurityGroupsIndex < XpathUtils.nodeLength(dBSecurityGroupsNodes); ++dBSecurityGroupsIndex) { Node dBSecurityGroupsNode = dBSecurityGroupsNodes.item(dBSecurityGroupsIndex); modifyDBInstanceRequest .getDBSecurityGroups() .add(new StringUnmarshaller().unmarshall(dBSecurityGroupsNode)); dBSecurityGroupsNode.getParentNode().removeChild(dBSecurityGroupsNode); } Node applyImmediatelyNode = XpathUtils.asNode("ApplyImmediately", node); modifyDBInstanceRequest.setApplyImmediately( new BooleanUnmarshaller().unmarshall(applyImmediatelyNode)); Node masterUserPasswordNode = XpathUtils.asNode("MasterUserPassword", node); modifyDBInstanceRequest.setMasterUserPassword( new StringUnmarshaller().unmarshall(masterUserPasswordNode)); Node dBParameterGroupNameNode = XpathUtils.asNode("DBParameterGroupName", node); modifyDBInstanceRequest.setDBParameterGroupName( new StringUnmarshaller().unmarshall(dBParameterGroupNameNode)); Node backupRetentionPeriodNode = XpathUtils.asNode("BackupRetentionPeriod", node); modifyDBInstanceRequest.setBackupRetentionPeriod( new IntegerUnmarshaller().unmarshall(backupRetentionPeriodNode)); Node preferredBackupWindowNode = XpathUtils.asNode("PreferredBackupWindow", node); modifyDBInstanceRequest.setPreferredBackupWindow( new StringUnmarshaller().unmarshall(preferredBackupWindowNode)); Node preferredMaintenanceWindowNode = XpathUtils.asNode("PreferredMaintenanceWindow", node); modifyDBInstanceRequest.setPreferredMaintenanceWindow( new StringUnmarshaller().unmarshall(preferredMaintenanceWindowNode)); return modifyDBInstanceRequest; }
public RegisterInstancesWithLoadBalancerRequest unmarshall(Node node) throws Exception { if (node == null) return null; RegisterInstancesWithLoadBalancerRequest registerInstancesWithLoadBalancerRequest = new RegisterInstancesWithLoadBalancerRequest(); Node loadBalancerNameNode = XpathUtils.asNode("LoadBalancerName", node); registerInstancesWithLoadBalancerRequest.setLoadBalancerName( new StringUnmarshaller().unmarshall(loadBalancerNameNode)); NodeList instancesNodes = XpathUtils.asNodeList("Instances/member", node); for (int instancesIndex = 0; instancesIndex < XpathUtils.nodeLength(instancesNodes); ++instancesIndex) { Node instancesNode = instancesNodes.item(instancesIndex); registerInstancesWithLoadBalancerRequest .getInstances() .add(new InstanceUnmarshaller().unmarshall(instancesNode)); instancesNode.getParentNode().removeChild(instancesNode); } return registerInstancesWithLoadBalancerRequest; }
public DescribeLaunchConfigurationsResult unmarshall(Node node) throws Exception { if (node == null) return null; DescribeLaunchConfigurationsResult describeLaunchConfigurationsResult = new DescribeLaunchConfigurationsResult(); NodeList launchConfigurationsNodes = XpathUtils.asNodeList("LaunchConfigurations/member", node); for (int launchConfigurationsIndex = 0; launchConfigurationsIndex < XpathUtils.nodeLength(launchConfigurationsNodes); ++launchConfigurationsIndex) { Node launchConfigurationsNode = launchConfigurationsNodes.item(launchConfigurationsIndex); describeLaunchConfigurationsResult .getLaunchConfigurations() .add(new LaunchConfigurationUnmarshaller().unmarshall(launchConfigurationsNode)); launchConfigurationsNode.getParentNode().removeChild(launchConfigurationsNode); } Node nextTokenNode = XpathUtils.asNode("NextToken", node); describeLaunchConfigurationsResult.setNextToken( new StringUnmarshaller().unmarshall(nextTokenNode)); return describeLaunchConfigurationsResult; }