コード例 #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 KeySchemaElement unmarshall(JsonUnmarshallerContext context) throws Exception {
    KeySchemaElement keySchemaElement = new KeySchemaElement();

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

      if (name.equals("AttributeName")) {
        keySchemaElement.setAttributeName(StringJsonUnmarshaller.getInstance().unmarshall(context));
      } else if (name.equals("KeyType")) {
        keySchemaElement.setKeyType(StringJsonUnmarshaller.getInstance().unmarshall(context));
      } else {
        reader.skipValue();
      }
    }
    reader.endObject();

    return keySchemaElement;
  }
コード例 #4
0
 public Label unmarshall(JsonUnmarshallerContext context) throws Exception {
   AwsJsonReader reader = context.getReader();
   if (!reader.isContainer()) {
     reader.skipValue();
     return null;
   }
   Label label = new Label();
   reader.beginObject();
   while (reader.hasNext()) {
     String name = reader.nextName();
     if (name.equals("Name")) {
       label.setName(StringJsonUnmarshaller.getInstance().unmarshall(context));
     } else if (name.equals("Confidence")) {
       label.setConfidence(FloatJsonUnmarshaller.getInstance().unmarshall(context));
     } else {
       reader.skipValue();
     }
   }
   reader.endObject();
   return label;
 }
コード例 #5
0
 public PutRequest unmarshall(JsonUnmarshallerContext context) throws Exception {
   AwsJsonReader reader = context.getReader();
   if (!reader.isContainer()) {
     reader.skipValue();
     return null;
   }
   PutRequest putRequest = new PutRequest();
   reader.beginObject();
   while (reader.hasNext()) {
     String name = reader.nextName();
     if (name.equals("Item")) {
       putRequest.setItem(
           new MapUnmarshaller<AttributeValue>(AttributeValueJsonUnmarshaller.getInstance())
               .unmarshall(context));
     } else {
       reader.skipValue();
     }
   }
   reader.endObject();
   return putRequest;
 }
  public StreamSpecification unmarshall(JsonUnmarshallerContext context) throws Exception {
    StreamSpecification streamSpecification = new StreamSpecification();

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

      if (name.equals("StreamEnabled")) {
        streamSpecification.setStreamEnabled(
            BooleanJsonUnmarshaller.getInstance().unmarshall(context));
      } else if (name.equals("StreamViewType")) {
        streamSpecification.setStreamViewType(
            StringJsonUnmarshaller.getInstance().unmarshall(context));
      } else {
        reader.skipValue();
      }
    }
    reader.endObject();

    return streamSpecification;
  }
  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;
  }
コード例 #8
0
 public Pose unmarshall(JsonUnmarshallerContext context) throws Exception {
   AwsJsonReader reader = context.getReader();
   if (!reader.isContainer()) {
     reader.skipValue();
     return null;
   }
   Pose pose = new Pose();
   reader.beginObject();
   while (reader.hasNext()) {
     String name = reader.nextName();
     if (name.equals("Roll")) {
       pose.setRoll(FloatJsonUnmarshaller.getInstance().unmarshall(context));
     } else if (name.equals("Yaw")) {
       pose.setYaw(FloatJsonUnmarshaller.getInstance().unmarshall(context));
     } else if (name.equals("Pitch")) {
       pose.setPitch(FloatJsonUnmarshaller.getInstance().unmarshall(context));
     } else {
       reader.skipValue();
     }
   }
   reader.endObject();
   return pose;
 }
  public ItemCollectionMetrics unmarshall(JsonUnmarshallerContext context) throws Exception {
    ItemCollectionMetrics itemCollectionMetrics = new ItemCollectionMetrics();

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

      if (name.equals("ItemCollectionKey")) {
        itemCollectionMetrics.setItemCollectionKey(
            new MapUnmarshaller<AttributeValue>(AttributeValueJsonUnmarshaller.getInstance())
                .unmarshall(context));
      } else if (name.equals("SizeEstimateRangeGB")) {
        itemCollectionMetrics.setSizeEstimateRangeGB(
            new ListUnmarshaller<Double>(DoubleJsonUnmarshaller.getInstance()).unmarshall(context));
      } else {
        reader.skipValue();
      }
    }
    reader.endObject();

    return itemCollectionMetrics;
  }
 public ProvisionedThroughput unmarshall(JsonUnmarshallerContext context) throws Exception {
   AwsJsonReader reader = context.getReader();
   if (!reader.isContainer()) {
     reader.skipValue();
     return null;
   }
   ProvisionedThroughput provisionedThroughput = new ProvisionedThroughput();
   reader.beginObject();
   while (reader.hasNext()) {
     String name = reader.nextName();
     if (name.equals("ReadCapacityUnits")) {
       provisionedThroughput.setReadCapacityUnits(
           LongJsonUnmarshaller.getInstance().unmarshall(context));
     } else if (name.equals("WriteCapacityUnits")) {
       provisionedThroughput.setWriteCapacityUnits(
           LongJsonUnmarshaller.getInstance().unmarshall(context));
     } else {
       reader.skipValue();
     }
   }
   reader.endObject();
   return provisionedThroughput;
 }