/* * 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 dms-2016-01-01.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.DatabaseMigrationService.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.DatabaseMigrationService.Model.Internal.MarshallTransformations { /// /// Response Unmarshaller for Endpoint Object /// public class EndpointUnmarshaller : IUnmarshaller, IUnmarshaller { /// /// Unmarshaller the response from the service to the response class. /// /// /// Endpoint IUnmarshaller.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// /// Unmarshaller the response from the service to the response class. /// /// /// public Endpoint Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Endpoint unmarshalledObject = new Endpoint(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CertificateArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.CertificateArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DatabaseName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DatabaseName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DmsTransferSettings", targetDepth)) { var unmarshaller = DmsTransferSettingsUnmarshaller.Instance; unmarshalledObject.DmsTransferSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DocDbSettings", targetDepth)) { var unmarshaller = DocDbSettingsUnmarshaller.Instance; unmarshalledObject.DocDbSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DynamoDbSettings", targetDepth)) { var unmarshaller = DynamoDbSettingsUnmarshaller.Instance; unmarshalledObject.DynamoDbSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ElasticsearchSettings", targetDepth)) { var unmarshaller = ElasticsearchSettingsUnmarshaller.Instance; unmarshalledObject.ElasticsearchSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EndpointArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.EndpointArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EndpointIdentifier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.EndpointIdentifier = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EndpointType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.EndpointType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EngineDisplayName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.EngineDisplayName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EngineName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.EngineName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ExternalId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ExternalId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ExternalTableDefinition", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ExternalTableDefinition = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ExtraConnectionAttributes", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ExtraConnectionAttributes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GcpMySQLSettings", targetDepth)) { var unmarshaller = GcpMySQLSettingsUnmarshaller.Instance; unmarshalledObject.GcpMySQLSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IBMDb2Settings", targetDepth)) { var unmarshaller = IBMDb2SettingsUnmarshaller.Instance; unmarshalledObject.IBMDb2Settings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("KafkaSettings", targetDepth)) { var unmarshaller = KafkaSettingsUnmarshaller.Instance; unmarshalledObject.KafkaSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("KinesisSettings", targetDepth)) { var unmarshaller = KinesisSettingsUnmarshaller.Instance; unmarshalledObject.KinesisSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("KmsKeyId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.KmsKeyId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MicrosoftSQLServerSettings", targetDepth)) { var unmarshaller = MicrosoftSQLServerSettingsUnmarshaller.Instance; unmarshalledObject.MicrosoftSQLServerSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MongoDbSettings", targetDepth)) { var unmarshaller = MongoDbSettingsUnmarshaller.Instance; unmarshalledObject.MongoDbSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MySQLSettings", targetDepth)) { var unmarshaller = MySQLSettingsUnmarshaller.Instance; unmarshalledObject.MySQLSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NeptuneSettings", targetDepth)) { var unmarshaller = NeptuneSettingsUnmarshaller.Instance; unmarshalledObject.NeptuneSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("OracleSettings", targetDepth)) { var unmarshaller = OracleSettingsUnmarshaller.Instance; unmarshalledObject.OracleSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Port", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Port = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PostgreSQLSettings", targetDepth)) { var unmarshaller = PostgreSQLSettingsUnmarshaller.Instance; unmarshalledObject.PostgreSQLSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RedisSettings", targetDepth)) { var unmarshaller = RedisSettingsUnmarshaller.Instance; unmarshalledObject.RedisSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RedshiftSettings", targetDepth)) { var unmarshaller = RedshiftSettingsUnmarshaller.Instance; unmarshalledObject.RedshiftSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("S3Settings", targetDepth)) { var unmarshaller = S3SettingsUnmarshaller.Instance; unmarshalledObject.S3Settings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ServerName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ServerName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ServiceAccessRoleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ServiceAccessRoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SslMode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.SslMode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SybaseSettings", targetDepth)) { var unmarshaller = SybaseSettingsUnmarshaller.Instance; unmarshalledObject.SybaseSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TimestreamSettings", targetDepth)) { var unmarshaller = TimestreamSettingsUnmarshaller.Instance; unmarshalledObject.TimestreamSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Username", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Username = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static EndpointUnmarshaller _instance = new EndpointUnmarshaller(); /// /// Gets the singleton. /// public static EndpointUnmarshaller Instance { get { return _instance; } } } }