/*
* 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 opsworks-2013-02-18.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.OpsWorks.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.OpsWorks.Model.Internal.MarshallTransformations
{
///
/// Response Unmarshaller for CloudWatchLogsLogStream Object
///
public class CloudWatchLogsLogStreamUnmarshaller : IUnmarshaller, IUnmarshaller
{
///
/// Unmarshaller the response from the service to the response class.
///
///
///
CloudWatchLogsLogStream IUnmarshaller.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
///
/// Unmarshaller the response from the service to the response class.
///
///
///
public CloudWatchLogsLogStream Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CloudWatchLogsLogStream unmarshalledObject = new CloudWatchLogsLogStream();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("BatchCount", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.BatchCount = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("BatchSize", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.BatchSize = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("BufferDuration", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.BufferDuration = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("DatetimeFormat", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DatetimeFormat = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Encoding", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Encoding = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("File", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.File = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("FileFingerprintLines", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.FileFingerprintLines = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("InitialPosition", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.InitialPosition = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LogGroupName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LogGroupName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MultiLineStartPattern", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.MultiLineStartPattern = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TimeZone", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TimeZone = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CloudWatchLogsLogStreamUnmarshaller _instance = new CloudWatchLogsLogStreamUnmarshaller();
///
/// Gets the singleton.
///
public static CloudWatchLogsLogStreamUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}