/*
* 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 mediaconvert-2017-08-29.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.MediaConvert.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.MediaConvert.Model.Internal.MarshallTransformations
{
///
/// Response Unmarshaller for M3u8Settings Object
///
public class M3u8SettingsUnmarshaller : IUnmarshaller, IUnmarshaller
{
///
/// Unmarshaller the response from the service to the response class.
///
///
///
M3u8Settings IUnmarshaller.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
///
/// Unmarshaller the response from the service to the response class.
///
///
///
public M3u8Settings Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
M3u8Settings unmarshalledObject = new M3u8Settings();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("audioDuration", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AudioDuration = 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 = new ListUnmarshaller(IntUnmarshaller.Instance);
unmarshalledObject.AudioPids = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("dataPTSControl", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DataPTSControl = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("maxPcrInterval", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.MaxPcrInterval = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("nielsenId3", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.NielsenId3 = 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("pcrPid", targetDepth))
{
var unmarshaller = IntUnmarshaller.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 = IntUnmarshaller.Instance;
unmarshalledObject.PmtPid = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("privateMetadataPid", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.PrivateMetadataPid = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("programNumber", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.ProgramNumber = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("scte35Pid", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.Scte35Pid = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("scte35Source", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Scte35Source = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("timedMetadata", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TimedMetadata = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("timedMetadataPid", targetDepth))
{
var unmarshaller = IntUnmarshaller.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 = IntUnmarshaller.Instance;
unmarshalledObject.VideoPid = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static M3u8SettingsUnmarshaller _instance = new M3u8SettingsUnmarshaller();
///
/// Gets the singleton.
///
public static M3u8SettingsUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}