repo_name
stringlengths
1
52
repo_creator
stringclasses
6 values
programming_language
stringclasses
4 values
code
stringlengths
0
9.68M
num_lines
int64
1
234k
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BusinessReportRecurrence Object /// </summary> public class BusinessReportRecurrenceUnmarshaller : IUnmarshaller<BusinessReportRecurrence, XmlUnmarshallerContext>, IUnmarshaller<BusinessReportRecurrence, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BusinessReportRecurrence IUnmarshaller<BusinessReportRecurrence, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BusinessReportRecurrence Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BusinessReportRecurrence unmarshalledObject = new BusinessReportRecurrence(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("StartDate", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.StartDate = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BusinessReportRecurrenceUnmarshaller _instance = new BusinessReportRecurrenceUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BusinessReportRecurrenceUnmarshaller Instance { get { return _instance; } } } }
92
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BusinessReportS3Location Object /// </summary> public class BusinessReportS3LocationUnmarshaller : IUnmarshaller<BusinessReportS3Location, XmlUnmarshallerContext>, IUnmarshaller<BusinessReportS3Location, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BusinessReportS3Location IUnmarshaller<BusinessReportS3Location, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BusinessReportS3Location Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BusinessReportS3Location unmarshalledObject = new BusinessReportS3Location(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("BucketName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.BucketName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Path", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Path = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BusinessReportS3LocationUnmarshaller _instance = new BusinessReportS3LocationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BusinessReportS3LocationUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BusinessReportSchedule Object /// </summary> public class BusinessReportScheduleUnmarshaller : IUnmarshaller<BusinessReportSchedule, XmlUnmarshallerContext>, IUnmarshaller<BusinessReportSchedule, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BusinessReportSchedule IUnmarshaller<BusinessReportSchedule, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BusinessReportSchedule Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BusinessReportSchedule unmarshalledObject = new BusinessReportSchedule(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ContentRange", targetDepth)) { var unmarshaller = BusinessReportContentRangeUnmarshaller.Instance; unmarshalledObject.ContentRange = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Format", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Format = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastBusinessReport", targetDepth)) { var unmarshaller = BusinessReportUnmarshaller.Instance; unmarshalledObject.LastBusinessReport = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Recurrence", targetDepth)) { var unmarshaller = BusinessReportRecurrenceUnmarshaller.Instance; unmarshalledObject.Recurrence = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("S3BucketName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.S3BucketName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("S3KeyPrefix", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.S3KeyPrefix = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ScheduleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ScheduleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ScheduleName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ScheduleName = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BusinessReportScheduleUnmarshaller _instance = new BusinessReportScheduleUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BusinessReportScheduleUnmarshaller Instance { get { return _instance; } } } }
134
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BusinessReport Object /// </summary> public class BusinessReportUnmarshaller : IUnmarshaller<BusinessReport, XmlUnmarshallerContext>, IUnmarshaller<BusinessReport, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BusinessReport IUnmarshaller<BusinessReport, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BusinessReport Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BusinessReport unmarshalledObject = new BusinessReport(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("DeliveryTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.DeliveryTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DownloadUrl", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DownloadUrl = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FailureCode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FailureCode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("S3Location", targetDepth)) { var unmarshaller = BusinessReportS3LocationUnmarshaller.Instance; unmarshalledObject.S3Location = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BusinessReportUnmarshaller _instance = new BusinessReportUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BusinessReportUnmarshaller Instance { get { return _instance; } } } }
116
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Category Object /// </summary> public class CategoryUnmarshaller : IUnmarshaller<Category, XmlUnmarshallerContext>, IUnmarshaller<Category, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Category IUnmarshaller<Category, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public Category Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Category unmarshalledObject = new Category(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CategoryId", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.CategoryId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CategoryName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.CategoryName = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static CategoryUnmarshaller _instance = new CategoryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static CategoryUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ConcurrentModificationException Object /// </summary> public class ConcurrentModificationExceptionUnmarshaller : IErrorResponseUnmarshaller<ConcurrentModificationException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ConcurrentModificationException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public ConcurrentModificationException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); ConcurrentModificationException unmarshalledObject = new ConcurrentModificationException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static ConcurrentModificationExceptionUnmarshaller _instance = new ConcurrentModificationExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ConcurrentModificationExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// ConferencePreference Marshaller /// </summary> public class ConferencePreferenceMarshaller : IRequestMarshaller<ConferencePreference, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(ConferencePreference requestObject, JsonMarshallerContext context) { if(requestObject.IsSetDefaultConferenceProviderArn()) { context.Writer.WritePropertyName("DefaultConferenceProviderArn"); context.Writer.Write(requestObject.DefaultConferenceProviderArn); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static ConferencePreferenceMarshaller Instance = new ConferencePreferenceMarshaller(); } }
62
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ConferencePreference Object /// </summary> public class ConferencePreferenceUnmarshaller : IUnmarshaller<ConferencePreference, XmlUnmarshallerContext>, IUnmarshaller<ConferencePreference, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ConferencePreference IUnmarshaller<ConferencePreference, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ConferencePreference Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ConferencePreference unmarshalledObject = new ConferencePreference(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("DefaultConferenceProviderArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DefaultConferenceProviderArn = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ConferencePreferenceUnmarshaller _instance = new ConferencePreferenceUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ConferencePreferenceUnmarshaller Instance { get { return _instance; } } } }
92
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ConferenceProvider Object /// </summary> public class ConferenceProviderUnmarshaller : IUnmarshaller<ConferenceProvider, XmlUnmarshallerContext>, IUnmarshaller<ConferenceProvider, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ConferenceProvider IUnmarshaller<ConferenceProvider, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ConferenceProvider Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ConferenceProvider unmarshalledObject = new ConferenceProvider(); 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("IPDialIn", targetDepth)) { var unmarshaller = IPDialInUnmarshaller.Instance; unmarshalledObject.IPDialIn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MeetingSetting", targetDepth)) { var unmarshaller = MeetingSettingUnmarshaller.Instance; unmarshalledObject.MeetingSetting = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PSTNDialIn", targetDepth)) { var unmarshaller = PSTNDialInUnmarshaller.Instance; unmarshalledObject.PSTNDialIn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Type = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ConferenceProviderUnmarshaller _instance = new ConferenceProviderUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ConferenceProviderUnmarshaller Instance { get { return _instance; } } } }
122
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ContactData Object /// </summary> public class ContactDataUnmarshaller : IUnmarshaller<ContactData, XmlUnmarshallerContext>, IUnmarshaller<ContactData, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ContactData IUnmarshaller<ContactData, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ContactData Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ContactData unmarshalledObject = new ContactData(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ContactArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ContactArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DisplayName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DisplayName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FirstName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FirstName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.LastName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PhoneNumber", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.PhoneNumber = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PhoneNumbers", targetDepth)) { var unmarshaller = new ListUnmarshaller<PhoneNumber, PhoneNumberUnmarshaller>(PhoneNumberUnmarshaller.Instance); unmarshalledObject.PhoneNumbers = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SipAddresses", targetDepth)) { var unmarshaller = new ListUnmarshaller<SipAddress, SipAddressUnmarshaller>(SipAddressUnmarshaller.Instance); unmarshalledObject.SipAddresses = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ContactDataUnmarshaller _instance = new ContactDataUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ContactDataUnmarshaller Instance { get { return _instance; } } } }
128
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Contact Object /// </summary> public class ContactUnmarshaller : IUnmarshaller<Contact, XmlUnmarshallerContext>, IUnmarshaller<Contact, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Contact IUnmarshaller<Contact, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public Contact Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Contact unmarshalledObject = new Contact(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ContactArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ContactArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DisplayName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DisplayName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FirstName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FirstName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.LastName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PhoneNumber", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.PhoneNumber = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PhoneNumbers", targetDepth)) { var unmarshaller = new ListUnmarshaller<PhoneNumber, PhoneNumberUnmarshaller>(PhoneNumberUnmarshaller.Instance); unmarshalledObject.PhoneNumbers = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SipAddresses", targetDepth)) { var unmarshaller = new ListUnmarshaller<SipAddress, SipAddressUnmarshaller>(SipAddressUnmarshaller.Instance); unmarshalledObject.SipAddresses = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ContactUnmarshaller _instance = new ContactUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ContactUnmarshaller Instance { get { return _instance; } } } }
128
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Content Marshaller /// </summary> public class ContentMarshaller : IRequestMarshaller<Content, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(Content requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAudioList()) { context.Writer.WritePropertyName("AudioList"); context.Writer.WriteArrayStart(); foreach(var requestObjectAudioListListValue in requestObject.AudioList) { context.Writer.WriteObjectStart(); var marshaller = AudioMarshaller.Instance; marshaller.Marshall(requestObjectAudioListListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetSsmlList()) { context.Writer.WritePropertyName("SsmlList"); context.Writer.WriteArrayStart(); foreach(var requestObjectSsmlListListValue in requestObject.SsmlList) { context.Writer.WriteObjectStart(); var marshaller = SsmlMarshaller.Instance; marshaller.Marshall(requestObjectSsmlListListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetTextList()) { context.Writer.WritePropertyName("TextList"); context.Writer.WriteArrayStart(); foreach(var requestObjectTextListListValue in requestObject.TextList) { context.Writer.WriteObjectStart(); var marshaller = TextMarshaller.Instance; marshaller.Marshall(requestObjectTextListListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static ContentMarshaller Instance = new ContentMarshaller(); } }
104
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// CreateAddressBook Request Marshaller /// </summary> public class CreateAddressBookRequestMarshaller : IMarshaller<IRequest, CreateAddressBookRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateAddressBookRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateAddressBookRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.CreateAddressBook"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientRequestToken()) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(publicRequest.ClientRequestToken); } else if(!(publicRequest.IsSetClientRequestToken())) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("Description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateAddressBookRequestMarshaller _instance = new CreateAddressBookRequestMarshaller(); internal static CreateAddressBookRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateAddressBookRequestMarshaller Instance { get { return _instance; } } } }
136
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateAddressBook operation /// </summary> public class CreateAddressBookResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateAddressBookResponse response = new CreateAddressBookResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AddressBookArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AddressBookArn = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AlreadyExistsException")) { return AlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateAddressBookResponseUnmarshaller _instance = new CreateAddressBookResponseUnmarshaller(); internal static CreateAddressBookResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateAddressBookResponseUnmarshaller Instance { get { return _instance; } } } }
114
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// CreateBusinessReportSchedule Request Marshaller /// </summary> public class CreateBusinessReportScheduleRequestMarshaller : IMarshaller<IRequest, CreateBusinessReportScheduleRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateBusinessReportScheduleRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateBusinessReportScheduleRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.CreateBusinessReportSchedule"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientRequestToken()) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(publicRequest.ClientRequestToken); } else if(!(publicRequest.IsSetClientRequestToken())) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetContentRange()) { context.Writer.WritePropertyName("ContentRange"); context.Writer.WriteObjectStart(); var marshaller = BusinessReportContentRangeMarshaller.Instance; marshaller.Marshall(publicRequest.ContentRange, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetFormat()) { context.Writer.WritePropertyName("Format"); context.Writer.Write(publicRequest.Format); } if(publicRequest.IsSetRecurrence()) { context.Writer.WritePropertyName("Recurrence"); context.Writer.WriteObjectStart(); var marshaller = BusinessReportRecurrenceMarshaller.Instance; marshaller.Marshall(publicRequest.Recurrence, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetS3BucketName()) { context.Writer.WritePropertyName("S3BucketName"); context.Writer.Write(publicRequest.S3BucketName); } if(publicRequest.IsSetS3KeyPrefix()) { context.Writer.WritePropertyName("S3KeyPrefix"); context.Writer.Write(publicRequest.S3KeyPrefix); } if(publicRequest.IsSetScheduleName()) { context.Writer.WritePropertyName("ScheduleName"); context.Writer.Write(publicRequest.ScheduleName); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateBusinessReportScheduleRequestMarshaller _instance = new CreateBusinessReportScheduleRequestMarshaller(); internal static CreateBusinessReportScheduleRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateBusinessReportScheduleRequestMarshaller Instance { get { return _instance; } } } }
170
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateBusinessReportSchedule operation /// </summary> public class CreateBusinessReportScheduleResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateBusinessReportScheduleResponse response = new CreateBusinessReportScheduleResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ScheduleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ScheduleArn = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AlreadyExistsException")) { return AlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateBusinessReportScheduleResponseUnmarshaller _instance = new CreateBusinessReportScheduleResponseUnmarshaller(); internal static CreateBusinessReportScheduleResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateBusinessReportScheduleResponseUnmarshaller Instance { get { return _instance; } } } }
110
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// CreateConferenceProvider Request Marshaller /// </summary> public class CreateConferenceProviderRequestMarshaller : IMarshaller<IRequest, CreateConferenceProviderRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateConferenceProviderRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateConferenceProviderRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.CreateConferenceProvider"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientRequestToken()) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(publicRequest.ClientRequestToken); } else if(!(publicRequest.IsSetClientRequestToken())) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetConferenceProviderName()) { context.Writer.WritePropertyName("ConferenceProviderName"); context.Writer.Write(publicRequest.ConferenceProviderName); } if(publicRequest.IsSetConferenceProviderType()) { context.Writer.WritePropertyName("ConferenceProviderType"); context.Writer.Write(publicRequest.ConferenceProviderType); } if(publicRequest.IsSetIPDialIn()) { context.Writer.WritePropertyName("IPDialIn"); context.Writer.WriteObjectStart(); var marshaller = IPDialInMarshaller.Instance; marshaller.Marshall(publicRequest.IPDialIn, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetMeetingSetting()) { context.Writer.WritePropertyName("MeetingSetting"); context.Writer.WriteObjectStart(); var marshaller = MeetingSettingMarshaller.Instance; marshaller.Marshall(publicRequest.MeetingSetting, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetPSTNDialIn()) { context.Writer.WritePropertyName("PSTNDialIn"); context.Writer.WriteObjectStart(); var marshaller = PSTNDialInMarshaller.Instance; marshaller.Marshall(publicRequest.PSTNDialIn, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateConferenceProviderRequestMarshaller _instance = new CreateConferenceProviderRequestMarshaller(); internal static CreateConferenceProviderRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateConferenceProviderRequestMarshaller Instance { get { return _instance; } } } }
169
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateConferenceProvider operation /// </summary> public class CreateConferenceProviderResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateConferenceProviderResponse response = new CreateConferenceProviderResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ConferenceProviderArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ConferenceProviderArn = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AlreadyExistsException")) { return AlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateConferenceProviderResponseUnmarshaller _instance = new CreateConferenceProviderResponseUnmarshaller(); internal static CreateConferenceProviderResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateConferenceProviderResponseUnmarshaller Instance { get { return _instance; } } } }
110
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// CreateContact Request Marshaller /// </summary> public class CreateContactRequestMarshaller : IMarshaller<IRequest, CreateContactRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateContactRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateContactRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.CreateContact"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientRequestToken()) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(publicRequest.ClientRequestToken); } else if(!(publicRequest.IsSetClientRequestToken())) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetDisplayName()) { context.Writer.WritePropertyName("DisplayName"); context.Writer.Write(publicRequest.DisplayName); } if(publicRequest.IsSetFirstName()) { context.Writer.WritePropertyName("FirstName"); context.Writer.Write(publicRequest.FirstName); } if(publicRequest.IsSetLastName()) { context.Writer.WritePropertyName("LastName"); context.Writer.Write(publicRequest.LastName); } if(publicRequest.IsSetPhoneNumber()) { context.Writer.WritePropertyName("PhoneNumber"); context.Writer.Write(publicRequest.PhoneNumber); } if(publicRequest.IsSetPhoneNumbers()) { context.Writer.WritePropertyName("PhoneNumbers"); context.Writer.WriteArrayStart(); foreach(var publicRequestPhoneNumbersListValue in publicRequest.PhoneNumbers) { context.Writer.WriteObjectStart(); var marshaller = PhoneNumberMarshaller.Instance; marshaller.Marshall(publicRequestPhoneNumbersListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetSipAddresses()) { context.Writer.WritePropertyName("SipAddresses"); context.Writer.WriteArrayStart(); foreach(var publicRequestSipAddressesListValue in publicRequest.SipAddresses) { context.Writer.WriteObjectStart(); var marshaller = SipAddressMarshaller.Instance; marshaller.Marshall(publicRequestSipAddressesListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateContactRequestMarshaller _instance = new CreateContactRequestMarshaller(); internal static CreateContactRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateContactRequestMarshaller Instance { get { return _instance; } } } }
180
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateContact operation /// </summary> public class CreateContactResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateContactResponse response = new CreateContactResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ContactArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ContactArn = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AlreadyExistsException")) { return AlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateContactResponseUnmarshaller _instance = new CreateContactResponseUnmarshaller(); internal static CreateContactResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateContactResponseUnmarshaller Instance { get { return _instance; } } } }
114
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// CreateEndOfMeetingReminder Marshaller /// </summary> public class CreateEndOfMeetingReminderMarshaller : IRequestMarshaller<CreateEndOfMeetingReminder, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(CreateEndOfMeetingReminder requestObject, JsonMarshallerContext context) { if(requestObject.IsSetEnabled()) { context.Writer.WritePropertyName("Enabled"); context.Writer.Write(requestObject.Enabled); } if(requestObject.IsSetReminderAtMinutes()) { context.Writer.WritePropertyName("ReminderAtMinutes"); context.Writer.WriteArrayStart(); foreach(var requestObjectReminderAtMinutesListValue in requestObject.ReminderAtMinutes) { context.Writer.Write(requestObjectReminderAtMinutesListValue); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetReminderType()) { context.Writer.WritePropertyName("ReminderType"); context.Writer.Write(requestObject.ReminderType); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static CreateEndOfMeetingReminderMarshaller Instance = new CreateEndOfMeetingReminderMarshaller(); } }
79
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// CreateGatewayGroup Request Marshaller /// </summary> public class CreateGatewayGroupRequestMarshaller : IMarshaller<IRequest, CreateGatewayGroupRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateGatewayGroupRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateGatewayGroupRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.CreateGatewayGroup"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientRequestToken()) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(publicRequest.ClientRequestToken); } else if(!(publicRequest.IsSetClientRequestToken())) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("Description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateGatewayGroupRequestMarshaller _instance = new CreateGatewayGroupRequestMarshaller(); internal static CreateGatewayGroupRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateGatewayGroupRequestMarshaller Instance { get { return _instance; } } } }
136
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateGatewayGroup operation /// </summary> public class CreateGatewayGroupResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateGatewayGroupResponse response = new CreateGatewayGroupResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("GatewayGroupArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GatewayGroupArn = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AlreadyExistsException")) { return AlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateGatewayGroupResponseUnmarshaller _instance = new CreateGatewayGroupResponseUnmarshaller(); internal static CreateGatewayGroupResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateGatewayGroupResponseUnmarshaller Instance { get { return _instance; } } } }
114
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// CreateInstantBooking Marshaller /// </summary> public class CreateInstantBookingMarshaller : IRequestMarshaller<CreateInstantBooking, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(CreateInstantBooking requestObject, JsonMarshallerContext context) { if(requestObject.IsSetDurationInMinutes()) { context.Writer.WritePropertyName("DurationInMinutes"); context.Writer.Write(requestObject.DurationInMinutes); } if(requestObject.IsSetEnabled()) { context.Writer.WritePropertyName("Enabled"); context.Writer.Write(requestObject.Enabled); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static CreateInstantBookingMarshaller Instance = new CreateInstantBookingMarshaller(); } }
68
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// CreateMeetingRoomConfiguration Marshaller /// </summary> public class CreateMeetingRoomConfigurationMarshaller : IRequestMarshaller<CreateMeetingRoomConfiguration, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(CreateMeetingRoomConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetEndOfMeetingReminder()) { context.Writer.WritePropertyName("EndOfMeetingReminder"); context.Writer.WriteObjectStart(); var marshaller = CreateEndOfMeetingReminderMarshaller.Instance; marshaller.Marshall(requestObject.EndOfMeetingReminder, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetInstantBooking()) { context.Writer.WritePropertyName("InstantBooking"); context.Writer.WriteObjectStart(); var marshaller = CreateInstantBookingMarshaller.Instance; marshaller.Marshall(requestObject.InstantBooking, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetProactiveJoin()) { context.Writer.WritePropertyName("ProactiveJoin"); context.Writer.WriteObjectStart(); var marshaller = CreateProactiveJoinMarshaller.Instance; marshaller.Marshall(requestObject.ProactiveJoin, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetRequireCheckIn()) { context.Writer.WritePropertyName("RequireCheckIn"); context.Writer.WriteObjectStart(); var marshaller = CreateRequireCheckInMarshaller.Instance; marshaller.Marshall(requestObject.RequireCheckIn, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetRoomUtilizationMetricsEnabled()) { context.Writer.WritePropertyName("RoomUtilizationMetricsEnabled"); context.Writer.Write(requestObject.RoomUtilizationMetricsEnabled); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static CreateMeetingRoomConfigurationMarshaller Instance = new CreateMeetingRoomConfigurationMarshaller(); } }
106
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// CreateNetworkProfile Request Marshaller /// </summary> public class CreateNetworkProfileRequestMarshaller : IMarshaller<IRequest, CreateNetworkProfileRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateNetworkProfileRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateNetworkProfileRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.CreateNetworkProfile"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetCertificateAuthorityArn()) { context.Writer.WritePropertyName("CertificateAuthorityArn"); context.Writer.Write(publicRequest.CertificateAuthorityArn); } if(publicRequest.IsSetClientRequestToken()) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(publicRequest.ClientRequestToken); } else if(!(publicRequest.IsSetClientRequestToken())) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetCurrentPassword()) { context.Writer.WritePropertyName("CurrentPassword"); context.Writer.Write(publicRequest.CurrentPassword); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("Description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetEapMethod()) { context.Writer.WritePropertyName("EapMethod"); context.Writer.Write(publicRequest.EapMethod); } if(publicRequest.IsSetNetworkProfileName()) { context.Writer.WritePropertyName("NetworkProfileName"); context.Writer.Write(publicRequest.NetworkProfileName); } if(publicRequest.IsSetNextPassword()) { context.Writer.WritePropertyName("NextPassword"); context.Writer.Write(publicRequest.NextPassword); } if(publicRequest.IsSetSecurityType()) { context.Writer.WritePropertyName("SecurityType"); context.Writer.Write(publicRequest.SecurityType); } if(publicRequest.IsSetSsid()) { context.Writer.WritePropertyName("Ssid"); context.Writer.Write(publicRequest.Ssid); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetTrustAnchors()) { context.Writer.WritePropertyName("TrustAnchors"); context.Writer.WriteArrayStart(); foreach(var publicRequestTrustAnchorsListValue in publicRequest.TrustAnchors) { context.Writer.Write(publicRequestTrustAnchorsListValue); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateNetworkProfileRequestMarshaller _instance = new CreateNetworkProfileRequestMarshaller(); internal static CreateNetworkProfileRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateNetworkProfileRequestMarshaller Instance { get { return _instance; } } } }
183
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateNetworkProfile operation /// </summary> public class CreateNetworkProfileResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateNetworkProfileResponse response = new CreateNetworkProfileResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("NetworkProfileArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NetworkProfileArn = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AlreadyExistsException")) { return AlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidCertificateAuthorityException")) { return InvalidCertificateAuthorityExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidServiceLinkedRoleStateException")) { return InvalidServiceLinkedRoleStateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateNetworkProfileResponseUnmarshaller _instance = new CreateNetworkProfileResponseUnmarshaller(); internal static CreateNetworkProfileResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateNetworkProfileResponseUnmarshaller Instance { get { return _instance; } } } }
126
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// CreateProactiveJoin Marshaller /// </summary> public class CreateProactiveJoinMarshaller : IRequestMarshaller<CreateProactiveJoin, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(CreateProactiveJoin requestObject, JsonMarshallerContext context) { if(requestObject.IsSetEnabledByMotion()) { context.Writer.WritePropertyName("EnabledByMotion"); context.Writer.Write(requestObject.EnabledByMotion); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static CreateProactiveJoinMarshaller Instance = new CreateProactiveJoinMarshaller(); } }
62
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// CreateProfile Request Marshaller /// </summary> public class CreateProfileRequestMarshaller : IMarshaller<IRequest, CreateProfileRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateProfileRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateProfileRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.CreateProfile"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAddress()) { context.Writer.WritePropertyName("Address"); context.Writer.Write(publicRequest.Address); } if(publicRequest.IsSetClientRequestToken()) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(publicRequest.ClientRequestToken); } else if(!(publicRequest.IsSetClientRequestToken())) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetDataRetentionOptIn()) { context.Writer.WritePropertyName("DataRetentionOptIn"); context.Writer.Write(publicRequest.DataRetentionOptIn); } if(publicRequest.IsSetDistanceUnit()) { context.Writer.WritePropertyName("DistanceUnit"); context.Writer.Write(publicRequest.DistanceUnit); } if(publicRequest.IsSetLocale()) { context.Writer.WritePropertyName("Locale"); context.Writer.Write(publicRequest.Locale); } if(publicRequest.IsSetMaxVolumeLimit()) { context.Writer.WritePropertyName("MaxVolumeLimit"); context.Writer.Write(publicRequest.MaxVolumeLimit); } if(publicRequest.IsSetMeetingRoomConfiguration()) { context.Writer.WritePropertyName("MeetingRoomConfiguration"); context.Writer.WriteObjectStart(); var marshaller = CreateMeetingRoomConfigurationMarshaller.Instance; marshaller.Marshall(publicRequest.MeetingRoomConfiguration, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetProfileName()) { context.Writer.WritePropertyName("ProfileName"); context.Writer.Write(publicRequest.ProfileName); } if(publicRequest.IsSetPSTNEnabled()) { context.Writer.WritePropertyName("PSTNEnabled"); context.Writer.Write(publicRequest.PSTNEnabled); } if(publicRequest.IsSetSetupModeDisabled()) { context.Writer.WritePropertyName("SetupModeDisabled"); context.Writer.Write(publicRequest.SetupModeDisabled); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetTemperatureUnit()) { context.Writer.WritePropertyName("TemperatureUnit"); context.Writer.Write(publicRequest.TemperatureUnit); } if(publicRequest.IsSetTimezone()) { context.Writer.WritePropertyName("Timezone"); context.Writer.Write(publicRequest.Timezone); } if(publicRequest.IsSetWakeWord()) { context.Writer.WritePropertyName("WakeWord"); context.Writer.Write(publicRequest.WakeWord); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateProfileRequestMarshaller _instance = new CreateProfileRequestMarshaller(); internal static CreateProfileRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateProfileRequestMarshaller Instance { get { return _instance; } } } }
201
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateProfile operation /// </summary> public class CreateProfileResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateProfileResponse response = new CreateProfileResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ProfileArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ProfileArn = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AlreadyExistsException")) { return AlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateProfileResponseUnmarshaller _instance = new CreateProfileResponseUnmarshaller(); internal static CreateProfileResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateProfileResponseUnmarshaller Instance { get { return _instance; } } } }
118
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// CreateRequireCheckIn Marshaller /// </summary> public class CreateRequireCheckInMarshaller : IRequestMarshaller<CreateRequireCheckIn, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(CreateRequireCheckIn requestObject, JsonMarshallerContext context) { if(requestObject.IsSetEnabled()) { context.Writer.WritePropertyName("Enabled"); context.Writer.Write(requestObject.Enabled); } if(requestObject.IsSetReleaseAfterMinutes()) { context.Writer.WritePropertyName("ReleaseAfterMinutes"); context.Writer.Write(requestObject.ReleaseAfterMinutes); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static CreateRequireCheckInMarshaller Instance = new CreateRequireCheckInMarshaller(); } }
68
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// CreateRoom Request Marshaller /// </summary> public class CreateRoomRequestMarshaller : IMarshaller<IRequest, CreateRoomRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateRoomRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateRoomRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.CreateRoom"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientRequestToken()) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(publicRequest.ClientRequestToken); } else if(!(publicRequest.IsSetClientRequestToken())) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("Description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetProfileArn()) { context.Writer.WritePropertyName("ProfileArn"); context.Writer.Write(publicRequest.ProfileArn); } if(publicRequest.IsSetProviderCalendarId()) { context.Writer.WritePropertyName("ProviderCalendarId"); context.Writer.Write(publicRequest.ProviderCalendarId); } if(publicRequest.IsSetRoomName()) { context.Writer.WritePropertyName("RoomName"); context.Writer.Write(publicRequest.RoomName); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateRoomRequestMarshaller _instance = new CreateRoomRequestMarshaller(); internal static CreateRoomRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateRoomRequestMarshaller Instance { get { return _instance; } } } }
148
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateRoom operation /// </summary> public class CreateRoomResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateRoomResponse response = new CreateRoomResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("RoomArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RoomArn = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AlreadyExistsException")) { return AlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateRoomResponseUnmarshaller _instance = new CreateRoomResponseUnmarshaller(); internal static CreateRoomResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateRoomResponseUnmarshaller Instance { get { return _instance; } } } }
114
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// CreateSkillGroup Request Marshaller /// </summary> public class CreateSkillGroupRequestMarshaller : IMarshaller<IRequest, CreateSkillGroupRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateSkillGroupRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateSkillGroupRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.CreateSkillGroup"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientRequestToken()) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(publicRequest.ClientRequestToken); } else if(!(publicRequest.IsSetClientRequestToken())) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("Description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetSkillGroupName()) { context.Writer.WritePropertyName("SkillGroupName"); context.Writer.Write(publicRequest.SkillGroupName); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateSkillGroupRequestMarshaller _instance = new CreateSkillGroupRequestMarshaller(); internal static CreateSkillGroupRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateSkillGroupRequestMarshaller Instance { get { return _instance; } } } }
136
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateSkillGroup operation /// </summary> public class CreateSkillGroupResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateSkillGroupResponse response = new CreateSkillGroupResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("SkillGroupArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SkillGroupArn = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AlreadyExistsException")) { return AlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateSkillGroupResponseUnmarshaller _instance = new CreateSkillGroupResponseUnmarshaller(); internal static CreateSkillGroupResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateSkillGroupResponseUnmarshaller Instance { get { return _instance; } } } }
118
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// CreateUser Request Marshaller /// </summary> public class CreateUserRequestMarshaller : IMarshaller<IRequest, CreateUserRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateUserRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateUserRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.CreateUser"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientRequestToken()) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(publicRequest.ClientRequestToken); } else if(!(publicRequest.IsSetClientRequestToken())) { context.Writer.WritePropertyName("ClientRequestToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetEmail()) { context.Writer.WritePropertyName("Email"); context.Writer.Write(publicRequest.Email); } if(publicRequest.IsSetFirstName()) { context.Writer.WritePropertyName("FirstName"); context.Writer.Write(publicRequest.FirstName); } if(publicRequest.IsSetLastName()) { context.Writer.WritePropertyName("LastName"); context.Writer.Write(publicRequest.LastName); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetUserId()) { context.Writer.WritePropertyName("UserId"); context.Writer.Write(publicRequest.UserId); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateUserRequestMarshaller _instance = new CreateUserRequestMarshaller(); internal static CreateUserRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateUserRequestMarshaller Instance { get { return _instance; } } } }
148
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateUser operation /// </summary> public class CreateUserResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateUserResponse response = new CreateUserResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("UserArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.UserArn = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUseException")) { return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateUserResponseUnmarshaller _instance = new CreateUserResponseUnmarshaller(); internal static CreateUserResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateUserResponseUnmarshaller Instance { get { return _instance; } } } }
118
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DeleteAddressBook Request Marshaller /// </summary> public class DeleteAddressBookRequestMarshaller : IMarshaller<IRequest, DeleteAddressBookRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteAddressBookRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteAddressBookRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DeleteAddressBook"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAddressBookArn()) { context.Writer.WritePropertyName("AddressBookArn"); context.Writer.Write(publicRequest.AddressBookArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteAddressBookRequestMarshaller _instance = new DeleteAddressBookRequestMarshaller(); internal static DeleteAddressBookRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteAddressBookRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteAddressBook operation /// </summary> public class DeleteAddressBookResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteAddressBookResponse response = new DeleteAddressBookResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteAddressBookResponseUnmarshaller _instance = new DeleteAddressBookResponseUnmarshaller(); internal static DeleteAddressBookResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteAddressBookResponseUnmarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DeleteBusinessReportSchedule Request Marshaller /// </summary> public class DeleteBusinessReportScheduleRequestMarshaller : IMarshaller<IRequest, DeleteBusinessReportScheduleRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteBusinessReportScheduleRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteBusinessReportScheduleRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DeleteBusinessReportSchedule"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetScheduleArn()) { context.Writer.WritePropertyName("ScheduleArn"); context.Writer.Write(publicRequest.ScheduleArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteBusinessReportScheduleRequestMarshaller _instance = new DeleteBusinessReportScheduleRequestMarshaller(); internal static DeleteBusinessReportScheduleRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteBusinessReportScheduleRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteBusinessReportSchedule operation /// </summary> public class DeleteBusinessReportScheduleResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteBusinessReportScheduleResponse response = new DeleteBusinessReportScheduleResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteBusinessReportScheduleResponseUnmarshaller _instance = new DeleteBusinessReportScheduleResponseUnmarshaller(); internal static DeleteBusinessReportScheduleResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteBusinessReportScheduleResponseUnmarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DeleteConferenceProvider Request Marshaller /// </summary> public class DeleteConferenceProviderRequestMarshaller : IMarshaller<IRequest, DeleteConferenceProviderRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteConferenceProviderRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteConferenceProviderRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DeleteConferenceProvider"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetConferenceProviderArn()) { context.Writer.WritePropertyName("ConferenceProviderArn"); context.Writer.Write(publicRequest.ConferenceProviderArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteConferenceProviderRequestMarshaller _instance = new DeleteConferenceProviderRequestMarshaller(); internal static DeleteConferenceProviderRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteConferenceProviderRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteConferenceProvider operation /// </summary> public class DeleteConferenceProviderResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteConferenceProviderResponse response = new DeleteConferenceProviderResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteConferenceProviderResponseUnmarshaller _instance = new DeleteConferenceProviderResponseUnmarshaller(); internal static DeleteConferenceProviderResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteConferenceProviderResponseUnmarshaller Instance { get { return _instance; } } } }
99
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DeleteContact Request Marshaller /// </summary> public class DeleteContactRequestMarshaller : IMarshaller<IRequest, DeleteContactRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteContactRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteContactRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DeleteContact"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetContactArn()) { context.Writer.WritePropertyName("ContactArn"); context.Writer.Write(publicRequest.ContactArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteContactRequestMarshaller _instance = new DeleteContactRequestMarshaller(); internal static DeleteContactRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteContactRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteContact operation /// </summary> public class DeleteContactResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteContactResponse response = new DeleteContactResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteContactResponseUnmarshaller _instance = new DeleteContactResponseUnmarshaller(); internal static DeleteContactResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteContactResponseUnmarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DeleteDevice Request Marshaller /// </summary> public class DeleteDeviceRequestMarshaller : IMarshaller<IRequest, DeleteDeviceRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteDeviceRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteDeviceRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DeleteDevice"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetDeviceArn()) { context.Writer.WritePropertyName("DeviceArn"); context.Writer.Write(publicRequest.DeviceArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteDeviceRequestMarshaller _instance = new DeleteDeviceRequestMarshaller(); internal static DeleteDeviceRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteDeviceRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteDevice operation /// </summary> public class DeleteDeviceResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteDeviceResponse response = new DeleteDeviceResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidCertificateAuthorityException")) { return InvalidCertificateAuthorityExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteDeviceResponseUnmarshaller _instance = new DeleteDeviceResponseUnmarshaller(); internal static DeleteDeviceResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteDeviceResponseUnmarshaller Instance { get { return _instance; } } } }
107
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DeleteDeviceUsageData Request Marshaller /// </summary> public class DeleteDeviceUsageDataRequestMarshaller : IMarshaller<IRequest, DeleteDeviceUsageDataRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteDeviceUsageDataRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteDeviceUsageDataRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DeleteDeviceUsageData"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetDeviceArn()) { context.Writer.WritePropertyName("DeviceArn"); context.Writer.Write(publicRequest.DeviceArn); } if(publicRequest.IsSetDeviceUsageType()) { context.Writer.WritePropertyName("DeviceUsageType"); context.Writer.Write(publicRequest.DeviceUsageType); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteDeviceUsageDataRequestMarshaller _instance = new DeleteDeviceUsageDataRequestMarshaller(); internal static DeleteDeviceUsageDataRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteDeviceUsageDataRequestMarshaller Instance { get { return _instance; } } } }
109
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteDeviceUsageData operation /// </summary> public class DeleteDeviceUsageDataResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteDeviceUsageDataResponse response = new DeleteDeviceUsageDataResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("DeviceNotRegisteredException")) { return DeviceNotRegisteredExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteDeviceUsageDataResponseUnmarshaller _instance = new DeleteDeviceUsageDataResponseUnmarshaller(); internal static DeleteDeviceUsageDataResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteDeviceUsageDataResponseUnmarshaller Instance { get { return _instance; } } } }
107
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DeleteGatewayGroup Request Marshaller /// </summary> public class DeleteGatewayGroupRequestMarshaller : IMarshaller<IRequest, DeleteGatewayGroupRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteGatewayGroupRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteGatewayGroupRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DeleteGatewayGroup"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetGatewayGroupArn()) { context.Writer.WritePropertyName("GatewayGroupArn"); context.Writer.Write(publicRequest.GatewayGroupArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteGatewayGroupRequestMarshaller _instance = new DeleteGatewayGroupRequestMarshaller(); internal static DeleteGatewayGroupRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteGatewayGroupRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteGatewayGroup operation /// </summary> public class DeleteGatewayGroupResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteGatewayGroupResponse response = new DeleteGatewayGroupResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAssociatedException")) { return ResourceAssociatedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteGatewayGroupResponseUnmarshaller _instance = new DeleteGatewayGroupResponseUnmarshaller(); internal static DeleteGatewayGroupResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteGatewayGroupResponseUnmarshaller Instance { get { return _instance; } } } }
99
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DeleteNetworkProfile Request Marshaller /// </summary> public class DeleteNetworkProfileRequestMarshaller : IMarshaller<IRequest, DeleteNetworkProfileRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteNetworkProfileRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteNetworkProfileRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DeleteNetworkProfile"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetNetworkProfileArn()) { context.Writer.WritePropertyName("NetworkProfileArn"); context.Writer.Write(publicRequest.NetworkProfileArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteNetworkProfileRequestMarshaller _instance = new DeleteNetworkProfileRequestMarshaller(); internal static DeleteNetworkProfileRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteNetworkProfileRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteNetworkProfile operation /// </summary> public class DeleteNetworkProfileResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteNetworkProfileResponse response = new DeleteNetworkProfileResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUseException")) { return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteNetworkProfileResponseUnmarshaller _instance = new DeleteNetworkProfileResponseUnmarshaller(); internal static DeleteNetworkProfileResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteNetworkProfileResponseUnmarshaller Instance { get { return _instance; } } } }
107
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DeleteProfile Request Marshaller /// </summary> public class DeleteProfileRequestMarshaller : IMarshaller<IRequest, DeleteProfileRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteProfileRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteProfileRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DeleteProfile"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetProfileArn()) { context.Writer.WritePropertyName("ProfileArn"); context.Writer.Write(publicRequest.ProfileArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteProfileRequestMarshaller _instance = new DeleteProfileRequestMarshaller(); internal static DeleteProfileRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteProfileRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteProfile operation /// </summary> public class DeleteProfileResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteProfileResponse response = new DeleteProfileResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteProfileResponseUnmarshaller _instance = new DeleteProfileResponseUnmarshaller(); internal static DeleteProfileResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteProfileResponseUnmarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DeleteRoom Request Marshaller /// </summary> public class DeleteRoomRequestMarshaller : IMarshaller<IRequest, DeleteRoomRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteRoomRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteRoomRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DeleteRoom"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetRoomArn()) { context.Writer.WritePropertyName("RoomArn"); context.Writer.Write(publicRequest.RoomArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteRoomRequestMarshaller _instance = new DeleteRoomRequestMarshaller(); internal static DeleteRoomRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteRoomRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteRoom operation /// </summary> public class DeleteRoomResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteRoomResponse response = new DeleteRoomResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteRoomResponseUnmarshaller _instance = new DeleteRoomResponseUnmarshaller(); internal static DeleteRoomResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteRoomResponseUnmarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DeleteRoomSkillParameter Request Marshaller /// </summary> public class DeleteRoomSkillParameterRequestMarshaller : IMarshaller<IRequest, DeleteRoomSkillParameterRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteRoomSkillParameterRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteRoomSkillParameterRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DeleteRoomSkillParameter"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetParameterKey()) { context.Writer.WritePropertyName("ParameterKey"); context.Writer.Write(publicRequest.ParameterKey); } if(publicRequest.IsSetRoomArn()) { context.Writer.WritePropertyName("RoomArn"); context.Writer.Write(publicRequest.RoomArn); } if(publicRequest.IsSetSkillId()) { context.Writer.WritePropertyName("SkillId"); context.Writer.Write(publicRequest.SkillId); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteRoomSkillParameterRequestMarshaller _instance = new DeleteRoomSkillParameterRequestMarshaller(); internal static DeleteRoomSkillParameterRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteRoomSkillParameterRequestMarshaller Instance { get { return _instance; } } } }
115
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteRoomSkillParameter operation /// </summary> public class DeleteRoomSkillParameterResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteRoomSkillParameterResponse response = new DeleteRoomSkillParameterResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteRoomSkillParameterResponseUnmarshaller _instance = new DeleteRoomSkillParameterResponseUnmarshaller(); internal static DeleteRoomSkillParameterResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteRoomSkillParameterResponseUnmarshaller Instance { get { return _instance; } } } }
99
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DeleteSkillAuthorization Request Marshaller /// </summary> public class DeleteSkillAuthorizationRequestMarshaller : IMarshaller<IRequest, DeleteSkillAuthorizationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteSkillAuthorizationRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteSkillAuthorizationRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DeleteSkillAuthorization"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetRoomArn()) { context.Writer.WritePropertyName("RoomArn"); context.Writer.Write(publicRequest.RoomArn); } if(publicRequest.IsSetSkillId()) { context.Writer.WritePropertyName("SkillId"); context.Writer.Write(publicRequest.SkillId); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteSkillAuthorizationRequestMarshaller _instance = new DeleteSkillAuthorizationRequestMarshaller(); internal static DeleteSkillAuthorizationRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteSkillAuthorizationRequestMarshaller Instance { get { return _instance; } } } }
109
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteSkillAuthorization operation /// </summary> public class DeleteSkillAuthorizationResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteSkillAuthorizationResponse response = new DeleteSkillAuthorizationResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteSkillAuthorizationResponseUnmarshaller _instance = new DeleteSkillAuthorizationResponseUnmarshaller(); internal static DeleteSkillAuthorizationResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteSkillAuthorizationResponseUnmarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DeleteSkillGroup Request Marshaller /// </summary> public class DeleteSkillGroupRequestMarshaller : IMarshaller<IRequest, DeleteSkillGroupRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteSkillGroupRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteSkillGroupRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DeleteSkillGroup"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetSkillGroupArn()) { context.Writer.WritePropertyName("SkillGroupArn"); context.Writer.Write(publicRequest.SkillGroupArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteSkillGroupRequestMarshaller _instance = new DeleteSkillGroupRequestMarshaller(); internal static DeleteSkillGroupRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteSkillGroupRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteSkillGroup operation /// </summary> public class DeleteSkillGroupResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteSkillGroupResponse response = new DeleteSkillGroupResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteSkillGroupResponseUnmarshaller _instance = new DeleteSkillGroupResponseUnmarshaller(); internal static DeleteSkillGroupResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteSkillGroupResponseUnmarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DeleteUser Request Marshaller /// </summary> public class DeleteUserRequestMarshaller : IMarshaller<IRequest, DeleteUserRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteUserRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteUserRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DeleteUser"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetEnrollmentId()) { context.Writer.WritePropertyName("EnrollmentId"); context.Writer.Write(publicRequest.EnrollmentId); } if(publicRequest.IsSetUserArn()) { context.Writer.WritePropertyName("UserArn"); context.Writer.Write(publicRequest.UserArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteUserRequestMarshaller _instance = new DeleteUserRequestMarshaller(); internal static DeleteUserRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteUserRequestMarshaller Instance { get { return _instance; } } } }
109
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteUser operation /// </summary> public class DeleteUserResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteUserResponse response = new DeleteUserResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteUserResponseUnmarshaller _instance = new DeleteUserResponseUnmarshaller(); internal static DeleteUserResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteUserResponseUnmarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeveloperInfo Object /// </summary> public class DeveloperInfoUnmarshaller : IUnmarshaller<DeveloperInfo, XmlUnmarshallerContext>, IUnmarshaller<DeveloperInfo, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> DeveloperInfo IUnmarshaller<DeveloperInfo, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DeveloperInfo Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; DeveloperInfo unmarshalledObject = new DeveloperInfo(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("DeveloperName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DeveloperName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Email", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Email = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PrivacyPolicy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.PrivacyPolicy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Url", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Url = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static DeveloperInfoUnmarshaller _instance = new DeveloperInfoUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DeveloperInfoUnmarshaller Instance { get { return _instance; } } } }
110
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeviceData Object /// </summary> public class DeviceDataUnmarshaller : IUnmarshaller<DeviceData, XmlUnmarshallerContext>, IUnmarshaller<DeviceData, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> DeviceData IUnmarshaller<DeviceData, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DeviceData Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; DeviceData unmarshalledObject = new DeviceData(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CreatedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DeviceArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DeviceName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceSerialNumber", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DeviceSerialNumber = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DeviceStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceStatusInfo", targetDepth)) { var unmarshaller = DeviceStatusInfoUnmarshaller.Instance; unmarshalledObject.DeviceStatusInfo = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DeviceType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MacAddress", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.MacAddress = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NetworkProfileArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NetworkProfileArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NetworkProfileName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NetworkProfileName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RoomArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.RoomArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RoomName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.RoomName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SoftwareVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.SoftwareVersion = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static DeviceDataUnmarshaller _instance = new DeviceDataUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DeviceDataUnmarshaller Instance { get { return _instance; } } } }
164
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeviceEvent Object /// </summary> public class DeviceEventUnmarshaller : IUnmarshaller<DeviceEvent, XmlUnmarshallerContext>, IUnmarshaller<DeviceEvent, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> DeviceEvent IUnmarshaller<DeviceEvent, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DeviceEvent Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; DeviceEvent unmarshalledObject = new DeviceEvent(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Timestamp", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.Timestamp = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Type = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Value", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Value = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static DeviceEventUnmarshaller _instance = new DeviceEventUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DeviceEventUnmarshaller Instance { get { return _instance; } } } }
104
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeviceNetworkProfileInfo Object /// </summary> public class DeviceNetworkProfileInfoUnmarshaller : IUnmarshaller<DeviceNetworkProfileInfo, XmlUnmarshallerContext>, IUnmarshaller<DeviceNetworkProfileInfo, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> DeviceNetworkProfileInfo IUnmarshaller<DeviceNetworkProfileInfo, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DeviceNetworkProfileInfo Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; DeviceNetworkProfileInfo unmarshalledObject = new DeviceNetworkProfileInfo(); 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("CertificateExpirationTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CertificateExpirationTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NetworkProfileArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NetworkProfileArn = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static DeviceNetworkProfileInfoUnmarshaller _instance = new DeviceNetworkProfileInfoUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DeviceNetworkProfileInfoUnmarshaller Instance { get { return _instance; } } } }
104
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeviceNotRegisteredException Object /// </summary> public class DeviceNotRegisteredExceptionUnmarshaller : IErrorResponseUnmarshaller<DeviceNotRegisteredException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DeviceNotRegisteredException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public DeviceNotRegisteredException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); DeviceNotRegisteredException unmarshalledObject = new DeviceNotRegisteredException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static DeviceNotRegisteredExceptionUnmarshaller _instance = new DeviceNotRegisteredExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DeviceNotRegisteredExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeviceStatusDetail Object /// </summary> public class DeviceStatusDetailUnmarshaller : IUnmarshaller<DeviceStatusDetail, XmlUnmarshallerContext>, IUnmarshaller<DeviceStatusDetail, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> DeviceStatusDetail IUnmarshaller<DeviceStatusDetail, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DeviceStatusDetail Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; DeviceStatusDetail unmarshalledObject = new DeviceStatusDetail(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Code", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Code = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Feature", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Feature = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static DeviceStatusDetailUnmarshaller _instance = new DeviceStatusDetailUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DeviceStatusDetailUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeviceStatusInfo Object /// </summary> public class DeviceStatusInfoUnmarshaller : IUnmarshaller<DeviceStatusInfo, XmlUnmarshallerContext>, IUnmarshaller<DeviceStatusInfo, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> DeviceStatusInfo IUnmarshaller<DeviceStatusInfo, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DeviceStatusInfo Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; DeviceStatusInfo unmarshalledObject = new DeviceStatusInfo(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ConnectionStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ConnectionStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ConnectionStatusUpdatedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.ConnectionStatusUpdatedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceStatusDetails", targetDepth)) { var unmarshaller = new ListUnmarshaller<DeviceStatusDetail, DeviceStatusDetailUnmarshaller>(DeviceStatusDetailUnmarshaller.Instance); unmarshalledObject.DeviceStatusDetails = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static DeviceStatusInfoUnmarshaller _instance = new DeviceStatusInfoUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DeviceStatusInfoUnmarshaller Instance { get { return _instance; } } } }
104
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Device Object /// </summary> public class DeviceUnmarshaller : IUnmarshaller<Device, XmlUnmarshallerContext>, IUnmarshaller<Device, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Device IUnmarshaller<Device, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public Device Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Device unmarshalledObject = new Device(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("DeviceArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DeviceArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DeviceName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceSerialNumber", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DeviceSerialNumber = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DeviceStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceStatusInfo", targetDepth)) { var unmarshaller = DeviceStatusInfoUnmarshaller.Instance; unmarshalledObject.DeviceStatusInfo = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DeviceType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MacAddress", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.MacAddress = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NetworkProfileInfo", targetDepth)) { var unmarshaller = DeviceNetworkProfileInfoUnmarshaller.Instance; unmarshalledObject.NetworkProfileInfo = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RoomArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.RoomArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SoftwareVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.SoftwareVersion = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static DeviceUnmarshaller _instance = new DeviceUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DeviceUnmarshaller Instance { get { return _instance; } } } }
146
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DisassociateContactFromAddressBook Request Marshaller /// </summary> public class DisassociateContactFromAddressBookRequestMarshaller : IMarshaller<IRequest, DisassociateContactFromAddressBookRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DisassociateContactFromAddressBookRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DisassociateContactFromAddressBookRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DisassociateContactFromAddressBook"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAddressBookArn()) { context.Writer.WritePropertyName("AddressBookArn"); context.Writer.Write(publicRequest.AddressBookArn); } if(publicRequest.IsSetContactArn()) { context.Writer.WritePropertyName("ContactArn"); context.Writer.Write(publicRequest.ContactArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DisassociateContactFromAddressBookRequestMarshaller _instance = new DisassociateContactFromAddressBookRequestMarshaller(); internal static DisassociateContactFromAddressBookRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DisassociateContactFromAddressBookRequestMarshaller Instance { get { return _instance; } } } }
109
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DisassociateContactFromAddressBook operation /// </summary> public class DisassociateContactFromAddressBookResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DisassociateContactFromAddressBookResponse response = new DisassociateContactFromAddressBookResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DisassociateContactFromAddressBookResponseUnmarshaller _instance = new DisassociateContactFromAddressBookResponseUnmarshaller(); internal static DisassociateContactFromAddressBookResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DisassociateContactFromAddressBookResponseUnmarshaller Instance { get { return _instance; } } } }
95
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DisassociateDeviceFromRoom Request Marshaller /// </summary> public class DisassociateDeviceFromRoomRequestMarshaller : IMarshaller<IRequest, DisassociateDeviceFromRoomRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DisassociateDeviceFromRoomRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DisassociateDeviceFromRoomRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DisassociateDeviceFromRoom"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetDeviceArn()) { context.Writer.WritePropertyName("DeviceArn"); context.Writer.Write(publicRequest.DeviceArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DisassociateDeviceFromRoomRequestMarshaller _instance = new DisassociateDeviceFromRoomRequestMarshaller(); internal static DisassociateDeviceFromRoomRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DisassociateDeviceFromRoomRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DisassociateDeviceFromRoom operation /// </summary> public class DisassociateDeviceFromRoomResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DisassociateDeviceFromRoomResponse response = new DisassociateDeviceFromRoomResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DeviceNotRegisteredException")) { return DeviceNotRegisteredExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DisassociateDeviceFromRoomResponseUnmarshaller _instance = new DisassociateDeviceFromRoomResponseUnmarshaller(); internal static DisassociateDeviceFromRoomResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DisassociateDeviceFromRoomResponseUnmarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DisassociateSkillFromSkillGroup Request Marshaller /// </summary> public class DisassociateSkillFromSkillGroupRequestMarshaller : IMarshaller<IRequest, DisassociateSkillFromSkillGroupRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DisassociateSkillFromSkillGroupRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DisassociateSkillFromSkillGroupRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DisassociateSkillFromSkillGroup"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetSkillGroupArn()) { context.Writer.WritePropertyName("SkillGroupArn"); context.Writer.Write(publicRequest.SkillGroupArn); } if(publicRequest.IsSetSkillId()) { context.Writer.WritePropertyName("SkillId"); context.Writer.Write(publicRequest.SkillId); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DisassociateSkillFromSkillGroupRequestMarshaller _instance = new DisassociateSkillFromSkillGroupRequestMarshaller(); internal static DisassociateSkillFromSkillGroupRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DisassociateSkillFromSkillGroupRequestMarshaller Instance { get { return _instance; } } } }
109
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DisassociateSkillFromSkillGroup operation /// </summary> public class DisassociateSkillFromSkillGroupResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DisassociateSkillFromSkillGroupResponse response = new DisassociateSkillFromSkillGroupResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DisassociateSkillFromSkillGroupResponseUnmarshaller _instance = new DisassociateSkillFromSkillGroupResponseUnmarshaller(); internal static DisassociateSkillFromSkillGroupResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DisassociateSkillFromSkillGroupResponseUnmarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DisassociateSkillFromUsers Request Marshaller /// </summary> public class DisassociateSkillFromUsersRequestMarshaller : IMarshaller<IRequest, DisassociateSkillFromUsersRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DisassociateSkillFromUsersRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DisassociateSkillFromUsersRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DisassociateSkillFromUsers"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetSkillId()) { context.Writer.WritePropertyName("SkillId"); context.Writer.Write(publicRequest.SkillId); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DisassociateSkillFromUsersRequestMarshaller _instance = new DisassociateSkillFromUsersRequestMarshaller(); internal static DisassociateSkillFromUsersRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DisassociateSkillFromUsersRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DisassociateSkillFromUsers operation /// </summary> public class DisassociateSkillFromUsersResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DisassociateSkillFromUsersResponse response = new DisassociateSkillFromUsersResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DisassociateSkillFromUsersResponseUnmarshaller _instance = new DisassociateSkillFromUsersResponseUnmarshaller(); internal static DisassociateSkillFromUsersResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DisassociateSkillFromUsersResponseUnmarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// DisassociateSkillGroupFromRoom Request Marshaller /// </summary> public class DisassociateSkillGroupFromRoomRequestMarshaller : IMarshaller<IRequest, DisassociateSkillGroupFromRoomRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DisassociateSkillGroupFromRoomRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DisassociateSkillGroupFromRoomRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.DisassociateSkillGroupFromRoom"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetRoomArn()) { context.Writer.WritePropertyName("RoomArn"); context.Writer.Write(publicRequest.RoomArn); } if(publicRequest.IsSetSkillGroupArn()) { context.Writer.WritePropertyName("SkillGroupArn"); context.Writer.Write(publicRequest.SkillGroupArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DisassociateSkillGroupFromRoomRequestMarshaller _instance = new DisassociateSkillGroupFromRoomRequestMarshaller(); internal static DisassociateSkillGroupFromRoomRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DisassociateSkillGroupFromRoomRequestMarshaller Instance { get { return _instance; } } } }
109
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DisassociateSkillGroupFromRoom operation /// </summary> public class DisassociateSkillGroupFromRoomResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DisassociateSkillGroupFromRoomResponse response = new DisassociateSkillGroupFromRoomResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DisassociateSkillGroupFromRoomResponseUnmarshaller _instance = new DisassociateSkillGroupFromRoomResponseUnmarshaller(); internal static DisassociateSkillGroupFromRoomResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DisassociateSkillGroupFromRoomResponseUnmarshaller Instance { get { return _instance; } } } }
99
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for EndOfMeetingReminder Object /// </summary> public class EndOfMeetingReminderUnmarshaller : IUnmarshaller<EndOfMeetingReminder, XmlUnmarshallerContext>, IUnmarshaller<EndOfMeetingReminder, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> EndOfMeetingReminder IUnmarshaller<EndOfMeetingReminder, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public EndOfMeetingReminder Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; EndOfMeetingReminder unmarshalledObject = new EndOfMeetingReminder(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Enabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.Enabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ReminderAtMinutes", targetDepth)) { var unmarshaller = new ListUnmarshaller<int, IntUnmarshaller>(IntUnmarshaller.Instance); unmarshalledObject.ReminderAtMinutes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ReminderType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ReminderType = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static EndOfMeetingReminderUnmarshaller _instance = new EndOfMeetingReminderUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static EndOfMeetingReminderUnmarshaller Instance { get { return _instance; } } } }
104
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Filter Marshaller /// </summary> public class FilterMarshaller : IRequestMarshaller<Filter, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(Filter requestObject, JsonMarshallerContext context) { if(requestObject.IsSetKey()) { context.Writer.WritePropertyName("Key"); context.Writer.Write(requestObject.Key); } if(requestObject.IsSetValues()) { context.Writer.WritePropertyName("Values"); context.Writer.WriteArrayStart(); foreach(var requestObjectValuesListValue in requestObject.Values) { context.Writer.Write(requestObjectValuesListValue); } context.Writer.WriteArrayEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static FilterMarshaller Instance = new FilterMarshaller(); } }
73
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// ForgetSmartHomeAppliances Request Marshaller /// </summary> public class ForgetSmartHomeAppliancesRequestMarshaller : IMarshaller<IRequest, ForgetSmartHomeAppliancesRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((ForgetSmartHomeAppliancesRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ForgetSmartHomeAppliancesRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.ForgetSmartHomeAppliances"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetRoomArn()) { context.Writer.WritePropertyName("RoomArn"); context.Writer.Write(publicRequest.RoomArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static ForgetSmartHomeAppliancesRequestMarshaller _instance = new ForgetSmartHomeAppliancesRequestMarshaller(); internal static ForgetSmartHomeAppliancesRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ForgetSmartHomeAppliancesRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ForgetSmartHomeAppliances operation /// </summary> public class ForgetSmartHomeAppliancesResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { ForgetSmartHomeAppliancesResponse response = new ForgetSmartHomeAppliancesResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ForgetSmartHomeAppliancesResponseUnmarshaller _instance = new ForgetSmartHomeAppliancesResponseUnmarshaller(); internal static ForgetSmartHomeAppliancesResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ForgetSmartHomeAppliancesResponseUnmarshaller Instance { get { return _instance; } } } }
99
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GatewayGroupSummary Object /// </summary> public class GatewayGroupSummaryUnmarshaller : IUnmarshaller<GatewayGroupSummary, XmlUnmarshallerContext>, IUnmarshaller<GatewayGroupSummary, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GatewayGroupSummary IUnmarshaller<GatewayGroupSummary, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GatewayGroupSummary Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GatewayGroupSummary unmarshalledObject = new GatewayGroupSummary(); 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("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GatewayGroupSummaryUnmarshaller _instance = new GatewayGroupSummaryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GatewayGroupSummaryUnmarshaller Instance { get { return _instance; } } } }
104
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GatewayGroup Object /// </summary> public class GatewayGroupUnmarshaller : IUnmarshaller<GatewayGroup, XmlUnmarshallerContext>, IUnmarshaller<GatewayGroup, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GatewayGroup IUnmarshaller<GatewayGroup, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GatewayGroup Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GatewayGroup unmarshalledObject = new GatewayGroup(); 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("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GatewayGroupUnmarshaller _instance = new GatewayGroupUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GatewayGroupUnmarshaller Instance { get { return _instance; } } } }
104
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GatewaySummary Object /// </summary> public class GatewaySummaryUnmarshaller : IUnmarshaller<GatewaySummary, XmlUnmarshallerContext>, IUnmarshaller<GatewaySummary, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GatewaySummary IUnmarshaller<GatewaySummary, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GatewaySummary Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GatewaySummary unmarshalledObject = new GatewaySummary(); 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("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayGroupArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.GatewayGroupArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SoftwareVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.SoftwareVersion = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GatewaySummaryUnmarshaller _instance = new GatewaySummaryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GatewaySummaryUnmarshaller Instance { get { return _instance; } } } }
116
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Gateway Object /// </summary> public class GatewayUnmarshaller : IUnmarshaller<Gateway, XmlUnmarshallerContext>, IUnmarshaller<Gateway, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Gateway IUnmarshaller<Gateway, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public Gateway Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Gateway unmarshalledObject = new Gateway(); 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("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayGroupArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.GatewayGroupArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SoftwareVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.SoftwareVersion = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GatewayUnmarshaller _instance = new GatewayUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GatewayUnmarshaller Instance { get { return _instance; } } } }
116
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// GetAddressBook Request Marshaller /// </summary> public class GetAddressBookRequestMarshaller : IMarshaller<IRequest, GetAddressBookRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((GetAddressBookRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetAddressBookRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.GetAddressBook"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAddressBookArn()) { context.Writer.WritePropertyName("AddressBookArn"); context.Writer.Write(publicRequest.AddressBookArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static GetAddressBookRequestMarshaller _instance = new GetAddressBookRequestMarshaller(); internal static GetAddressBookRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetAddressBookRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetAddressBook operation /// </summary> public class GetAddressBookResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetAddressBookResponse response = new GetAddressBookResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AddressBook", targetDepth)) { var unmarshaller = AddressBookUnmarshaller.Instance; response.AddressBook = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetAddressBookResponseUnmarshaller _instance = new GetAddressBookResponseUnmarshaller(); internal static GetAddressBookResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetAddressBookResponseUnmarshaller Instance { get { return _instance; } } } }
110
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// GetConferencePreference Request Marshaller /// </summary> public class GetConferencePreferenceRequestMarshaller : IMarshaller<IRequest, GetConferencePreferenceRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((GetConferencePreferenceRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetConferencePreferenceRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.GetConferencePreference"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; var content = "{}"; request.Content = System.Text.Encoding.UTF8.GetBytes(content); return request; } private static GetConferencePreferenceRequestMarshaller _instance = new GetConferencePreferenceRequestMarshaller(); internal static GetConferencePreferenceRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetConferencePreferenceRequestMarshaller Instance { get { return _instance; } } } }
89
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetConferencePreference operation /// </summary> public class GetConferencePreferenceResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetConferencePreferenceResponse response = new GetConferencePreferenceResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Preference", targetDepth)) { var unmarshaller = ConferencePreferenceUnmarshaller.Instance; response.Preference = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetConferencePreferenceResponseUnmarshaller _instance = new GetConferencePreferenceResponseUnmarshaller(); internal static GetConferencePreferenceResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetConferencePreferenceResponseUnmarshaller Instance { get { return _instance; } } } }
110
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// GetConferenceProvider Request Marshaller /// </summary> public class GetConferenceProviderRequestMarshaller : IMarshaller<IRequest, GetConferenceProviderRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((GetConferenceProviderRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetConferenceProviderRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.GetConferenceProvider"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetConferenceProviderArn()) { context.Writer.WritePropertyName("ConferenceProviderArn"); context.Writer.Write(publicRequest.ConferenceProviderArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static GetConferenceProviderRequestMarshaller _instance = new GetConferenceProviderRequestMarshaller(); internal static GetConferenceProviderRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetConferenceProviderRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetConferenceProvider operation /// </summary> public class GetConferenceProviderResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetConferenceProviderResponse response = new GetConferenceProviderResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ConferenceProvider", targetDepth)) { var unmarshaller = ConferenceProviderUnmarshaller.Instance; response.ConferenceProvider = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetConferenceProviderResponseUnmarshaller _instance = new GetConferenceProviderResponseUnmarshaller(); internal static GetConferenceProviderResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetConferenceProviderResponseUnmarshaller Instance { get { return _instance; } } } }
110
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// GetContact Request Marshaller /// </summary> public class GetContactRequestMarshaller : IMarshaller<IRequest, GetContactRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((GetContactRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetContactRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.GetContact"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetContactArn()) { context.Writer.WritePropertyName("ContactArn"); context.Writer.Write(publicRequest.ContactArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static GetContactRequestMarshaller _instance = new GetContactRequestMarshaller(); internal static GetContactRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetContactRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.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.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetContact operation /// </summary> public class GetContactResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetContactResponse response = new GetContactResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Contact", targetDepth)) { var unmarshaller = ContactUnmarshaller.Instance; response.Contact = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAlexaForBusinessException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetContactResponseUnmarshaller _instance = new GetContactResponseUnmarshaller(); internal static GetContactResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetContactResponseUnmarshaller Instance { get { return _instance; } } } }
110
aws-sdk-net
aws
C#
/* * 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 alexaforbusiness-2017-11-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AlexaForBusiness.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AlexaForBusiness.Model.Internal.MarshallTransformations { /// <summary> /// GetDevice Request Marshaller /// </summary> public class GetDeviceRequestMarshaller : IMarshaller<IRequest, GetDeviceRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((GetDeviceRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetDeviceRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AlexaForBusiness"); string target = "AlexaForBusiness.GetDevice"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-11-09"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetDeviceArn()) { context.Writer.WritePropertyName("DeviceArn"); context.Writer.Write(publicRequest.DeviceArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static GetDeviceRequestMarshaller _instance = new GetDeviceRequestMarshaller(); internal static GetDeviceRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetDeviceRequestMarshaller Instance { get { return _instance; } } } }
103