public PendingModifiedValues unmarshall(StaxUnmarshallerContext context) throws Exception {
    PendingModifiedValues pendingModifiedValues = new PendingModifiedValues();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 2;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return pendingModifiedValues;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("MasterUserPassword", targetDepth)) {
          pendingModifiedValues.setMasterUserPassword(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("NodeType", targetDepth)) {
          pendingModifiedValues.setNodeType(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("NumberOfNodes", targetDepth)) {
          pendingModifiedValues.setNumberOfNodes(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ClusterType", targetDepth)) {
          pendingModifiedValues.setClusterType(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ClusterVersion", targetDepth)) {
          pendingModifiedValues.setClusterVersion(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("AutomatedSnapshotRetentionPeriod", targetDepth)) {
          pendingModifiedValues.setAutomatedSnapshotRetentionPeriod(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ClusterIdentifier", targetDepth)) {
          pendingModifiedValues.setClusterIdentifier(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return pendingModifiedValues;
        }
      }
    }
  }
  public BackendServerDescription unmarshall(StaxUnmarshallerContext context) throws Exception {
    BackendServerDescription backendServerDescription = new BackendServerDescription();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 2;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return backendServerDescription;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("InstancePort", targetDepth)) {
          backendServerDescription.setInstancePort(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("PolicyNames/member", targetDepth)) {
          backendServerDescription
              .getPolicyNames()
              .add(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return backendServerDescription;
        }
      }
    }
  }
  public AvailableCapacity unmarshall(StaxUnmarshallerContext context) throws Exception {
    AvailableCapacity availableCapacity = new AvailableCapacity();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 1;

    while (true) {
      int xmlEvent = context.nextEvent();
      if (xmlEvent == XmlPullParser.END_DOCUMENT) return availableCapacity;

      if (xmlEvent == XmlPullParser.START_TAG) {
        if (context.testExpression("availableInstanceCapacity/item", targetDepth)) {
          availableCapacity
              .getAvailableInstanceCapacity()
              .add(InstanceCapacityStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("availableVCpus", targetDepth)) {
          availableCapacity.setAvailableVCpus(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent == XmlPullParser.END_TAG) {
        if (context.getCurrentDepth() < originalDepth) {
          return availableCapacity;
        }
      }
    }
  }
コード例 #4
0
  public Listener unmarshall(StaxUnmarshallerContext context) throws Exception {
    Listener listener = new Listener();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 1;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return listener;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

        if (context.testExpression("Protocol", targetDepth)) {
          listener.setProtocol(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Port", targetDepth)) {
          listener.setPort(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return listener;
        }
      }
    }
  }
  public PendingModifiedValues unmarshall(StaxUnmarshallerContext context) throws Exception {
    PendingModifiedValues pendingModifiedValues = new PendingModifiedValues();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 2;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return pendingModifiedValues;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("NumCacheNodes", targetDepth)) {
          pendingModifiedValues.setNumCacheNodes(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("CacheNodeIdsToRemove/CacheNodeId", targetDepth)) {
          pendingModifiedValues
              .getCacheNodeIdsToRemove()
              .add(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("EngineVersion", targetDepth)) {
          pendingModifiedValues.setEngineVersion(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return pendingModifiedValues;
        }
      }
    }
  }
コード例 #6
0
  public Endpoint unmarshall(StaxUnmarshallerContext context) throws Exception {
    Endpoint endpoint = new Endpoint();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 2;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return endpoint;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("Address", targetDepth)) {
          endpoint.setAddress(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Port", targetDepth)) {
          endpoint.setPort(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return endpoint;
        }
      }
    }
  }
コード例 #7
0
  public CacheBehaviors unmarshall(StaxUnmarshallerContext context) throws Exception {
    CacheBehaviors cacheBehaviors = new CacheBehaviors();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 1;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return cacheBehaviors;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

        if (context.testExpression("Quantity", targetDepth)) {
          cacheBehaviors.setQuantity(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Items/CacheBehavior", targetDepth)) {
          cacheBehaviors.withItems(CacheBehaviorStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return cacheBehaviors;
        }
      }
    }
  }
コード例 #8
0
  public AccountLimit unmarshall(StaxUnmarshallerContext context) throws Exception {
    AccountLimit accountLimit = new AccountLimit();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 2;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return accountLimit;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("Name", targetDepth)) {
          accountLimit.setName(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Value", targetDepth)) {
          accountLimit.setValue(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return accountLimit;
        }
      }
    }
  }
コード例 #9
0
  public TrafficPolicySummary unmarshall(StaxUnmarshallerContext context) throws Exception {
    TrafficPolicySummary trafficPolicySummary = new TrafficPolicySummary();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 1;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return trafficPolicySummary;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

        if (context.testExpression("Id", targetDepth)) {
          trafficPolicySummary.setId(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Name", targetDepth)) {
          trafficPolicySummary.setName(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Type", targetDepth)) {
          trafficPolicySummary.setType(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("LatestVersion", targetDepth)) {
          trafficPolicySummary.setLatestVersion(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("TrafficPolicyCount", targetDepth)) {
          trafficPolicySummary.setTrafficPolicyCount(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return trafficPolicySummary;
        }
      }
    }
  }
  public ReservedInstancesConfiguration unmarshall(StaxUnmarshallerContext context)
      throws Exception {
    ReservedInstancesConfiguration reservedInstancesConfiguration =
        new ReservedInstancesConfiguration();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 1;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return reservedInstancesConfiguration;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

        if (context.testExpression("availabilityZone", targetDepth)) {
          reservedInstancesConfiguration.setAvailabilityZone(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("platform", targetDepth)) {
          reservedInstancesConfiguration.setPlatform(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("instanceCount", targetDepth)) {
          reservedInstancesConfiguration.setInstanceCount(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("instanceType", targetDepth)) {
          reservedInstancesConfiguration.setInstanceType(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("scope", targetDepth)) {
          reservedInstancesConfiguration.setScope(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return reservedInstancesConfiguration;
        }
      }
    }
  }
  public InstanceNetworkInterfaceAttachment unmarshall(StaxUnmarshallerContext context)
      throws Exception {
    InstanceNetworkInterfaceAttachment instanceNetworkInterfaceAttachment =
        new InstanceNetworkInterfaceAttachment();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 1;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return instanceNetworkInterfaceAttachment;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

        if (context.testExpression("attachmentId", targetDepth)) {
          instanceNetworkInterfaceAttachment.setAttachmentId(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("deviceIndex", targetDepth)) {
          instanceNetworkInterfaceAttachment.setDeviceIndex(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("status", targetDepth)) {
          instanceNetworkInterfaceAttachment.setStatus(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("attachTime", targetDepth)) {
          instanceNetworkInterfaceAttachment.setAttachTime(
              DateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("deleteOnTermination", targetDepth)) {
          instanceNetworkInterfaceAttachment.setDeleteOnTermination(
              BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return instanceNetworkInterfaceAttachment;
        }
      }
    }
  }
コード例 #12
0
  public OptionConfiguration unmarshall(StaxUnmarshallerContext context) throws Exception {
    OptionConfiguration optionConfiguration = new OptionConfiguration();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 1;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return optionConfiguration;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

        if (context.testExpression("OptionName", targetDepth)) {
          optionConfiguration.setOptionName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Port", targetDepth)) {
          optionConfiguration.setPort(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("DBSecurityGroupMemberships/DBSecurityGroupName", targetDepth)) {
          optionConfiguration.withDBSecurityGroupMemberships(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("VpcSecurityGroupMemberships/VpcSecurityGroupId", targetDepth)) {
          optionConfiguration.withVpcSecurityGroupMemberships(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("OptionSettings/OptionSetting", targetDepth)) {
          optionConfiguration.withOptionSettings(
              OptionSettingStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return optionConfiguration;
        }
      }
    }
  }
  public SendMessageBatchRequestEntry unmarshall(StaxUnmarshallerContext context) throws Exception {
    SendMessageBatchRequestEntry sendMessageBatchRequestEntry = new SendMessageBatchRequestEntry();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 1;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return sendMessageBatchRequestEntry;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

        if (context.testExpression("Id", targetDepth)) {
          sendMessageBatchRequestEntry.setId(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("MessageBody", targetDepth)) {
          sendMessageBatchRequestEntry.setMessageBody(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("DelaySeconds", targetDepth)) {
          sendMessageBatchRequestEntry.setDelaySeconds(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("MessageAttribute", targetDepth)) {
          Entry<String, MessageAttributeValue> entry =
              MessageAttributesMapEntryUnmarshaller.getInstance().unmarshall(context);
          sendMessageBatchRequestEntry.getMessageAttributes().put(entry.getKey(), entry.getValue());
          continue;
        }

      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return sendMessageBatchRequestEntry;
        }
      }
    }
  }
  public ChangeMessageVisibilityBatchRequestEntry unmarshall(StaxUnmarshallerContext context)
      throws Exception {
    ChangeMessageVisibilityBatchRequestEntry changeMessageVisibilityBatchRequestEntry =
        new ChangeMessageVisibilityBatchRequestEntry();

    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 2;

    while (true) {
      int xmlEvent = context.nextEvent();
      if (xmlEvent == XmlPullParser.END_DOCUMENT) break;

      if (xmlEvent == XmlPullParser.START_TAG) {
        if (context.testExpression("Id", targetDepth)) {
          changeMessageVisibilityBatchRequestEntry.setId(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ReceiptHandle", targetDepth)) {
          changeMessageVisibilityBatchRequestEntry.setReceiptHandle(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("VisibilityTimeout", targetDepth)) {
          changeMessageVisibilityBatchRequestEntry.setVisibilityTimeout(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent == XmlPullParser.END_TAG) {
        if (context.getCurrentDepth() < originalDepth) {
          break;
        }
      }
    }
    return changeMessageVisibilityBatchRequestEntry;
  }
  public GetFederationTokenResult unmarshall(StaxUnmarshallerContext context) throws Exception {
    GetFederationTokenResult getFederationTokenResult = new GetFederationTokenResult();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 2;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return getFederationTokenResult;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

        if (context.testExpression("Credentials", targetDepth)) {
          getFederationTokenResult.setCredentials(
              CredentialsStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("FederatedUser", targetDepth)) {
          getFederationTokenResult.setFederatedUser(
              FederatedUserStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("PackedPolicySize", targetDepth)) {
          getFederationTokenResult.setPackedPolicySize(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return getFederationTokenResult;
        }
      }
    }
  }
  public InstanceHealthSummary unmarshall(StaxUnmarshallerContext context) throws Exception {
    InstanceHealthSummary instanceHealthSummary = new InstanceHealthSummary();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 1;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return instanceHealthSummary;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

        if (context.testExpression("NoData", targetDepth)) {
          instanceHealthSummary.setNoData(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Unknown", targetDepth)) {
          instanceHealthSummary.setUnknown(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Pending", targetDepth)) {
          instanceHealthSummary.setPending(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Ok", targetDepth)) {
          instanceHealthSummary.setOk(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Info", targetDepth)) {
          instanceHealthSummary.setInfo(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Warning", targetDepth)) {
          instanceHealthSummary.setWarning(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Degraded", targetDepth)) {
          instanceHealthSummary.setDegraded(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Severe", targetDepth)) {
          instanceHealthSummary.setSevere(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return instanceHealthSummary;
        }
      }
    }
  }
コード例 #17
0
  public Purchase unmarshall(StaxUnmarshallerContext context) throws Exception {
    Purchase purchase = new Purchase();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 1;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return purchase;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

        if (context.testExpression("hostReservationId", targetDepth)) {
          purchase.setHostReservationId(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("hostIdSet", targetDepth)) {
          purchase.withHostIdSet(new ArrayList<String>());
          continue;
        }

        if (context.testExpression("hostIdSet/item", targetDepth)) {
          purchase.withHostIdSet(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("instanceFamily", targetDepth)) {
          purchase.setInstanceFamily(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("paymentOption", targetDepth)) {
          purchase.setPaymentOption(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("upfrontPrice", targetDepth)) {
          purchase.setUpfrontPrice(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("hourlyPrice", targetDepth)) {
          purchase.setHourlyPrice(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("currencyCode", targetDepth)) {
          purchase.setCurrencyCode(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("duration", targetDepth)) {
          purchase.setDuration(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return purchase;
        }
      }
    }
  }
コード例 #18
0
  public Cluster unmarshall(StaxUnmarshallerContext context) throws Exception {
    Cluster cluster = new Cluster();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 2;

    if (context.isStartOfDocument()) targetDepth++;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return cluster;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("ClusterIdentifier", targetDepth)) {
          cluster.setClusterIdentifier(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("NodeType", targetDepth)) {
          cluster.setNodeType(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ClusterStatus", targetDepth)) {
          cluster.setClusterStatus(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ModifyStatus", targetDepth)) {
          cluster.setModifyStatus(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("MasterUsername", targetDepth)) {
          cluster.setMasterUsername(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("DBName", targetDepth)) {
          cluster.setDBName(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Endpoint", targetDepth)) {
          cluster.setEndpoint(EndpointStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ClusterCreateTime", targetDepth)) {
          cluster.setClusterCreateTime(DateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("AutomatedSnapshotRetentionPeriod", targetDepth)) {
          cluster.setAutomatedSnapshotRetentionPeriod(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ClusterSecurityGroups/ClusterSecurityGroup", targetDepth)) {
          cluster
              .getClusterSecurityGroups()
              .add(
                  ClusterSecurityGroupMembershipStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("VpcSecurityGroups/VpcSecurityGroup", targetDepth)) {
          cluster
              .getVpcSecurityGroups()
              .add(VpcSecurityGroupMembershipStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ClusterParameterGroups/ClusterParameterGroup", targetDepth)) {
          cluster
              .getClusterParameterGroups()
              .add(ClusterParameterGroupStatusStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ClusterSubnetGroupName", targetDepth)) {
          cluster.setClusterSubnetGroupName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("VpcId", targetDepth)) {
          cluster.setVpcId(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("AvailabilityZone", targetDepth)) {
          cluster.setAvailabilityZone(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("PreferredMaintenanceWindow", targetDepth)) {
          cluster.setPreferredMaintenanceWindow(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("PendingModifiedValues", targetDepth)) {
          cluster.setPendingModifiedValues(
              PendingModifiedValuesStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ClusterVersion", targetDepth)) {
          cluster.setClusterVersion(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("AllowVersionUpgrade", targetDepth)) {
          cluster.setAllowVersionUpgrade(BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("NumberOfNodes", targetDepth)) {
          cluster.setNumberOfNodes(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("PubliclyAccessible", targetDepth)) {
          cluster.setPubliclyAccessible(BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Encrypted", targetDepth)) {
          cluster.setEncrypted(BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("RestoreStatus", targetDepth)) {
          cluster.setRestoreStatus(RestoreStatusStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("HsmStatus", targetDepth)) {
          cluster.setHsmStatus(HsmStatusStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ClusterSnapshotCopyStatus", targetDepth)) {
          cluster.setClusterSnapshotCopyStatus(
              ClusterSnapshotCopyStatusStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ClusterPublicKey", targetDepth)) {
          cluster.setClusterPublicKey(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ClusterNodes/member", targetDepth)) {
          cluster
              .getClusterNodes()
              .add(ClusterNodeStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ElasticIpStatus", targetDepth)) {
          cluster.setElasticIpStatus(
              ElasticIpStatusStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return cluster;
        }
      }
    }
  }
  public ReservedNodeOffering unmarshall(StaxUnmarshallerContext context) throws Exception {
    ReservedNodeOffering reservedNodeOffering = new ReservedNodeOffering();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 2;

    if (context.isStartOfDocument()) targetDepth++;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return reservedNodeOffering;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("ReservedNodeOfferingId", targetDepth)) {
          reservedNodeOffering.setReservedNodeOfferingId(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("NodeType", targetDepth)) {
          reservedNodeOffering.setNodeType(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Duration", targetDepth)) {
          reservedNodeOffering.setDuration(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("FixedPrice", targetDepth)) {
          reservedNodeOffering.setFixedPrice(
              DoubleStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("UsagePrice", targetDepth)) {
          reservedNodeOffering.setUsagePrice(
              DoubleStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("CurrencyCode", targetDepth)) {
          reservedNodeOffering.setCurrencyCode(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("OfferingType", targetDepth)) {
          reservedNodeOffering.setOfferingType(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("RecurringCharges/RecurringCharge", targetDepth)) {
          reservedNodeOffering
              .getRecurringCharges()
              .add(RecurringChargeStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return reservedNodeOffering;
        }
      }
    }
  }
コード例 #20
0
  public Subnet unmarshall(StaxUnmarshallerContext context) throws Exception {
    Subnet subnet = new Subnet();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 1;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return subnet;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

        if (context.testExpression("subnetId", targetDepth)) {
          subnet.setSubnetId(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("state", targetDepth)) {
          subnet.setState(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("vpcId", targetDepth)) {
          subnet.setVpcId(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("cidrBlock", targetDepth)) {
          subnet.setCidrBlock(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("ipv6CidrBlockAssociationSet", targetDepth)) {
          subnet.withIpv6CidrBlockAssociationSet(new ArrayList<SubnetIpv6CidrBlockAssociation>());
          continue;
        }

        if (context.testExpression("ipv6CidrBlockAssociationSet/item", targetDepth)) {
          subnet.withIpv6CidrBlockAssociationSet(
              SubnetIpv6CidrBlockAssociationStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("assignIpv6AddressOnCreation", targetDepth)) {
          subnet.setAssignIpv6AddressOnCreation(
              BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("availableIpAddressCount", targetDepth)) {
          subnet.setAvailableIpAddressCount(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("availabilityZone", targetDepth)) {
          subnet.setAvailabilityZone(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("defaultForAz", targetDepth)) {
          subnet.setDefaultForAz(BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("mapPublicIpOnLaunch", targetDepth)) {
          subnet.setMapPublicIpOnLaunch(BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("tagSet", targetDepth)) {
          subnet.withTags(new ArrayList<Tag>());
          continue;
        }

        if (context.testExpression("tagSet/item", targetDepth)) {
          subnet.withTags(TagStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return subnet;
        }
      }
    }
  }
コード例 #21
0
  public PasswordPolicy unmarshall(StaxUnmarshallerContext context) throws Exception {
    PasswordPolicy passwordPolicy = new PasswordPolicy();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 1;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return passwordPolicy;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

        if (context.testExpression("MinimumPasswordLength", targetDepth)) {
          passwordPolicy.setMinimumPasswordLength(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("RequireSymbols", targetDepth)) {
          passwordPolicy.setRequireSymbols(
              BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("RequireNumbers", targetDepth)) {
          passwordPolicy.setRequireNumbers(
              BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("RequireUppercaseCharacters", targetDepth)) {
          passwordPolicy.setRequireUppercaseCharacters(
              BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("RequireLowercaseCharacters", targetDepth)) {
          passwordPolicy.setRequireLowercaseCharacters(
              BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("AllowUsersToChangePassword", targetDepth)) {
          passwordPolicy.setAllowUsersToChangePassword(
              BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("ExpirePasswords", targetDepth)) {
          passwordPolicy.setExpirePasswords(
              BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("MaxPasswordAge", targetDepth)) {
          passwordPolicy.setMaxPasswordAge(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("PasswordReusePrevention", targetDepth)) {
          passwordPolicy.setPasswordReusePrevention(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("HardExpiry", targetDepth)) {
          passwordPolicy.setHardExpiry(BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return passwordPolicy;
        }
      }
    }
  }
コード例 #22
0
  public Instance unmarshall(StaxUnmarshallerContext context) throws Exception {
    Instance instance = new Instance();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 1;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return instance;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

        if (context.testExpression("instanceId", targetDepth)) {
          instance.setInstanceId(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("imageId", targetDepth)) {
          instance.setImageId(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("instanceState", targetDepth)) {
          instance.setState(InstanceStateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("privateDnsName", targetDepth)) {
          instance.setPrivateDnsName(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("dnsName", targetDepth)) {
          instance.setPublicDnsName(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("reason", targetDepth)) {
          instance.setStateTransitionReason(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("keyName", targetDepth)) {
          instance.setKeyName(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("amiLaunchIndex", targetDepth)) {
          instance.setAmiLaunchIndex(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("productCodes/item", targetDepth)) {
          instance.withProductCodes(ProductCodeStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("instanceType", targetDepth)) {
          instance.setInstanceType(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("launchTime", targetDepth)) {
          instance.setLaunchTime(DateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("placement", targetDepth)) {
          instance.setPlacement(PlacementStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("kernelId", targetDepth)) {
          instance.setKernelId(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("ramdiskId", targetDepth)) {
          instance.setRamdiskId(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("platform", targetDepth)) {
          instance.setPlatform(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("monitoring", targetDepth)) {
          instance.setMonitoring(MonitoringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("subnetId", targetDepth)) {
          instance.setSubnetId(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("vpcId", targetDepth)) {
          instance.setVpcId(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("privateIpAddress", targetDepth)) {
          instance.setPrivateIpAddress(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("ipAddress", targetDepth)) {
          instance.setPublicIpAddress(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("stateReason", targetDepth)) {
          instance.setStateReason(StateReasonStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("architecture", targetDepth)) {
          instance.setArchitecture(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("rootDeviceType", targetDepth)) {
          instance.setRootDeviceType(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("rootDeviceName", targetDepth)) {
          instance.setRootDeviceName(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("blockDeviceMapping/item", targetDepth)) {
          instance.withBlockDeviceMappings(
              InstanceBlockDeviceMappingStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("virtualizationType", targetDepth)) {
          instance.setVirtualizationType(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("instanceLifecycle", targetDepth)) {
          instance.setInstanceLifecycle(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("spotInstanceRequestId", targetDepth)) {
          instance.setSpotInstanceRequestId(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("clientToken", targetDepth)) {
          instance.setClientToken(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("tagSet/item", targetDepth)) {
          instance.withTags(TagStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("groupSet/item", targetDepth)) {
          instance.withSecurityGroups(
              GroupIdentifierStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("sourceDestCheck", targetDepth)) {
          instance.setSourceDestCheck(BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("hypervisor", targetDepth)) {
          instance.setHypervisor(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("networkInterfaceSet/item", targetDepth)) {
          instance.withNetworkInterfaces(
              InstanceNetworkInterfaceStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("iamInstanceProfile", targetDepth)) {
          instance.setIamInstanceProfile(
              IamInstanceProfileStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("ebsOptimized", targetDepth)) {
          instance.setEbsOptimized(BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("sriovNetSupport", targetDepth)) {
          instance.setSriovNetSupport(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return instance;
        }
      }
    }
  }
コード例 #23
0
  public LifecycleHook unmarshall(StaxUnmarshallerContext context) throws Exception {
    LifecycleHook lifecycleHook = new LifecycleHook();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 1;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return lifecycleHook;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

        if (context.testExpression("LifecycleHookName", targetDepth)) {
          lifecycleHook.setLifecycleHookName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("AutoScalingGroupName", targetDepth)) {
          lifecycleHook.setAutoScalingGroupName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("LifecycleTransition", targetDepth)) {
          lifecycleHook.setLifecycleTransition(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("NotificationTargetARN", targetDepth)) {
          lifecycleHook.setNotificationTargetARN(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("RoleARN", targetDepth)) {
          lifecycleHook.setRoleARN(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("NotificationMetadata", targetDepth)) {
          lifecycleHook.setNotificationMetadata(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("HeartbeatTimeout", targetDepth)) {
          lifecycleHook.setHeartbeatTimeout(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("GlobalTimeout", targetDepth)) {
          lifecycleHook.setGlobalTimeout(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("DefaultResult", targetDepth)) {
          lifecycleHook.setDefaultResult(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return lifecycleHook;
        }
      }
    }
  }
  public InstanceGroupDetail unmarshall(StaxUnmarshallerContext context) throws Exception {
    InstanceGroupDetail instanceGroupDetail = new InstanceGroupDetail();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 2;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return instanceGroupDetail;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("InstanceGroupId", targetDepth)) {
          instanceGroupDetail.setInstanceGroupId(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Name", targetDepth)) {
          instanceGroupDetail.setName(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Market", targetDepth)) {
          instanceGroupDetail.setMarket(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("InstanceRole", targetDepth)) {
          instanceGroupDetail.setInstanceRole(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("BidPrice", targetDepth)) {
          instanceGroupDetail.setBidPrice(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("InstanceType", targetDepth)) {
          instanceGroupDetail.setInstanceType(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("InstanceRequestCount", targetDepth)) {
          instanceGroupDetail.setInstanceRequestCount(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("InstanceRunningCount", targetDepth)) {
          instanceGroupDetail.setInstanceRunningCount(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("State", targetDepth)) {
          instanceGroupDetail.setState(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("LastStateChangeReason", targetDepth)) {
          instanceGroupDetail.setLastStateChangeReason(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("CreationDateTime", targetDepth)) {
          instanceGroupDetail.setCreationDateTime(
              DateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("StartDateTime", targetDepth)) {
          instanceGroupDetail.setStartDateTime(
              DateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ReadyDateTime", targetDepth)) {
          instanceGroupDetail.setReadyDateTime(
              DateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("EndDateTime", targetDepth)) {
          instanceGroupDetail.setEndDateTime(
              DateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return instanceGroupDetail;
        }
      }
    }
  }
コード例 #25
0
  public Snapshot unmarshall(StaxUnmarshallerContext context) throws Exception {
    Snapshot snapshot = new Snapshot();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 2;

    if (context.isStartOfDocument()) targetDepth++;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return snapshot;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("SnapshotIdentifier", targetDepth)) {
          snapshot.setSnapshotIdentifier(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ClusterIdentifier", targetDepth)) {
          snapshot.setClusterIdentifier(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("SnapshotCreateTime", targetDepth)) {
          snapshot.setSnapshotCreateTime(DateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Status", targetDepth)) {
          snapshot.setStatus(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Port", targetDepth)) {
          snapshot.setPort(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("AvailabilityZone", targetDepth)) {
          snapshot.setAvailabilityZone(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ClusterCreateTime", targetDepth)) {
          snapshot.setClusterCreateTime(DateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("MasterUsername", targetDepth)) {
          snapshot.setMasterUsername(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ClusterVersion", targetDepth)) {
          snapshot.setClusterVersion(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("SnapshotType", targetDepth)) {
          snapshot.setSnapshotType(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("NodeType", targetDepth)) {
          snapshot.setNodeType(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("NumberOfNodes", targetDepth)) {
          snapshot.setNumberOfNodes(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("DBName", targetDepth)) {
          snapshot.setDBName(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("VpcId", targetDepth)) {
          snapshot.setVpcId(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Encrypted", targetDepth)) {
          snapshot.setEncrypted(BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("EncryptedWithHSM", targetDepth)) {
          snapshot.setEncryptedWithHSM(BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression(
            "AccountsWithRestoreAccess/AccountWithRestoreAccess", targetDepth)) {
          snapshot
              .getAccountsWithRestoreAccess()
              .add(AccountWithRestoreAccessStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("OwnerAccount", targetDepth)) {
          snapshot.setOwnerAccount(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("TotalBackupSizeInMegaBytes", targetDepth)) {
          snapshot.setTotalBackupSizeInMegaBytes(
              DoubleStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ActualIncrementalBackupSizeInMegaBytes", targetDepth)) {
          snapshot.setActualIncrementalBackupSizeInMegaBytes(
              DoubleStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("BackupProgressInMegaBytes", targetDepth)) {
          snapshot.setBackupProgressInMegaBytes(
              DoubleStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("CurrentBackupRateInMegaBytesPerSecond", targetDepth)) {
          snapshot.setCurrentBackupRateInMegaBytesPerSecond(
              DoubleStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("EstimatedSecondsToCompletion", targetDepth)) {
          snapshot.setEstimatedSecondsToCompletion(
              LongStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ElapsedTimeInSeconds", targetDepth)) {
          snapshot.setElapsedTimeInSeconds(LongStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("SourceRegion", targetDepth)) {
          snapshot.setSourceRegion(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return snapshot;
        }
      }
    }
  }
コード例 #26
0
  public HealthCheckConfig unmarshall(StaxUnmarshallerContext context) throws Exception {
    HealthCheckConfig healthCheckConfig = new HealthCheckConfig();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;
    if (context.isStartOfDocument()) targetDepth += 1;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return healthCheckConfig;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("IPAddress", targetDepth)) {
          healthCheckConfig.setIPAddress(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Port", targetDepth)) {
          healthCheckConfig.setPort(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Type", targetDepth)) {
          healthCheckConfig.setType(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ResourcePath", targetDepth)) {
          healthCheckConfig.setResourcePath(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("FullyQualifiedDomainName", targetDepth)) {
          healthCheckConfig.setFullyQualifiedDomainName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("SearchString", targetDepth)) {
          healthCheckConfig.setSearchString(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("RequestInterval", targetDepth)) {
          healthCheckConfig.setRequestInterval(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("FailureThreshold", targetDepth)) {
          healthCheckConfig.setFailureThreshold(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("MeasureLatency", targetDepth)) {
          healthCheckConfig.setMeasureLatency(
              BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Inverted", targetDepth)) {
          healthCheckConfig.setInverted(BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("HealthThreshold", targetDepth)) {
          healthCheckConfig.setHealthThreshold(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ChildHealthChecks/ChildHealthCheck", targetDepth)) {
          healthCheckConfig
              .getChildHealthChecks()
              .add(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return healthCheckConfig;
        }
      }
    }
  }