public ListPolicyVersionsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListPolicyVersionsResult listPolicyVersionsResult = new ListPolicyVersionsResult();

    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("policyVersions", targetDepth)) {
          context.nextToken();
          listPolicyVersionsResult.setPolicyVersions(
              new ListUnmarshaller<PolicyVersion>(PolicyVersionJsonUnmarshaller.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 listPolicyVersionsResult;
  }
  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 ListCertificatesByCAResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListCertificatesByCAResult listCertificatesByCAResult = new ListCertificatesByCAResult();

    AwsJsonReader reader = context.getReader();
    reader.beginObject();
    while (reader.hasNext()) {
      String name = reader.nextName();
      if (name.equals("certificates")) {
        listCertificatesByCAResult.setCertificates(
            new ListUnmarshaller<Certificate>(CertificateJsonUnmarshaller.getInstance())
                .unmarshall(context));
      } else if (name.equals("nextMarker")) {
        listCertificatesByCAResult.setNextMarker(
            StringJsonUnmarshaller.getInstance().unmarshall(context));
      } else {
        reader.skipValue();
      }
    }
    reader.endObject();

    return listCertificatesByCAResult;
  }
  public TopicRulePayload unmarshall(JsonUnmarshallerContext context) throws Exception {
    TopicRulePayload topicRulePayload = new TopicRulePayload();

    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("sql", targetDepth)) {
          context.nextToken();
          topicRulePayload.setSql(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("description", targetDepth)) {
          context.nextToken();
          topicRulePayload.setDescription(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("actions", targetDepth)) {
          context.nextToken();
          topicRulePayload.setActions(
              new ListUnmarshaller<Action>(ActionJsonUnmarshaller.getInstance())
                  .unmarshall(context));
        }
        if (context.testExpression("ruleDisabled", targetDepth)) {
          context.nextToken();
          topicRulePayload.setRuleDisabled(
              BooleanJsonUnmarshaller.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 topicRulePayload;
  }
  public KinesisAction unmarshall(JsonUnmarshallerContext context) throws Exception {
    KinesisAction kinesisAction = new KinesisAction();

    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("roleArn", targetDepth)) {
          context.nextToken();
          kinesisAction.setRoleArn(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("streamName", targetDepth)) {
          context.nextToken();
          kinesisAction.setStreamName(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("partitionKey", targetDepth)) {
          context.nextToken();
          kinesisAction.setPartitionKey(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 kinesisAction;
  }
  public ThingAttribute unmarshall(JsonUnmarshallerContext context) throws Exception {
    ThingAttribute thingAttribute = new ThingAttribute();

    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("thingName", targetDepth)) {
          context.nextToken();
          thingAttribute.setThingName(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("attributes", targetDepth)) {
          context.nextToken();
          thingAttribute.setAttributes(
              new MapUnmarshaller<String, String>(
                      StringJsonUnmarshaller.getInstance(), 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 thingAttribute;
  }
  public Policy unmarshall(JsonUnmarshallerContext context) throws Exception {
    Policy policy = new Policy();

    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("policyName", targetDepth)) {
          context.nextToken();
          policy.setPolicyName(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("policyArn", targetDepth)) {
          context.nextToken();
          policy.setPolicyArn(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 policy;
  }
  public CreateThingTypeResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateThingTypeResult createThingTypeResult = new CreateThingTypeResult();

    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("thingTypeName", targetDepth)) {
          context.nextToken();
          createThingTypeResult.setThingTypeName(
              context.getUnmarshaller(String.class).unmarshall(context));
        }
        if (context.testExpression("thingTypeArn", targetDepth)) {
          context.nextToken();
          createThingTypeResult.setThingTypeArn(
              context.getUnmarshaller(String.class).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 createThingTypeResult;
  }
  public CreateCertificateFromCsrResult unmarshall(JsonUnmarshallerContext context)
      throws Exception {
    CreateCertificateFromCsrResult createCertificateFromCsrResult =
        new CreateCertificateFromCsrResult();

    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("certificateArn", targetDepth)) {
          context.nextToken();
          createCertificateFromCsrResult.setCertificateArn(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("certificateId", targetDepth)) {
          context.nextToken();
          createCertificateFromCsrResult.setCertificateId(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("certificatePem", targetDepth)) {
          context.nextToken();
          createCertificateFromCsrResult.setCertificatePem(
              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 createCertificateFromCsrResult;
  }
  public SnsAction unmarshall(JsonUnmarshallerContext context) throws Exception {
    SnsAction snsAction = new SnsAction();

    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("targetArn", targetDepth)) {
          context.nextToken();
          snsAction.setTargetArn(context.getUnmarshaller(String.class).unmarshall(context));
        }
        if (context.testExpression("roleArn", targetDepth)) {
          context.nextToken();
          snsAction.setRoleArn(context.getUnmarshaller(String.class).unmarshall(context));
        }
        if (context.testExpression("messageFormat", targetDepth)) {
          context.nextToken();
          snsAction.setMessageFormat(context.getUnmarshaller(String.class).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 snsAction;
  }