use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class KeyMetadataJsonUnmarshaller method unmarshall.
public KeyMetadata unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
KeyMetadata keyMetadata = new KeyMetadata();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("AWSAccountId")) {
keyMetadata.setAWSAccountId(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("KeyId")) {
keyMetadata.setKeyId(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Arn")) {
keyMetadata.setArn(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("CreationDate")) {
keyMetadata.setCreationDate(DateJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Enabled")) {
keyMetadata.setEnabled(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Description")) {
keyMetadata.setDescription(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("KeyUsage")) {
keyMetadata.setKeyUsage(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("KeyState")) {
keyMetadata.setKeyState(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("DeletionDate")) {
keyMetadata.setDeletionDate(DateJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("ValidTo")) {
keyMetadata.setValidTo(DateJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Origin")) {
keyMetadata.setOrigin(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("CustomKeyStoreId")) {
keyMetadata.setCustomKeyStoreId(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("CloudHsmClusterId")) {
keyMetadata.setCloudHsmClusterId(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("ExpirationModel")) {
keyMetadata.setExpirationModel(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("KeyManager")) {
keyMetadata.setKeyManager(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("CustomerMasterKeySpec")) {
keyMetadata.setCustomerMasterKeySpec(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("KeySpec")) {
keyMetadata.setKeySpec(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("EncryptionAlgorithms")) {
keyMetadata.setEncryptionAlgorithms(new ListUnmarshaller<String>(StringJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("SigningAlgorithms")) {
keyMetadata.setSigningAlgorithms(new ListUnmarshaller<String>(StringJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("MultiRegion")) {
keyMetadata.setMultiRegion(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("MultiRegionConfiguration")) {
keyMetadata.setMultiRegionConfiguration(MultiRegionConfigurationJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("PendingDeletionWindowInDays")) {
keyMetadata.setPendingDeletionWindowInDays(IntegerJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("MacAlgorithms")) {
keyMetadata.setMacAlgorithms(new ListUnmarshaller<String>(StringJsonUnmarshaller.getInstance()).unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return keyMetadata;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class ListGrantsResultJsonUnmarshaller method unmarshall.
public ListGrantsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
ListGrantsResult listGrantsResult = new ListGrantsResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("Grants")) {
listGrantsResult.setGrants(new ListUnmarshaller<GrantListEntry>(GrantListEntryJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("NextMarker")) {
listGrantsResult.setNextMarker(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Truncated")) {
listGrantsResult.setTruncated(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return listGrantsResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class MultiRegionKeyJsonUnmarshaller method unmarshall.
public MultiRegionKey unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
MultiRegionKey multiRegionKey = new MultiRegionKey();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("Arn")) {
multiRegionKey.setArn(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Region")) {
multiRegionKey.setRegion(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return multiRegionKey;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class ReEncryptResultJsonUnmarshaller method unmarshall.
public ReEncryptResult unmarshall(JsonUnmarshallerContext context) throws Exception {
ReEncryptResult reEncryptResult = new ReEncryptResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("CiphertextBlob")) {
reEncryptResult.setCiphertextBlob(ByteBufferJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("SourceKeyId")) {
reEncryptResult.setSourceKeyId(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("KeyId")) {
reEncryptResult.setKeyId(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("SourceEncryptionAlgorithm")) {
reEncryptResult.setSourceEncryptionAlgorithm(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("DestinationEncryptionAlgorithm")) {
reEncryptResult.setDestinationEncryptionAlgorithm(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return reEncryptResult;
}
use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.
the class DescribeCustomKeyStoresResultJsonUnmarshaller method unmarshall.
public DescribeCustomKeyStoresResult unmarshall(JsonUnmarshallerContext context) throws Exception {
DescribeCustomKeyStoresResult describeCustomKeyStoresResult = new DescribeCustomKeyStoresResult();
AwsJsonReader reader = context.getReader();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("CustomKeyStores")) {
describeCustomKeyStoresResult.setCustomKeyStores(new ListUnmarshaller<CustomKeyStoresListEntry>(CustomKeyStoresListEntryJsonUnmarshaller.getInstance()).unmarshall(context));
} else if (name.equals("NextMarker")) {
describeCustomKeyStoresResult.setNextMarker(StringJsonUnmarshaller.getInstance().unmarshall(context));
} else if (name.equals("Truncated")) {
describeCustomKeyStoresResult.setTruncated(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return describeCustomKeyStoresResult;
}
Aggregations