Search in sources :

Example 41 with AwsJsonReader

use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.

the class ParallelDataDataLocationJsonUnmarshaller method unmarshall.

public ParallelDataDataLocation unmarshall(JsonUnmarshallerContext context) throws Exception {
    AwsJsonReader reader = context.getReader();
    if (!reader.isContainer()) {
        reader.skipValue();
        return null;
    }
    ParallelDataDataLocation parallelDataDataLocation = new ParallelDataDataLocation();
    reader.beginObject();
    while (reader.hasNext()) {
        String name = reader.nextName();
        if (name.equals("RepositoryType")) {
            parallelDataDataLocation.setRepositoryType(StringJsonUnmarshaller.getInstance().unmarshall(context));
        } else if (name.equals("Location")) {
            parallelDataDataLocation.setLocation(StringJsonUnmarshaller.getInstance().unmarshall(context));
        } else {
            reader.skipValue();
        }
    }
    reader.endObject();
    return parallelDataDataLocation;
}
Also used : AwsJsonReader(com.amazonaws.util.json.AwsJsonReader)

Example 42 with AwsJsonReader

use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.

the class StartTextTranslationJobResultJsonUnmarshaller method unmarshall.

public StartTextTranslationJobResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    StartTextTranslationJobResult startTextTranslationJobResult = new StartTextTranslationJobResult();
    AwsJsonReader reader = context.getReader();
    reader.beginObject();
    while (reader.hasNext()) {
        String name = reader.nextName();
        if (name.equals("JobId")) {
            startTextTranslationJobResult.setJobId(StringJsonUnmarshaller.getInstance().unmarshall(context));
        } else if (name.equals("JobStatus")) {
            startTextTranslationJobResult.setJobStatus(StringJsonUnmarshaller.getInstance().unmarshall(context));
        } else {
            reader.skipValue();
        }
    }
    reader.endObject();
    return startTextTranslationJobResult;
}
Also used : AwsJsonReader(com.amazonaws.util.json.AwsJsonReader)

Example 43 with AwsJsonReader

use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.

the class ListParallelDataResultJsonUnmarshaller method unmarshall.

public ListParallelDataResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListParallelDataResult listParallelDataResult = new ListParallelDataResult();
    AwsJsonReader reader = context.getReader();
    reader.beginObject();
    while (reader.hasNext()) {
        String name = reader.nextName();
        if (name.equals("ParallelDataPropertiesList")) {
            listParallelDataResult.setParallelDataPropertiesList(new ListUnmarshaller<ParallelDataProperties>(ParallelDataPropertiesJsonUnmarshaller.getInstance()).unmarshall(context));
        } else if (name.equals("NextToken")) {
            listParallelDataResult.setNextToken(StringJsonUnmarshaller.getInstance().unmarshall(context));
        } else {
            reader.skipValue();
        }
    }
    reader.endObject();
    return listParallelDataResult;
}
Also used : AwsJsonReader(com.amazonaws.util.json.AwsJsonReader)

Example 44 with AwsJsonReader

use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.

the class CreateParallelDataResultJsonUnmarshaller method unmarshall.

public CreateParallelDataResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateParallelDataResult createParallelDataResult = new CreateParallelDataResult();
    AwsJsonReader reader = context.getReader();
    reader.beginObject();
    while (reader.hasNext()) {
        String name = reader.nextName();
        if (name.equals("Name")) {
            createParallelDataResult.setName(StringJsonUnmarshaller.getInstance().unmarshall(context));
        } else if (name.equals("Status")) {
            createParallelDataResult.setStatus(StringJsonUnmarshaller.getInstance().unmarshall(context));
        } else {
            reader.skipValue();
        }
    }
    reader.endObject();
    return createParallelDataResult;
}
Also used : AwsJsonReader(com.amazonaws.util.json.AwsJsonReader)

Example 45 with AwsJsonReader

use of com.amazonaws.util.json.AwsJsonReader in project aws-sdk-android by aws-amplify.

the class TranscriptFilterJsonUnmarshaller method unmarshall.

public TranscriptFilter unmarshall(JsonUnmarshallerContext context) throws Exception {
    AwsJsonReader reader = context.getReader();
    if (!reader.isContainer()) {
        reader.skipValue();
        return null;
    }
    TranscriptFilter transcriptFilter = new TranscriptFilter();
    reader.beginObject();
    while (reader.hasNext()) {
        String name = reader.nextName();
        if (name.equals("TranscriptFilterType")) {
            transcriptFilter.setTranscriptFilterType(StringJsonUnmarshaller.getInstance().unmarshall(context));
        } else if (name.equals("AbsoluteTimeRange")) {
            transcriptFilter.setAbsoluteTimeRange(AbsoluteTimeRangeJsonUnmarshaller.getInstance().unmarshall(context));
        } else if (name.equals("RelativeTimeRange")) {
            transcriptFilter.setRelativeTimeRange(RelativeTimeRangeJsonUnmarshaller.getInstance().unmarshall(context));
        } else if (name.equals("ParticipantRole")) {
            transcriptFilter.setParticipantRole(StringJsonUnmarshaller.getInstance().unmarshall(context));
        } else if (name.equals("Negate")) {
            transcriptFilter.setNegate(BooleanJsonUnmarshaller.getInstance().unmarshall(context));
        } else if (name.equals("Targets")) {
            transcriptFilter.setTargets(new ListUnmarshaller<String>(StringJsonUnmarshaller.getInstance()).unmarshall(context));
        } else {
            reader.skipValue();
        }
    }
    reader.endObject();
    return transcriptFilter;
}
Also used : AwsJsonReader(com.amazonaws.util.json.AwsJsonReader)

Aggregations

AwsJsonReader (com.amazonaws.util.json.AwsJsonReader)1687 StringReader (java.io.StringReader)19 AwsJsonWriter (com.amazonaws.util.json.AwsJsonWriter)14 StringWriter (java.io.StringWriter)14 Test (org.junit.Test)14 JsonUnmarshallerContext (com.amazonaws.transform.JsonUnmarshallerContext)5 Date (java.util.Date)4 ListUnmarshaller (com.amazonaws.transform.ListUnmarshaller)3 HashMap (java.util.HashMap)3 IOException (java.io.IOException)2 BigInteger (java.math.BigInteger)2 AmazonWebServiceResponse (com.amazonaws.AmazonWebServiceResponse)1 ResponseMetadata (com.amazonaws.ResponseMetadata)1 CRC32MismatchException (com.amazonaws.internal.CRC32MismatchException)1 InvalidContactFlowException (com.amazonaws.services.connect.model.InvalidContactFlowException)1 InvalidContactFlowModuleException (com.amazonaws.services.connect.model.InvalidContactFlowModuleException)1 ValidationException (com.amazonaws.services.geo.model.ValidationException)1 CRC32ChecksumCalculatingInputStream (com.amazonaws.util.CRC32ChecksumCalculatingInputStream)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 InputStream (java.io.InputStream)1