/*
* 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 amplify-2017-07-25.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.Amplify.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.Amplify.Model.Internal.MarshallTransformations
{
///
/// Response Unmarshaller for Branch Object
///
public class BranchUnmarshaller : IUnmarshaller, IUnmarshaller
{
///
/// Unmarshaller the response from the service to the response class.
///
///
///
Branch IUnmarshaller.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
///
/// Unmarshaller the response from the service to the response class.
///
///
///
public Branch Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
Branch unmarshalledObject = new Branch();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("activeJobId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ActiveJobId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("associatedResources", targetDepth))
{
var unmarshaller = new ListUnmarshaller(StringUnmarshaller.Instance);
unmarshalledObject.AssociatedResources = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.BackendEnvironmentArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("basicAuthCredentials", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.BasicAuthCredentials = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("branchArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.BranchArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("branchName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.BranchName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("buildSpec", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.BuildSpec = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("createTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreateTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("customDomains", targetDepth))
{
var unmarshaller = new ListUnmarshaller(StringUnmarshaller.Instance);
unmarshalledObject.CustomDomains = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("destinationBranch", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DestinationBranch = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("displayName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DisplayName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("enableAutoBuild", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.EnableAutoBuild = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("enableBasicAuth", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.EnableBasicAuth = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("enableNotification", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.EnableNotification = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("enablePerformanceMode", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.EnablePerformanceMode = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("enablePullRequestPreview", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.EnablePullRequestPreview = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("environmentVariables", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
unmarshalledObject.EnvironmentVariables = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("framework", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Framework = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("pullRequestEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PullRequestEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("sourceBranch", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SourceBranch = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("stage", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Stage = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("tags", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
unmarshalledObject.Tags = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("thumbnailUrl", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ThumbnailUrl = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("totalNumberOfJobs", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TotalNumberOfJobs = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ttl", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Ttl = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("updateTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.UpdateTime = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static BranchUnmarshaller _instance = new BranchUnmarshaller();
///
/// Gets the singleton.
///
public static BranchUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}