use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class TagJsonUnmarshaller method unmarshall.
public Tag unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
Tag tag = new Tag();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("Key")) {
tag.setKey(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Value")) {
tag.setValue(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return tag;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class GenerateDataKeyPairResultJsonUnmarshaller method unmarshall.
public GenerateDataKeyPairResult unmarshall(JsonUnmarshallerContext context) throws Exception {
GenerateDataKeyPairResult generateDataKeyPairResult = new GenerateDataKeyPairResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("PrivateKeyCiphertextBlob")) {
generateDataKeyPairResult.setPrivateKeyCiphertextBlob(ByteBufferJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("PrivateKeyPlaintext")) {
generateDataKeyPairResult.setPrivateKeyPlaintext(ByteBufferJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("PublicKey")) {
generateDataKeyPairResult.setPublicKey(ByteBufferJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("KeyId")) {
generateDataKeyPairResult.setKeyId(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("KeyPairSpec")) {
generateDataKeyPairResult.setKeyPairSpec(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return generateDataKeyPairResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class GenerateDataKeyPairWithoutPlaintextResultJsonUnmarshaller method unmarshall.
public GenerateDataKeyPairWithoutPlaintextResult unmarshall(JsonUnmarshallerContext context) throws Exception {
GenerateDataKeyPairWithoutPlaintextResult generateDataKeyPairWithoutPlaintextResult = new GenerateDataKeyPairWithoutPlaintextResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("PrivateKeyCiphertextBlob")) {
generateDataKeyPairWithoutPlaintextResult.setPrivateKeyCiphertextBlob(ByteBufferJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("PublicKey")) {
generateDataKeyPairWithoutPlaintextResult.setPublicKey(ByteBufferJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("KeyId")) {
generateDataKeyPairWithoutPlaintextResult.setKeyId(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("KeyPairSpec")) {
generateDataKeyPairWithoutPlaintextResult.setKeyPairSpec(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return generateDataKeyPairWithoutPlaintextResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class GenerateDataKeyWithoutPlaintextResultJsonUnmarshaller method unmarshall.
public GenerateDataKeyWithoutPlaintextResult unmarshall(JsonUnmarshallerContext context) throws Exception {
GenerateDataKeyWithoutPlaintextResult generateDataKeyWithoutPlaintextResult = new GenerateDataKeyWithoutPlaintextResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("CiphertextBlob")) {
generateDataKeyWithoutPlaintextResult.setCiphertextBlob(ByteBufferJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("KeyId")) {
generateDataKeyWithoutPlaintextResult.setKeyId(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return generateDataKeyWithoutPlaintextResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class KeyListEntryJsonUnmarshaller method unmarshall.
public KeyListEntry unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
KeyListEntry keyListEntry = new KeyListEntry();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("KeyId")) {
keyListEntry.setKeyId(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("KeyArn")) {
keyListEntry.setKeyArn(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return keyListEntry;
}
Aggregations