/*
* 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 codebuild-2016-10-06.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.CodeBuild.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.CodeBuild.Model.Internal.MarshallTransformations
{
///
/// Response Unmarshaller for Project Object
///
public class ProjectUnmarshaller : IUnmarshaller, IUnmarshaller
{
///
/// Unmarshaller the response from the service to the response class.
///
///
///
Project IUnmarshaller.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
///
/// Unmarshaller the response from the service to the response class.
///
///
///
public Project Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
Project unmarshalledObject = new Project();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("arn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Arn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("artifacts", targetDepth))
{
var unmarshaller = ProjectArtifactsUnmarshaller.Instance;
unmarshalledObject.Artifacts = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("badge", targetDepth))
{
var unmarshaller = ProjectBadgeUnmarshaller.Instance;
unmarshalledObject.Badge = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("buildBatchConfig", targetDepth))
{
var unmarshaller = ProjectBuildBatchConfigUnmarshaller.Instance;
unmarshalledObject.BuildBatchConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("cache", targetDepth))
{
var unmarshaller = ProjectCacheUnmarshaller.Instance;
unmarshalledObject.Cache = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("concurrentBuildLimit", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.ConcurrentBuildLimit = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("created", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.Created = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("encryptionKey", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EncryptionKey = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("environment", targetDepth))
{
var unmarshaller = ProjectEnvironmentUnmarshaller.Instance;
unmarshalledObject.Environment = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("fileSystemLocations", targetDepth))
{
var unmarshaller = new ListUnmarshaller(ProjectFileSystemLocationUnmarshaller.Instance);
unmarshalledObject.FileSystemLocations = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("lastModified", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.LastModified = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("logsConfig", targetDepth))
{
var unmarshaller = LogsConfigUnmarshaller.Instance;
unmarshalledObject.LogsConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("projectVisibility", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ProjectVisibility = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("publicProjectAlias", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PublicProjectAlias = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("queuedTimeoutInMinutes", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.QueuedTimeoutInMinutes = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("resourceAccessRole", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ResourceAccessRole = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("secondaryArtifacts", targetDepth))
{
var unmarshaller = new ListUnmarshaller(ProjectArtifactsUnmarshaller.Instance);
unmarshalledObject.SecondaryArtifacts = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("secondarySources", targetDepth))
{
var unmarshaller = new ListUnmarshaller(ProjectSourceUnmarshaller.Instance);
unmarshalledObject.SecondarySources = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("secondarySourceVersions", targetDepth))
{
var unmarshaller = new ListUnmarshaller(ProjectSourceVersionUnmarshaller.Instance);
unmarshalledObject.SecondarySourceVersions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("serviceRole", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ServiceRole = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("source", targetDepth))
{
var unmarshaller = ProjectSourceUnmarshaller.Instance;
unmarshalledObject.Source = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("sourceVersion", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SourceVersion = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("tags", targetDepth))
{
var unmarshaller = new ListUnmarshaller(TagUnmarshaller.Instance);
unmarshalledObject.Tags = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("timeoutInMinutes", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.TimeoutInMinutes = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("vpcConfig", targetDepth))
{
var unmarshaller = VpcConfigUnmarshaller.Instance;
unmarshalledObject.VpcConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("webhook", targetDepth))
{
var unmarshaller = WebhookUnmarshaller.Instance;
unmarshalledObject.Webhook = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static ProjectUnmarshaller _instance = new ProjectUnmarshaller();
///
/// Gets the singleton.
///
public static ProjectUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}