/*
* 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 grafana-2020-08-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.ManagedGrafana.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ManagedGrafana.Model.Internal.MarshallTransformations
{
///
/// Response Unmarshaller for WorkspaceDescription Object
///
public class WorkspaceDescriptionUnmarshaller : IUnmarshaller, IUnmarshaller
{
///
/// Unmarshaller the response from the service to the response class.
///
///
///
WorkspaceDescription IUnmarshaller.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
///
/// Unmarshaller the response from the service to the response class.
///
///
///
public WorkspaceDescription Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
WorkspaceDescription unmarshalledObject = new WorkspaceDescription();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("accountAccessType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AccountAccessType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("authentication", targetDepth))
{
var unmarshaller = AuthenticationSummaryUnmarshaller.Instance;
unmarshalledObject.Authentication = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("created", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.Created = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("dataSources", targetDepth))
{
var unmarshaller = new ListUnmarshaller(StringUnmarshaller.Instance);
unmarshalledObject.DataSources = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("endpoint", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Endpoint = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("freeTrialConsumed", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.FreeTrialConsumed = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("freeTrialExpiration", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.FreeTrialExpiration = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("grafanaVersion", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.GrafanaVersion = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("id", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Id = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("licenseExpiration", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.LicenseExpiration = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("licenseType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LicenseType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("modified", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.Modified = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("name", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Name = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("networkAccessControl", targetDepth))
{
var unmarshaller = NetworkAccessConfigurationUnmarshaller.Instance;
unmarshalledObject.NetworkAccessControl = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("notificationDestinations", targetDepth))
{
var unmarshaller = new ListUnmarshaller(StringUnmarshaller.Instance);
unmarshalledObject.NotificationDestinations = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("organizationalUnits", targetDepth))
{
var unmarshaller = new ListUnmarshaller(StringUnmarshaller.Instance);
unmarshalledObject.OrganizationalUnits = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("organizationRoleName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.OrganizationRoleName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("permissionType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PermissionType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("stackSetName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.StackSetName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Status = 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("vpcConfiguration", targetDepth))
{
var unmarshaller = VpcConfigurationUnmarshaller.Instance;
unmarshalledObject.VpcConfiguration = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("workspaceRoleArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.WorkspaceRoleArn = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static WorkspaceDescriptionUnmarshaller _instance = new WorkspaceDescriptionUnmarshaller();
///
/// Gets the singleton.
///
public static WorkspaceDescriptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}