/*
* 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 App Object
///
public class AppUnmarshaller : IUnmarshaller, IUnmarshaller
{
///
/// Unmarshaller the response from the service to the response class.
///
///
///
App IUnmarshaller.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
///
/// Unmarshaller the response from the service to the response class.
///
///
///
public App Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
App unmarshalledObject = new App();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AppArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("autoBranchCreationConfig", targetDepth))
{
var unmarshaller = AutoBranchCreationConfigUnmarshaller.Instance;
unmarshalledObject.AutoBranchCreationConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("autoBranchCreationPatterns", targetDepth))
{
var unmarshaller = new ListUnmarshaller(StringUnmarshaller.Instance);
unmarshalledObject.AutoBranchCreationPatterns = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("basicAuthCredentials", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.BasicAuthCredentials = 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("customHeaders", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.CustomHeaders = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("customRules", targetDepth))
{
var unmarshaller = new ListUnmarshaller(CustomRuleUnmarshaller.Instance);
unmarshalledObject.CustomRules = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("defaultDomain", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DefaultDomain = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("enableAutoBranchCreation", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.EnableAutoBranchCreation = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("enableBasicAuth", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.EnableBasicAuth = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("enableBranchAutoBuild", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.EnableBranchAutoBuild = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("enableBranchAutoDeletion", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.EnableBranchAutoDeletion = 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("iamServiceRoleArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.IamServiceRoleArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("platform", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Platform = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("productionBranch", targetDepth))
{
var unmarshaller = ProductionBranchUnmarshaller.Instance;
unmarshalledObject.ProductionBranch = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("repository", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Repository = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("repositoryCloneMethod", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.RepositoryCloneMethod = 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("updateTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.UpdateTime = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static AppUnmarshaller _instance = new AppUnmarshaller();
///
/// Gets the singleton.
///
public static AppUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}