All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.medialive.model.transform.M3u8SettingsMarshaller Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Elemental MediaLive module holds the client classes that are used for communicating with AWS Elemental MediaLive Service

There is a newer version: 1.12.772
Show newest version
/*
 * 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 javax.annotation.Generated;

import com.amazonaws.SdkClientException;
import com.amazonaws.services.medialive.model.*;

import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;

/**
 * M3u8SettingsMarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class M3u8SettingsMarshaller {

    private static final MarshallingInfo AUDIOFRAMESPERPES_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("audioFramesPerPes").build();
    private static final MarshallingInfo AUDIOPIDS_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("audioPids").build();
    private static final MarshallingInfo ECMPID_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("ecmPid").build();
    private static final MarshallingInfo NIELSENID3BEHAVIOR_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("nielsenId3Behavior").build();
    private static final MarshallingInfo PATINTERVAL_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("patInterval").build();
    private static final MarshallingInfo PCRCONTROL_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("pcrControl").build();
    private static final MarshallingInfo PCRPERIOD_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("pcrPeriod").build();
    private static final MarshallingInfo PCRPID_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("pcrPid").build();
    private static final MarshallingInfo PMTINTERVAL_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("pmtInterval").build();
    private static final MarshallingInfo PMTPID_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("pmtPid").build();
    private static final MarshallingInfo PROGRAMNUM_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("programNum").build();
    private static final MarshallingInfo SCTE35BEHAVIOR_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("scte35Behavior").build();
    private static final MarshallingInfo SCTE35PID_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("scte35Pid").build();
    private static final MarshallingInfo TIMEDMETADATABEHAVIOR_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("timedMetadataBehavior").build();
    private static final MarshallingInfo TIMEDMETADATAPID_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("timedMetadataPid").build();
    private static final MarshallingInfo TRANSPORTSTREAMID_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("transportStreamId").build();
    private static final MarshallingInfo VIDEOPID_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("videoPid").build();
    private static final MarshallingInfo KLVBEHAVIOR_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("klvBehavior").build();
    private static final MarshallingInfo KLVDATAPIDS_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("klvDataPids").build();

    private static final M3u8SettingsMarshaller instance = new M3u8SettingsMarshaller();

    public static M3u8SettingsMarshaller getInstance() {
        return instance;
    }

    /**
     * Marshall the given parameter object.
     */
    public void marshall(M3u8Settings m3u8Settings, ProtocolMarshaller protocolMarshaller) {

        if (m3u8Settings == null) {
            throw new SdkClientException("Invalid argument passed to marshall(...)");
        }

        try {
            protocolMarshaller.marshall(m3u8Settings.getAudioFramesPerPes(), AUDIOFRAMESPERPES_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getAudioPids(), AUDIOPIDS_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getEcmPid(), ECMPID_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getNielsenId3Behavior(), NIELSENID3BEHAVIOR_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getPatInterval(), PATINTERVAL_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getPcrControl(), PCRCONTROL_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getPcrPeriod(), PCRPERIOD_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getPcrPid(), PCRPID_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getPmtInterval(), PMTINTERVAL_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getPmtPid(), PMTPID_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getProgramNum(), PROGRAMNUM_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getScte35Behavior(), SCTE35BEHAVIOR_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getScte35Pid(), SCTE35PID_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getTimedMetadataBehavior(), TIMEDMETADATABEHAVIOR_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getTimedMetadataPid(), TIMEDMETADATAPID_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getTransportStreamId(), TRANSPORTSTREAMID_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getVideoPid(), VIDEOPID_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getKlvBehavior(), KLVBEHAVIOR_BINDING);
            protocolMarshaller.marshall(m3u8Settings.getKlvDataPids(), KLVDATAPIDS_BINDING);
        } catch (Exception e) {
            throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy