/*
* Copyright 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.
*/
/*
* Do not modify this file. This file is generated from the medialive-2017-10-14.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.MediaLive.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.MediaLive.Model.Internal.MarshallTransformations
{
///
/// Response Unmarshaller for M2tsSettings Object
///
public class M2tsSettingsUnmarshaller : IUnmarshaller, IUnmarshaller
{
///
/// Unmarshaller the response from the service to the response class.
///
///
///
M2tsSettings IUnmarshaller.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
///
/// Unmarshaller the response from the service to the response class.
///
///
///
public M2tsSettings Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
M2tsSettings unmarshalledObject = new M2tsSettings();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("absentInputAudioBehavior", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AbsentInputAudioBehavior = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("arib", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Arib = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("aribCaptionsPid", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AribCaptionsPid = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("aribCaptionsPidControl", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AribCaptionsPidControl = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("audioBufferModel", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AudioBufferModel = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("audioFramesPerPes", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.AudioFramesPerPes = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("audioPids", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AudioPids = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("audioStreamType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AudioStreamType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("bitrate", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Bitrate = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("bufferModel", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.BufferModel = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ccDescriptor", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.CcDescriptor = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("dvbNitSettings", targetDepth))
{
var unmarshaller = DvbNitSettingsUnmarshaller.Instance;
unmarshalledObject.DvbNitSettings = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("dvbSdtSettings", targetDepth))
{
var unmarshaller = DvbSdtSettingsUnmarshaller.Instance;
unmarshalledObject.DvbSdtSettings = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("dvbSubPids", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DvbSubPids = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("dvbTdtSettings", targetDepth))
{
var unmarshaller = DvbTdtSettingsUnmarshaller.Instance;
unmarshalledObject.DvbTdtSettings = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("dvbTeletextPid", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DvbTeletextPid = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ebif", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Ebif = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ebpAudioInterval", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EbpAudioInterval = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ebpLookaheadMs", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.EbpLookaheadMs = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ebpPlacement", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EbpPlacement = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ecmPid", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EcmPid = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("esRateInPes", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EsRateInPes = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("etvPlatformPid", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EtvPlatformPid = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("etvSignalPid", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EtvSignalPid = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("fragmentTime", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.FragmentTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("klv", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Klv = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("klvDataPids", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.KlvDataPids = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("nielsenId3Behavior", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.NielsenId3Behavior = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("nullPacketBitrate", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.NullPacketBitrate = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("patInterval", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.PatInterval = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("pcrControl", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PcrControl = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("pcrPeriod", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.PcrPeriod = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("pcrPid", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PcrPid = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("pmtInterval", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.PmtInterval = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("pmtPid", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PmtPid = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("programNum", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.ProgramNum = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("rateMode", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.RateMode = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("scte27Pids", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Scte27Pids = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("scte35Control", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Scte35Control = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("scte35Pid", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Scte35Pid = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("scte35PrerollPullupMilliseconds", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.Scte35PrerollPullupMilliseconds = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("segmentationMarkers", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SegmentationMarkers = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("segmentationStyle", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SegmentationStyle = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("segmentationTime", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.SegmentationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("timedMetadataBehavior", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TimedMetadataBehavior = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("timedMetadataPid", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TimedMetadataPid = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("transportStreamId", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.TransportStreamId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("videoPid", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VideoPid = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static M2tsSettingsUnmarshaller _instance = new M2tsSettingsUnmarshaller();
///
/// Gets the singleton.
///
public static M2tsSettingsUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}