com.amazonaws.services.mediaconvert.model.transform.Vp8SettingsMarshaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-mediaconvert Show documentation
Show all versions of aws-java-sdk-mediaconvert Show documentation
The AWS Java SDK for AWS Elemental MediaConvert module holds the client classes that are used for communicating with AWS Elemental MediaConvert Service
/*
* Copyright 2019-2024 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.mediaconvert.model.transform;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.mediaconvert.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* Vp8SettingsMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class Vp8SettingsMarshaller {
private static final MarshallingInfo BITRATE_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("bitrate").build();
private static final MarshallingInfo FRAMERATECONTROL_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("framerateControl").build();
private static final MarshallingInfo FRAMERATECONVERSIONALGORITHM_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("framerateConversionAlgorithm").build();
private static final MarshallingInfo FRAMERATEDENOMINATOR_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("framerateDenominator").build();
private static final MarshallingInfo FRAMERATENUMERATOR_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("framerateNumerator").build();
private static final MarshallingInfo GOPSIZE_BINDING = MarshallingInfo.builder(MarshallingType.DOUBLE).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("gopSize").build();
private static final MarshallingInfo HRDBUFFERSIZE_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("hrdBufferSize").build();
private static final MarshallingInfo MAXBITRATE_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("maxBitrate").build();
private static final MarshallingInfo PARCONTROL_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("parControl").build();
private static final MarshallingInfo PARDENOMINATOR_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("parDenominator").build();
private static final MarshallingInfo PARNUMERATOR_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("parNumerator").build();
private static final MarshallingInfo QUALITYTUNINGLEVEL_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("qualityTuningLevel").build();
private static final MarshallingInfo RATECONTROLMODE_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("rateControlMode").build();
private static final Vp8SettingsMarshaller instance = new Vp8SettingsMarshaller();
public static Vp8SettingsMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(Vp8Settings vp8Settings, ProtocolMarshaller protocolMarshaller) {
if (vp8Settings == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(vp8Settings.getBitrate(), BITRATE_BINDING);
protocolMarshaller.marshall(vp8Settings.getFramerateControl(), FRAMERATECONTROL_BINDING);
protocolMarshaller.marshall(vp8Settings.getFramerateConversionAlgorithm(), FRAMERATECONVERSIONALGORITHM_BINDING);
protocolMarshaller.marshall(vp8Settings.getFramerateDenominator(), FRAMERATEDENOMINATOR_BINDING);
protocolMarshaller.marshall(vp8Settings.getFramerateNumerator(), FRAMERATENUMERATOR_BINDING);
protocolMarshaller.marshall(vp8Settings.getGopSize(), GOPSIZE_BINDING);
protocolMarshaller.marshall(vp8Settings.getHrdBufferSize(), HRDBUFFERSIZE_BINDING);
protocolMarshaller.marshall(vp8Settings.getMaxBitrate(), MAXBITRATE_BINDING);
protocolMarshaller.marshall(vp8Settings.getParControl(), PARCONTROL_BINDING);
protocolMarshaller.marshall(vp8Settings.getParDenominator(), PARDENOMINATOR_BINDING);
protocolMarshaller.marshall(vp8Settings.getParNumerator(), PARNUMERATOR_BINDING);
protocolMarshaller.marshall(vp8Settings.getQualityTuningLevel(), QUALITYTUNINGLEVEL_BINDING);
protocolMarshaller.marshall(vp8Settings.getRateControlMode(), RATECONTROLMODE_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}