コード例 #1
0
 public DeviceType unmarshall(JsonUnmarshallerContext context) throws Exception {
   AwsJsonReader reader = context.getReader();
   if (!reader.isContainer()) {
     reader.skipValue();
     return null;
   }
   DeviceType deviceType = new DeviceType();
   reader.beginObject();
   while (reader.hasNext()) {
     String name = reader.nextName();
     if (name.equals("DeviceKey")) {
       deviceType.setDeviceKey(StringJsonUnmarshaller.getInstance().unmarshall(context));
     } else if (name.equals("DeviceAttributes")) {
       deviceType.setDeviceAttributes(
           new ListUnmarshaller<AttributeType>(AttributeTypeJsonUnmarshaller.getInstance())
               .unmarshall(context));
     } else if (name.equals("DeviceCreateDate")) {
       deviceType.setDeviceCreateDate(DateJsonUnmarshaller.getInstance().unmarshall(context));
     } else if (name.equals("DeviceLastModifiedDate")) {
       deviceType.setDeviceLastModifiedDate(
           DateJsonUnmarshaller.getInstance().unmarshall(context));
     } else if (name.equals("DeviceLastAuthenticatedDate")) {
       deviceType.setDeviceLastAuthenticatedDate(
           DateJsonUnmarshaller.getInstance().unmarshall(context));
     } else {
       reader.skipValue();
     }
   }
   reader.endObject();
   return deviceType;
 }
  public CertificateDescription unmarshall(JsonUnmarshallerContext context) throws Exception {
    CertificateDescription certificateDescription = new CertificateDescription();

    AwsJsonReader reader = context.getReader();
    reader.beginObject();
    while (reader.hasNext()) {
      String name = reader.nextName();

      if (name.equals("certificateArn")) {
        certificateDescription.setCertificateArn(
            StringJsonUnmarshaller.getInstance().unmarshall(context));
      } else if (name.equals("certificateId")) {
        certificateDescription.setCertificateId(
            StringJsonUnmarshaller.getInstance().unmarshall(context));
      } else if (name.equals("status")) {
        certificateDescription.setStatus(StringJsonUnmarshaller.getInstance().unmarshall(context));
      } else if (name.equals("certificatePem")) {
        certificateDescription.setCertificatePem(
            StringJsonUnmarshaller.getInstance().unmarshall(context));
      } else if (name.equals("ownedBy")) {
        certificateDescription.setOwnedBy(StringJsonUnmarshaller.getInstance().unmarshall(context));
      } else if (name.equals("creationDate")) {
        certificateDescription.setCreationDate(
            DateJsonUnmarshaller.getInstance().unmarshall(context));
      } else if (name.equals("lastModifiedDate")) {
        certificateDescription.setLastModifiedDate(
            DateJsonUnmarshaller.getInstance().unmarshall(context));
      } else {
        reader.skipValue();
      }
    }
    reader.endObject();

    return certificateDescription;
  }
  public JobFlowExecutionStatusDetail unmarshall(JsonUnmarshallerContext context) throws Exception {
    JobFlowExecutionStatusDetail jobFlowExecutionStatusDetail = new JobFlowExecutionStatusDetail();

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

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("State", targetDepth)) {
          context.nextToken();
          jobFlowExecutionStatusDetail.setState(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("CreationDateTime", targetDepth)) {
          context.nextToken();
          jobFlowExecutionStatusDetail.setCreationDateTime(
              DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("StartDateTime", targetDepth)) {
          context.nextToken();
          jobFlowExecutionStatusDetail.setStartDateTime(
              DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("ReadyDateTime", targetDepth)) {
          context.nextToken();
          jobFlowExecutionStatusDetail.setReadyDateTime(
              DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("EndDateTime", targetDepth)) {
          context.nextToken();
          jobFlowExecutionStatusDetail.setEndDateTime(
              DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("LastStateChangeReason", targetDepth)) {
          context.nextToken();
          jobFlowExecutionStatusDetail.setLastStateChangeReason(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }

      token = context.nextToken();
    }

    return jobFlowExecutionStatusDetail;
  }
  public ProvisionedThroughputDescription unmarshall(JsonUnmarshallerContext context)
      throws Exception {
    ProvisionedThroughputDescription provisionedThroughputDescription =
        new ProvisionedThroughputDescription();

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

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("LastIncreaseDateTime", targetDepth)) {
          context.nextToken();
          provisionedThroughputDescription.setLastIncreaseDateTime(
              DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("LastDecreaseDateTime", targetDepth)) {
          context.nextToken();
          provisionedThroughputDescription.setLastDecreaseDateTime(
              DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("NumberOfDecreasesToday", targetDepth)) {
          context.nextToken();
          provisionedThroughputDescription.setNumberOfDecreasesToday(
              LongJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("ReadCapacityUnits", targetDepth)) {
          context.nextToken();
          provisionedThroughputDescription.setReadCapacityUnits(
              LongJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("WriteCapacityUnits", targetDepth)) {
          context.nextToken();
          provisionedThroughputDescription.setWriteCapacityUnits(
              LongJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getCurrentDepth() <= originalDepth) break;
      }

      token = context.nextToken();
    }

    return provisionedThroughputDescription;
  }
コード例 #5
0
  public FileSystemSize unmarshall(JsonUnmarshallerContext context) throws Exception {
    FileSystemSize fileSystemSize = new FileSystemSize();

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

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("Value", targetDepth)) {
          context.nextToken();
          fileSystemSize.setValue(LongJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("Timestamp", targetDepth)) {
          context.nextToken();
          fileSystemSize.setTimestamp(DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }
      token = context.nextToken();
    }

    return fileSystemSize;
  }
  public WorkflowExecutionDetail unmarshall(JsonUnmarshallerContext context) throws Exception {
    WorkflowExecutionDetail workflowExecutionDetail = new WorkflowExecutionDetail();

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

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("executionInfo", targetDepth)) {
          context.nextToken();
          workflowExecutionDetail.setExecutionInfo(
              WorkflowExecutionInfoJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("executionConfiguration", targetDepth)) {
          context.nextToken();
          workflowExecutionDetail.setExecutionConfiguration(
              WorkflowExecutionConfigurationJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("openCounts", targetDepth)) {
          context.nextToken();
          workflowExecutionDetail.setOpenCounts(
              WorkflowExecutionOpenCountsJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("latestActivityTaskTimestamp", targetDepth)) {
          context.nextToken();
          workflowExecutionDetail.setLatestActivityTaskTimestamp(
              DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("latestExecutionContext", targetDepth)) {
          context.nextToken();
          workflowExecutionDetail.setLatestExecutionContext(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }

      token = context.nextToken();
    }

    return workflowExecutionDetail;
  }
コード例 #7
0
  public InstanceTimeline unmarshall(JsonUnmarshallerContext context) throws Exception {
    InstanceTimeline instanceTimeline = new InstanceTimeline();

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

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("CreationDateTime", targetDepth)) {
          context.nextToken();
          instanceTimeline.setCreationDateTime(
              DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("ReadyDateTime", targetDepth)) {
          context.nextToken();
          instanceTimeline.setReadyDateTime(DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("EndDateTime", targetDepth)) {
          context.nextToken();
          instanceTimeline.setEndDateTime(DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }
      token = context.nextToken();
    }

    return instanceTimeline;
  }
  public UpdateDeploymentResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    UpdateDeploymentResult updateDeploymentResult = new UpdateDeploymentResult();

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

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("id", targetDepth)) {
          context.nextToken();
          updateDeploymentResult.setId(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("description", targetDepth)) {
          context.nextToken();
          updateDeploymentResult.setDescription(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("createdDate", targetDepth)) {
          context.nextToken();
          updateDeploymentResult.setCreatedDate(
              DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("apiSummary", targetDepth)) {
          context.nextToken();
          updateDeploymentResult.setApiSummary(
              new MapUnmarshaller<String, java.util.Map<String, MethodSnapshot>>(
                      StringJsonUnmarshaller.getInstance(),
                      new MapUnmarshaller<String, MethodSnapshot>(
                          StringJsonUnmarshaller.getInstance(),
                          MethodSnapshotJsonUnmarshaller.getInstance()))
                  .unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }
      token = context.nextToken();
    }

    return updateDeploymentResult;
  }
コード例 #9
0
  public Command unmarshall(JsonUnmarshallerContext context) throws Exception {
    Command command = new Command();

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

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("CommandId", targetDepth)) {
          context.nextToken();
          command.setCommandId(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("DocumentName", targetDepth)) {
          context.nextToken();
          command.setDocumentName(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("Comment", targetDepth)) {
          context.nextToken();
          command.setComment(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("ExpiresAfter", targetDepth)) {
          context.nextToken();
          command.setExpiresAfter(DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("Parameters", targetDepth)) {
          context.nextToken();
          command.setParameters(
              new MapUnmarshaller<String, java.util.List<String>>(
                      StringJsonUnmarshaller.getInstance(),
                      new ListUnmarshaller<String>(StringJsonUnmarshaller.getInstance()))
                  .unmarshall(context));
        }
        if (context.testExpression("InstanceIds", targetDepth)) {
          context.nextToken();
          command.setInstanceIds(
              new ListUnmarshaller<String>(StringJsonUnmarshaller.getInstance())
                  .unmarshall(context));
        }
        if (context.testExpression("RequestedDateTime", targetDepth)) {
          context.nextToken();
          command.setRequestedDateTime(DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("Status", targetDepth)) {
          context.nextToken();
          command.setStatus(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("OutputS3BucketName", targetDepth)) {
          context.nextToken();
          command.setOutputS3BucketName(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("OutputS3KeyPrefix", targetDepth)) {
          context.nextToken();
          command.setOutputS3KeyPrefix(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }
      token = context.nextToken();
    }

    return command;
  }
  public ConfigurationRecorderStatus unmarshall(JsonUnmarshallerContext context) throws Exception {
    ConfigurationRecorderStatus configurationRecorderStatus = new ConfigurationRecorderStatus();

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

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("name", targetDepth)) {
          context.nextToken();
          configurationRecorderStatus.setName(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("lastStartTime", targetDepth)) {
          context.nextToken();
          configurationRecorderStatus.setLastStartTime(
              DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("lastStopTime", targetDepth)) {
          context.nextToken();
          configurationRecorderStatus.setLastStopTime(
              DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("recording", targetDepth)) {
          context.nextToken();
          configurationRecorderStatus.setRecording(
              BooleanJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("lastStatus", targetDepth)) {
          context.nextToken();
          configurationRecorderStatus.setLastStatus(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("lastErrorCode", targetDepth)) {
          context.nextToken();
          configurationRecorderStatus.setLastErrorCode(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("lastErrorMessage", targetDepth)) {
          context.nextToken();
          configurationRecorderStatus.setLastErrorMessage(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("lastStatusChangeTime", targetDepth)) {
          context.nextToken();
          configurationRecorderStatus.setLastStatusChangeTime(
              DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }
      token = context.nextToken();
    }

    return configurationRecorderStatus;
  }