com.amazonaws.services.medialive.model.transform.DeleteChannelResultJsonUnmarshaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-medialive Show documentation
Show all versions of aws-java-sdk-medialive Show documentation
The AWS Java SDK for AWS Elemental MediaLive module holds the client classes that are used for communicating with AWS Elemental MediaLive Service
/*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.medialive.model.transform;
import java.math.*;
import javax.annotation.Generated;
import com.amazonaws.services.medialive.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;
import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;
/**
* DeleteChannelResult JSON Unmarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DeleteChannelResultJsonUnmarshaller implements Unmarshaller {
public DeleteChannelResult unmarshall(JsonUnmarshallerContext context) throws Exception {
DeleteChannelResult deleteChannelResult = new DeleteChannelResult();
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 deleteChannelResult;
}
while (true) {
if (token == null)
break;
if (token == FIELD_NAME || token == START_OBJECT) {
if (context.testExpression("arn", targetDepth)) {
context.nextToken();
deleteChannelResult.setArn(context.getUnmarshaller(String.class).unmarshall(context));
}
if (context.testExpression("cdiInputSpecification", targetDepth)) {
context.nextToken();
deleteChannelResult.setCdiInputSpecification(CdiInputSpecificationJsonUnmarshaller.getInstance().unmarshall(context));
}
if (context.testExpression("channelClass", targetDepth)) {
context.nextToken();
deleteChannelResult.setChannelClass(context.getUnmarshaller(String.class).unmarshall(context));
}
if (context.testExpression("destinations", targetDepth)) {
context.nextToken();
deleteChannelResult.setDestinations(new ListUnmarshaller(OutputDestinationJsonUnmarshaller.getInstance())
.unmarshall(context));
}
if (context.testExpression("egressEndpoints", targetDepth)) {
context.nextToken();
deleteChannelResult.setEgressEndpoints(new ListUnmarshaller(ChannelEgressEndpointJsonUnmarshaller.getInstance())
.unmarshall(context));
}
if (context.testExpression("encoderSettings", targetDepth)) {
context.nextToken();
deleteChannelResult.setEncoderSettings(EncoderSettingsJsonUnmarshaller.getInstance().unmarshall(context));
}
if (context.testExpression("id", targetDepth)) {
context.nextToken();
deleteChannelResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
}
if (context.testExpression("inputAttachments", targetDepth)) {
context.nextToken();
deleteChannelResult.setInputAttachments(new ListUnmarshaller(InputAttachmentJsonUnmarshaller.getInstance())
.unmarshall(context));
}
if (context.testExpression("inputSpecification", targetDepth)) {
context.nextToken();
deleteChannelResult.setInputSpecification(InputSpecificationJsonUnmarshaller.getInstance().unmarshall(context));
}
if (context.testExpression("logLevel", targetDepth)) {
context.nextToken();
deleteChannelResult.setLogLevel(context.getUnmarshaller(String.class).unmarshall(context));
}
if (context.testExpression("maintenance", targetDepth)) {
context.nextToken();
deleteChannelResult.setMaintenance(MaintenanceStatusJsonUnmarshaller.getInstance().unmarshall(context));
}
if (context.testExpression("name", targetDepth)) {
context.nextToken();
deleteChannelResult.setName(context.getUnmarshaller(String.class).unmarshall(context));
}
if (context.testExpression("pipelineDetails", targetDepth)) {
context.nextToken();
deleteChannelResult.setPipelineDetails(new ListUnmarshaller(PipelineDetailJsonUnmarshaller.getInstance())
.unmarshall(context));
}
if (context.testExpression("pipelinesRunningCount", targetDepth)) {
context.nextToken();
deleteChannelResult.setPipelinesRunningCount(context.getUnmarshaller(Integer.class).unmarshall(context));
}
if (context.testExpression("roleArn", targetDepth)) {
context.nextToken();
deleteChannelResult.setRoleArn(context.getUnmarshaller(String.class).unmarshall(context));
}
if (context.testExpression("state", targetDepth)) {
context.nextToken();
deleteChannelResult.setState(context.getUnmarshaller(String.class).unmarshall(context));
}
if (context.testExpression("tags", targetDepth)) {
context.nextToken();
deleteChannelResult.setTags(new MapUnmarshaller(context.getUnmarshaller(String.class), context
.getUnmarshaller(String.class)).unmarshall(context));
}
if (context.testExpression("vpc", targetDepth)) {
context.nextToken();
deleteChannelResult.setVpc(VpcOutputSettingsDescriptionJsonUnmarshaller.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 deleteChannelResult;
}
private static DeleteChannelResultJsonUnmarshaller instance;
public static DeleteChannelResultJsonUnmarshaller getInstance() {
if (instance == null)
instance = new DeleteChannelResultJsonUnmarshaller();
return instance;
}
}