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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ChannelModeratedByAppInstanceUserSummary Object /// </summary> public class ChannelModeratedByAppInstanceUserSummaryUnmarshaller : IUnmarshaller<ChannelModeratedByAppInstanceUserSummary, XmlUnmarshallerContext>, IUnmarshaller<ChannelModeratedByAppInstanceUserSummary, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ChannelModeratedByAppInstanceUserSummary IUnmarshaller<ChannelModeratedByAppInstanceUserSummary, 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 ChannelModeratedByAppInstanceUserSummary Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ChannelModeratedByAppInstanceUserSummary unmarshalledObject = new ChannelModeratedByAppInstanceUserSummary(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelSummary", targetDepth)) { var unmarshaller = ChannelSummaryUnmarshaller.Instance; unmarshalledObject.ChannelSummary = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ChannelModeratedByAppInstanceUserSummaryUnmarshaller _instance = new ChannelModeratedByAppInstanceUserSummaryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ChannelModeratedByAppInstanceUserSummaryUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ChannelModeratorSummary Object /// </summary> public class ChannelModeratorSummaryUnmarshaller : IUnmarshaller<ChannelModeratorSummary, XmlUnmarshallerContext>, IUnmarshaller<ChannelModeratorSummary, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ChannelModeratorSummary IUnmarshaller<ChannelModeratorSummary, 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 ChannelModeratorSummary Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ChannelModeratorSummary unmarshalledObject = new ChannelModeratorSummary(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Moderator", targetDepth)) { var unmarshaller = IdentityUnmarshaller.Instance; unmarshalledObject.Moderator = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ChannelModeratorSummaryUnmarshaller _instance = new ChannelModeratorSummaryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ChannelModeratorSummaryUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ChannelModerator Object /// </summary> public class ChannelModeratorUnmarshaller : IUnmarshaller<ChannelModerator, XmlUnmarshallerContext>, IUnmarshaller<ChannelModerator, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ChannelModerator IUnmarshaller<ChannelModerator, 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 ChannelModerator Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ChannelModerator unmarshalledObject = new ChannelModerator(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ChannelArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreatedBy", targetDepth)) { var unmarshaller = IdentityUnmarshaller.Instance; unmarshalledObject.CreatedBy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreatedTimestamp", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedTimestamp = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Moderator", targetDepth)) { var unmarshaller = IdentityUnmarshaller.Instance; unmarshalledObject.Moderator = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ChannelModeratorUnmarshaller _instance = new ChannelModeratorUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ChannelModeratorUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ChannelSummary Object /// </summary> public class ChannelSummaryUnmarshaller : IUnmarshaller<ChannelSummary, XmlUnmarshallerContext>, IUnmarshaller<ChannelSummary, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ChannelSummary IUnmarshaller<ChannelSummary, 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 ChannelSummary Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ChannelSummary unmarshalledObject = new ChannelSummary(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ChannelArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastMessageTimestamp", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastMessageTimestamp = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Metadata", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Metadata = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Mode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Mode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Privacy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Privacy = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ChannelSummaryUnmarshaller _instance = new ChannelSummaryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ChannelSummaryUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Channel Object /// </summary> public class ChannelUnmarshaller : IUnmarshaller<Channel, XmlUnmarshallerContext>, IUnmarshaller<Channel, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Channel IUnmarshaller<Channel, 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 Channel Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Channel unmarshalledObject = new Channel(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ChannelArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ChannelFlowArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ChannelFlowArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreatedBy", targetDepth)) { var unmarshaller = IdentityUnmarshaller.Instance; unmarshalledObject.CreatedBy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreatedTimestamp", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedTimestamp = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ElasticChannelConfiguration", targetDepth)) { var unmarshaller = ElasticChannelConfigurationUnmarshaller.Instance; unmarshalledObject.ElasticChannelConfiguration = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ExpirationSettings", targetDepth)) { var unmarshaller = ExpirationSettingsUnmarshaller.Instance; unmarshalledObject.ExpirationSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastMessageTimestamp", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastMessageTimestamp = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastUpdatedTimestamp", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastUpdatedTimestamp = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Metadata", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Metadata = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Mode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Mode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Privacy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Privacy = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ChannelUnmarshaller _instance = new ChannelUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ChannelUnmarshaller Instance { get { return _instance; } } } }
158
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ConflictException Object /// </summary> public class ConflictExceptionUnmarshaller : IErrorResponseUnmarshaller<ConflictException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ConflictException 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 ConflictException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); ConflictException unmarshalledObject = new ConflictException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Code", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Code = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ConflictExceptionUnmarshaller _instance = new ConflictExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ConflictExceptionUnmarshaller Instance { get { return _instance; } } } }
91
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// CreateChannelBan Request Marshaller /// </summary> public class CreateChannelBanRequestMarshaller : IMarshaller<IRequest, CreateChannelBanRequest> , 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((CreateChannelBanRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateChannelBanRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "POST"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); request.ResourcePath = "/channels/{channelArn}/bans"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetMemberArn()) { context.Writer.WritePropertyName("MemberArn"); context.Writer.Write(publicRequest.MemberArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } return request; } private static CreateChannelBanRequestMarshaller _instance = new CreateChannelBanRequestMarshaller(); internal static CreateChannelBanRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateChannelBanRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateChannelBan operation /// </summary> public class CreateChannelBanResponseUnmarshaller : 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) { CreateChannelBanResponse response = new CreateChannelBanResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChannelArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Member", targetDepth)) { var unmarshaller = IdentityUnmarshaller.Instance; response.Member = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceLimitExceededException")) { return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateChannelBanResponseUnmarshaller _instance = new CreateChannelBanResponseUnmarshaller(); internal static CreateChannelBanResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateChannelBanResponseUnmarshaller Instance { get { return _instance; } } } }
144
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// CreateChannelFlow Request Marshaller /// </summary> public class CreateChannelFlowRequestMarshaller : IMarshaller<IRequest, CreateChannelFlowRequest> , 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((CreateChannelFlowRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateChannelFlowRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "POST"; request.ResourcePath = "/channel-flows"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAppInstanceArn()) { context.Writer.WritePropertyName("AppInstanceArn"); context.Writer.Write(publicRequest.AppInstanceArn); } 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.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetProcessors()) { context.Writer.WritePropertyName("Processors"); context.Writer.WriteArrayStart(); foreach(var publicRequestProcessorsListValue in publicRequest.Processors) { context.Writer.WriteObjectStart(); var marshaller = ProcessorMarshaller.Instance; marshaller.Marshall(publicRequestProcessorsListValue, 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 CreateChannelFlowRequestMarshaller _instance = new CreateChannelFlowRequestMarshaller(); internal static CreateChannelFlowRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateChannelFlowRequestMarshaller Instance { get { return _instance; } } } }
150
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateChannelFlow operation /// </summary> public class CreateChannelFlowResponseUnmarshaller : 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) { CreateChannelFlowResponse response = new CreateChannelFlowResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelFlowArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChannelFlowArn = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceLimitExceededException")) { return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateChannelFlowResponseUnmarshaller _instance = new CreateChannelFlowResponseUnmarshaller(); internal static CreateChannelFlowResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateChannelFlowResponseUnmarshaller Instance { get { return _instance; } } } }
138
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// CreateChannelMembership Request Marshaller /// </summary> public class CreateChannelMembershipRequestMarshaller : IMarshaller<IRequest, CreateChannelMembershipRequest> , 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((CreateChannelMembershipRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateChannelMembershipRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "POST"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); request.ResourcePath = "/channels/{channelArn}/memberships"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetMemberArn()) { context.Writer.WritePropertyName("MemberArn"); context.Writer.Write(publicRequest.MemberArn); } if(publicRequest.IsSetSubChannelId()) { context.Writer.WritePropertyName("SubChannelId"); context.Writer.Write(publicRequest.SubChannelId); } if(publicRequest.IsSetType()) { context.Writer.WritePropertyName("Type"); context.Writer.Write(publicRequest.Type); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } return request; } private static CreateChannelMembershipRequestMarshaller _instance = new CreateChannelMembershipRequestMarshaller(); internal static CreateChannelMembershipRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateChannelMembershipRequestMarshaller Instance { get { return _instance; } } } }
121
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateChannelMembership operation /// </summary> public class CreateChannelMembershipResponseUnmarshaller : 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) { CreateChannelMembershipResponse response = new CreateChannelMembershipResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChannelArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Member", targetDepth)) { var unmarshaller = IdentityUnmarshaller.Instance; response.Member = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SubChannelId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SubChannelId = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.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("ResourceLimitExceededException")) { return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateChannelMembershipResponseUnmarshaller _instance = new CreateChannelMembershipResponseUnmarshaller(); internal static CreateChannelMembershipResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateChannelMembershipResponseUnmarshaller Instance { get { return _instance; } } } }
154
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// CreateChannelModerator Request Marshaller /// </summary> public class CreateChannelModeratorRequestMarshaller : IMarshaller<IRequest, CreateChannelModeratorRequest> , 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((CreateChannelModeratorRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateChannelModeratorRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "POST"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); request.ResourcePath = "/channels/{channelArn}/moderators"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetChannelModeratorArn()) { context.Writer.WritePropertyName("ChannelModeratorArn"); context.Writer.Write(publicRequest.ChannelModeratorArn); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } return request; } private static CreateChannelModeratorRequestMarshaller _instance = new CreateChannelModeratorRequestMarshaller(); internal static CreateChannelModeratorRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateChannelModeratorRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateChannelModerator operation /// </summary> public class CreateChannelModeratorResponseUnmarshaller : 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) { CreateChannelModeratorResponse response = new CreateChannelModeratorResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChannelArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ChannelModerator", targetDepth)) { var unmarshaller = IdentityUnmarshaller.Instance; response.ChannelModerator = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceLimitExceededException")) { return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateChannelModeratorResponseUnmarshaller _instance = new CreateChannelModeratorResponseUnmarshaller(); internal static CreateChannelModeratorResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateChannelModeratorResponseUnmarshaller Instance { get { return _instance; } } } }
144
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// CreateChannel Request Marshaller /// </summary> public class CreateChannelRequestMarshaller : IMarshaller<IRequest, CreateChannelRequest> , 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((CreateChannelRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateChannelRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "POST"; request.ResourcePath = "/channels"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAppInstanceArn()) { context.Writer.WritePropertyName("AppInstanceArn"); context.Writer.Write(publicRequest.AppInstanceArn); } if(publicRequest.IsSetChannelId()) { context.Writer.WritePropertyName("ChannelId"); context.Writer.Write(publicRequest.ChannelId); } 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.IsSetElasticChannelConfiguration()) { context.Writer.WritePropertyName("ElasticChannelConfiguration"); context.Writer.WriteObjectStart(); var marshaller = ElasticChannelConfigurationMarshaller.Instance; marshaller.Marshall(publicRequest.ElasticChannelConfiguration, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetExpirationSettings()) { context.Writer.WritePropertyName("ExpirationSettings"); context.Writer.WriteObjectStart(); var marshaller = ExpirationSettingsMarshaller.Instance; marshaller.Marshall(publicRequest.ExpirationSettings, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetMemberArns()) { context.Writer.WritePropertyName("MemberArns"); context.Writer.WriteArrayStart(); foreach(var publicRequestMemberArnsListValue in publicRequest.MemberArns) { context.Writer.Write(publicRequestMemberArnsListValue); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetMetadata()) { context.Writer.WritePropertyName("Metadata"); context.Writer.Write(publicRequest.Metadata); } if(publicRequest.IsSetMode()) { context.Writer.WritePropertyName("Mode"); context.Writer.Write(publicRequest.Mode); } if(publicRequest.IsSetModeratorArns()) { context.Writer.WritePropertyName("ModeratorArns"); context.Writer.WriteArrayStart(); foreach(var publicRequestModeratorArnsListValue in publicRequest.ModeratorArns) { context.Writer.Write(publicRequestModeratorArnsListValue); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetPrivacy()) { context.Writer.WritePropertyName("Privacy"); context.Writer.Write(publicRequest.Privacy); } 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); } if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } return request; } private static CreateChannelRequestMarshaller _instance = new CreateChannelRequestMarshaller(); internal static CreateChannelRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateChannelRequestMarshaller Instance { get { return _instance; } } } }
207
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateChannel operation /// </summary> public class CreateChannelResponseUnmarshaller : 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) { CreateChannelResponse response = new CreateChannelResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChannelArn = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceLimitExceededException")) { return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateChannelResponseUnmarshaller _instance = new CreateChannelResponseUnmarshaller(); internal static CreateChannelResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateChannelResponseUnmarshaller Instance { get { return _instance; } } } }
138
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// DeleteChannelBan Request Marshaller /// </summary> public class DeleteChannelBanRequestMarshaller : IMarshaller<IRequest, DeleteChannelBanRequest> , 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((DeleteChannelBanRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteChannelBanRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (!publicRequest.IsSetMemberArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field MemberArn set"); request.AddPathResource("{memberArn}", StringUtils.FromString(publicRequest.MemberArn)); request.ResourcePath = "/channels/{channelArn}/bans/{memberArn}"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } return request; } private static DeleteChannelBanRequestMarshaller _instance = new DeleteChannelBanRequestMarshaller(); internal static DeleteChannelBanRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteChannelBanRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteChannelBan operation /// </summary> public class DeleteChannelBanResponseUnmarshaller : 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) { DeleteChannelBanResponse response = new DeleteChannelBanResponse(); 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteChannelBanResponseUnmarshaller _instance = new DeleteChannelBanResponseUnmarshaller(); internal static DeleteChannelBanResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteChannelBanResponseUnmarshaller Instance { get { return _instance; } } } }
119
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// DeleteChannelFlow Request Marshaller /// </summary> public class DeleteChannelFlowRequestMarshaller : IMarshaller<IRequest, DeleteChannelFlowRequest> , 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((DeleteChannelFlowRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteChannelFlowRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetChannelFlowArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelFlowArn set"); request.AddPathResource("{channelFlowArn}", StringUtils.FromString(publicRequest.ChannelFlowArn)); request.ResourcePath = "/channel-flows/{channelFlowArn}"; return request; } private static DeleteChannelFlowRequestMarshaller _instance = new DeleteChannelFlowRequestMarshaller(); internal static DeleteChannelFlowRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteChannelFlowRequestMarshaller Instance { get { return _instance; } } } }
87
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteChannelFlow operation /// </summary> public class DeleteChannelFlowResponseUnmarshaller : 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) { DeleteChannelFlowResponse response = new DeleteChannelFlowResponse(); 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteChannelFlowResponseUnmarshaller _instance = new DeleteChannelFlowResponseUnmarshaller(); internal static DeleteChannelFlowResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteChannelFlowResponseUnmarshaller Instance { get { return _instance; } } } }
123
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// DeleteChannelMembership Request Marshaller /// </summary> public class DeleteChannelMembershipRequestMarshaller : IMarshaller<IRequest, DeleteChannelMembershipRequest> , 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((DeleteChannelMembershipRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteChannelMembershipRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (!publicRequest.IsSetMemberArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field MemberArn set"); request.AddPathResource("{memberArn}", StringUtils.FromString(publicRequest.MemberArn)); if (publicRequest.IsSetSubChannelId()) request.Parameters.Add("sub-channel-id", StringUtils.FromString(publicRequest.SubChannelId)); request.ResourcePath = "/channels/{channelArn}/memberships/{memberArn}"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } request.UseQueryString = true; return request; } private static DeleteChannelMembershipRequestMarshaller _instance = new DeleteChannelMembershipRequestMarshaller(); internal static DeleteChannelMembershipRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteChannelMembershipRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteChannelMembership operation /// </summary> public class DeleteChannelMembershipResponseUnmarshaller : 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) { DeleteChannelMembershipResponse response = new DeleteChannelMembershipResponse(); 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteChannelMembershipResponseUnmarshaller _instance = new DeleteChannelMembershipResponseUnmarshaller(); internal static DeleteChannelMembershipResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteChannelMembershipResponseUnmarshaller Instance { get { return _instance; } } } }
123
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// DeleteChannelMessage Request Marshaller /// </summary> public class DeleteChannelMessageRequestMarshaller : IMarshaller<IRequest, DeleteChannelMessageRequest> , 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((DeleteChannelMessageRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteChannelMessageRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (!publicRequest.IsSetMessageId()) throw new AmazonChimeSDKMessagingException("Request object does not have required field MessageId set"); request.AddPathResource("{messageId}", StringUtils.FromString(publicRequest.MessageId)); if (publicRequest.IsSetSubChannelId()) request.Parameters.Add("sub-channel-id", StringUtils.FromString(publicRequest.SubChannelId)); request.ResourcePath = "/channels/{channelArn}/messages/{messageId}"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } request.UseQueryString = true; return request; } private static DeleteChannelMessageRequestMarshaller _instance = new DeleteChannelMessageRequestMarshaller(); internal static DeleteChannelMessageRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteChannelMessageRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteChannelMessage operation /// </summary> public class DeleteChannelMessageResponseUnmarshaller : 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) { DeleteChannelMessageResponse response = new DeleteChannelMessageResponse(); 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteChannelMessageResponseUnmarshaller _instance = new DeleteChannelMessageResponseUnmarshaller(); internal static DeleteChannelMessageResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteChannelMessageResponseUnmarshaller Instance { get { return _instance; } } } }
119
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// DeleteChannelModerator Request Marshaller /// </summary> public class DeleteChannelModeratorRequestMarshaller : IMarshaller<IRequest, DeleteChannelModeratorRequest> , 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((DeleteChannelModeratorRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteChannelModeratorRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (!publicRequest.IsSetChannelModeratorArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelModeratorArn set"); request.AddPathResource("{channelModeratorArn}", StringUtils.FromString(publicRequest.ChannelModeratorArn)); request.ResourcePath = "/channels/{channelArn}/moderators/{channelModeratorArn}"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } return request; } private static DeleteChannelModeratorRequestMarshaller _instance = new DeleteChannelModeratorRequestMarshaller(); internal static DeleteChannelModeratorRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteChannelModeratorRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteChannelModerator operation /// </summary> public class DeleteChannelModeratorResponseUnmarshaller : 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) { DeleteChannelModeratorResponse response = new DeleteChannelModeratorResponse(); 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteChannelModeratorResponseUnmarshaller _instance = new DeleteChannelModeratorResponseUnmarshaller(); internal static DeleteChannelModeratorResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteChannelModeratorResponseUnmarshaller Instance { get { return _instance; } } } }
119
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// DeleteChannel Request Marshaller /// </summary> public class DeleteChannelRequestMarshaller : IMarshaller<IRequest, DeleteChannelRequest> , 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((DeleteChannelRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteChannelRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); request.ResourcePath = "/channels/{channelArn}"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } return request; } private static DeleteChannelRequestMarshaller _instance = new DeleteChannelRequestMarshaller(); internal static DeleteChannelRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteChannelRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteChannel operation /// </summary> public class DeleteChannelResponseUnmarshaller : 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) { DeleteChannelResponse response = new DeleteChannelResponse(); 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteChannelResponseUnmarshaller _instance = new DeleteChannelResponseUnmarshaller(); internal static DeleteChannelResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteChannelResponseUnmarshaller Instance { get { return _instance; } } } }
123
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// DeleteMessagingStreamingConfigurations Request Marshaller /// </summary> public class DeleteMessagingStreamingConfigurationsRequestMarshaller : IMarshaller<IRequest, DeleteMessagingStreamingConfigurationsRequest> , 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((DeleteMessagingStreamingConfigurationsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteMessagingStreamingConfigurationsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetAppInstanceArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field AppInstanceArn set"); request.AddPathResource("{appInstanceArn}", StringUtils.FromString(publicRequest.AppInstanceArn)); request.ResourcePath = "/app-instances/{appInstanceArn}/streaming-configurations"; return request; } private static DeleteMessagingStreamingConfigurationsRequestMarshaller _instance = new DeleteMessagingStreamingConfigurationsRequestMarshaller(); internal static DeleteMessagingStreamingConfigurationsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteMessagingStreamingConfigurationsRequestMarshaller Instance { get { return _instance; } } } }
87
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteMessagingStreamingConfigurations operation /// </summary> public class DeleteMessagingStreamingConfigurationsResponseUnmarshaller : 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) { DeleteMessagingStreamingConfigurationsResponse response = new DeleteMessagingStreamingConfigurationsResponse(); 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteMessagingStreamingConfigurationsResponseUnmarshaller _instance = new DeleteMessagingStreamingConfigurationsResponseUnmarshaller(); internal static DeleteMessagingStreamingConfigurationsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteMessagingStreamingConfigurationsResponseUnmarshaller Instance { get { return _instance; } } } }
119
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// DescribeChannelBan Request Marshaller /// </summary> public class DescribeChannelBanRequestMarshaller : IMarshaller<IRequest, DescribeChannelBanRequest> , 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((DescribeChannelBanRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeChannelBanRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (!publicRequest.IsSetMemberArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field MemberArn set"); request.AddPathResource("{memberArn}", StringUtils.FromString(publicRequest.MemberArn)); request.ResourcePath = "/channels/{channelArn}/bans/{memberArn}"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } return request; } private static DescribeChannelBanRequestMarshaller _instance = new DescribeChannelBanRequestMarshaller(); internal static DescribeChannelBanRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChannelBanRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeChannelBan operation /// </summary> public class DescribeChannelBanResponseUnmarshaller : 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) { DescribeChannelBanResponse response = new DescribeChannelBanResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelBan", targetDepth)) { var unmarshaller = ChannelBanUnmarshaller.Instance; response.ChannelBan = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.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("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeChannelBanResponseUnmarshaller _instance = new DescribeChannelBanResponseUnmarshaller(); internal static DescribeChannelBanResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChannelBanResponseUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// DescribeChannelFlow Request Marshaller /// </summary> public class DescribeChannelFlowRequestMarshaller : IMarshaller<IRequest, DescribeChannelFlowRequest> , 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((DescribeChannelFlowRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeChannelFlowRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; if (!publicRequest.IsSetChannelFlowArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelFlowArn set"); request.AddPathResource("{channelFlowArn}", StringUtils.FromString(publicRequest.ChannelFlowArn)); request.ResourcePath = "/channel-flows/{channelFlowArn}"; return request; } private static DescribeChannelFlowRequestMarshaller _instance = new DescribeChannelFlowRequestMarshaller(); internal static DescribeChannelFlowRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChannelFlowRequestMarshaller Instance { get { return _instance; } } } }
87
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeChannelFlow operation /// </summary> public class DescribeChannelFlowResponseUnmarshaller : 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) { DescribeChannelFlowResponse response = new DescribeChannelFlowResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelFlow", targetDepth)) { var unmarshaller = ChannelFlowUnmarshaller.Instance; response.ChannelFlow = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeChannelFlowResponseUnmarshaller _instance = new DescribeChannelFlowResponseUnmarshaller(); internal static DescribeChannelFlowResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChannelFlowResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// DescribeChannelMembershipForAppInstanceUser Request Marshaller /// </summary> public class DescribeChannelMembershipForAppInstanceUserRequestMarshaller : IMarshaller<IRequest, DescribeChannelMembershipForAppInstanceUserRequest> , 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((DescribeChannelMembershipForAppInstanceUserRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeChannelMembershipForAppInstanceUserRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; request.AddSubResource("scope", "app-instance-user-membership"); if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (publicRequest.IsSetAppInstanceUserArn()) request.Parameters.Add("app-instance-user-arn", StringUtils.FromString(publicRequest.AppInstanceUserArn)); request.ResourcePath = "/channels/{channelArn}"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } request.UseQueryString = true; return request; } private static DescribeChannelMembershipForAppInstanceUserRequestMarshaller _instance = new DescribeChannelMembershipForAppInstanceUserRequestMarshaller(); internal static DescribeChannelMembershipForAppInstanceUserRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChannelMembershipForAppInstanceUserRequestMarshaller Instance { get { return _instance; } } } }
97
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeChannelMembershipForAppInstanceUser operation /// </summary> public class DescribeChannelMembershipForAppInstanceUserResponseUnmarshaller : 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) { DescribeChannelMembershipForAppInstanceUserResponse response = new DescribeChannelMembershipForAppInstanceUserResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelMembership", targetDepth)) { var unmarshaller = ChannelMembershipForAppInstanceUserSummaryUnmarshaller.Instance; response.ChannelMembership = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeChannelMembershipForAppInstanceUserResponseUnmarshaller _instance = new DescribeChannelMembershipForAppInstanceUserResponseUnmarshaller(); internal static DescribeChannelMembershipForAppInstanceUserResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChannelMembershipForAppInstanceUserResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// DescribeChannelMembership Request Marshaller /// </summary> public class DescribeChannelMembershipRequestMarshaller : IMarshaller<IRequest, DescribeChannelMembershipRequest> , 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((DescribeChannelMembershipRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeChannelMembershipRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (!publicRequest.IsSetMemberArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field MemberArn set"); request.AddPathResource("{memberArn}", StringUtils.FromString(publicRequest.MemberArn)); if (publicRequest.IsSetSubChannelId()) request.Parameters.Add("sub-channel-id", StringUtils.FromString(publicRequest.SubChannelId)); request.ResourcePath = "/channels/{channelArn}/memberships/{memberArn}"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } request.UseQueryString = true; return request; } private static DescribeChannelMembershipRequestMarshaller _instance = new DescribeChannelMembershipRequestMarshaller(); internal static DescribeChannelMembershipRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChannelMembershipRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeChannelMembership operation /// </summary> public class DescribeChannelMembershipResponseUnmarshaller : 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) { DescribeChannelMembershipResponse response = new DescribeChannelMembershipResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelMembership", targetDepth)) { var unmarshaller = ChannelMembershipUnmarshaller.Instance; response.ChannelMembership = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.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("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeChannelMembershipResponseUnmarshaller _instance = new DescribeChannelMembershipResponseUnmarshaller(); internal static DescribeChannelMembershipResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChannelMembershipResponseUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// DescribeChannelModeratedByAppInstanceUser Request Marshaller /// </summary> public class DescribeChannelModeratedByAppInstanceUserRequestMarshaller : IMarshaller<IRequest, DescribeChannelModeratedByAppInstanceUserRequest> , 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((DescribeChannelModeratedByAppInstanceUserRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeChannelModeratedByAppInstanceUserRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; request.AddSubResource("scope", "app-instance-user-moderated-channel"); if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (publicRequest.IsSetAppInstanceUserArn()) request.Parameters.Add("app-instance-user-arn", StringUtils.FromString(publicRequest.AppInstanceUserArn)); request.ResourcePath = "/channels/{channelArn}"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } request.UseQueryString = true; return request; } private static DescribeChannelModeratedByAppInstanceUserRequestMarshaller _instance = new DescribeChannelModeratedByAppInstanceUserRequestMarshaller(); internal static DescribeChannelModeratedByAppInstanceUserRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChannelModeratedByAppInstanceUserRequestMarshaller Instance { get { return _instance; } } } }
97
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeChannelModeratedByAppInstanceUser operation /// </summary> public class DescribeChannelModeratedByAppInstanceUserResponseUnmarshaller : 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) { DescribeChannelModeratedByAppInstanceUserResponse response = new DescribeChannelModeratedByAppInstanceUserResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Channel", targetDepth)) { var unmarshaller = ChannelModeratedByAppInstanceUserSummaryUnmarshaller.Instance; response.Channel = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeChannelModeratedByAppInstanceUserResponseUnmarshaller _instance = new DescribeChannelModeratedByAppInstanceUserResponseUnmarshaller(); internal static DescribeChannelModeratedByAppInstanceUserResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChannelModeratedByAppInstanceUserResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// DescribeChannelModerator Request Marshaller /// </summary> public class DescribeChannelModeratorRequestMarshaller : IMarshaller<IRequest, DescribeChannelModeratorRequest> , 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((DescribeChannelModeratorRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeChannelModeratorRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (!publicRequest.IsSetChannelModeratorArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelModeratorArn set"); request.AddPathResource("{channelModeratorArn}", StringUtils.FromString(publicRequest.ChannelModeratorArn)); request.ResourcePath = "/channels/{channelArn}/moderators/{channelModeratorArn}"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } return request; } private static DescribeChannelModeratorRequestMarshaller _instance = new DescribeChannelModeratorRequestMarshaller(); internal static DescribeChannelModeratorRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChannelModeratorRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeChannelModerator operation /// </summary> public class DescribeChannelModeratorResponseUnmarshaller : 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) { DescribeChannelModeratorResponse response = new DescribeChannelModeratorResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelModerator", targetDepth)) { var unmarshaller = ChannelModeratorUnmarshaller.Instance; response.ChannelModerator = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.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("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeChannelModeratorResponseUnmarshaller _instance = new DescribeChannelModeratorResponseUnmarshaller(); internal static DescribeChannelModeratorResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChannelModeratorResponseUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// DescribeChannel Request Marshaller /// </summary> public class DescribeChannelRequestMarshaller : IMarshaller<IRequest, DescribeChannelRequest> , 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((DescribeChannelRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeChannelRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); request.ResourcePath = "/channels/{channelArn}"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } return request; } private static DescribeChannelRequestMarshaller _instance = new DescribeChannelRequestMarshaller(); internal static DescribeChannelRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChannelRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeChannel operation /// </summary> public class DescribeChannelResponseUnmarshaller : 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) { DescribeChannelResponse response = new DescribeChannelResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Channel", targetDepth)) { var unmarshaller = ChannelUnmarshaller.Instance; response.Channel = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeChannelResponseUnmarshaller _instance = new DescribeChannelResponseUnmarshaller(); internal static DescribeChannelResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeChannelResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// DisassociateChannelFlow Request Marshaller /// </summary> public class DisassociateChannelFlowRequestMarshaller : IMarshaller<IRequest, DisassociateChannelFlowRequest> , 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((DisassociateChannelFlowRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DisassociateChannelFlowRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (!publicRequest.IsSetChannelFlowArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelFlowArn set"); request.AddPathResource("{channelFlowArn}", StringUtils.FromString(publicRequest.ChannelFlowArn)); request.ResourcePath = "/channels/{channelArn}/channel-flow/{channelFlowArn}"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } return request; } private static DisassociateChannelFlowRequestMarshaller _instance = new DisassociateChannelFlowRequestMarshaller(); internal static DisassociateChannelFlowRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DisassociateChannelFlowRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DisassociateChannelFlow operation /// </summary> public class DisassociateChannelFlowResponseUnmarshaller : 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) { DisassociateChannelFlowResponse response = new DisassociateChannelFlowResponse(); 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.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("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DisassociateChannelFlowResponseUnmarshaller _instance = new DisassociateChannelFlowResponseUnmarshaller(); internal static DisassociateChannelFlowResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DisassociateChannelFlowResponseUnmarshaller Instance { get { return _instance; } } } }
127
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// ElasticChannelConfiguration Marshaller /// </summary> public class ElasticChannelConfigurationMarshaller : IRequestMarshaller<ElasticChannelConfiguration, 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(ElasticChannelConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetMaximumSubChannels()) { context.Writer.WritePropertyName("MaximumSubChannels"); context.Writer.Write(requestObject.MaximumSubChannels); } if(requestObject.IsSetMinimumMembershipPercentage()) { context.Writer.WritePropertyName("MinimumMembershipPercentage"); context.Writer.Write(requestObject.MinimumMembershipPercentage); } if(requestObject.IsSetTargetMembershipsPerSubChannel()) { context.Writer.WritePropertyName("TargetMembershipsPerSubChannel"); context.Writer.Write(requestObject.TargetMembershipsPerSubChannel); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static ElasticChannelConfigurationMarshaller Instance = new ElasticChannelConfigurationMarshaller(); } }
74
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ElasticChannelConfiguration Object /// </summary> public class ElasticChannelConfigurationUnmarshaller : IUnmarshaller<ElasticChannelConfiguration, XmlUnmarshallerContext>, IUnmarshaller<ElasticChannelConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ElasticChannelConfiguration IUnmarshaller<ElasticChannelConfiguration, 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 ElasticChannelConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ElasticChannelConfiguration unmarshalledObject = new ElasticChannelConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("MaximumSubChannels", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.MaximumSubChannels = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MinimumMembershipPercentage", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.MinimumMembershipPercentage = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TargetMembershipsPerSubChannel", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.TargetMembershipsPerSubChannel = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ElasticChannelConfigurationUnmarshaller _instance = new ElasticChannelConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ElasticChannelConfigurationUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// ExpirationSettings Marshaller /// </summary> public class ExpirationSettingsMarshaller : IRequestMarshaller<ExpirationSettings, 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(ExpirationSettings requestObject, JsonMarshallerContext context) { if(requestObject.IsSetExpirationCriterion()) { context.Writer.WritePropertyName("ExpirationCriterion"); context.Writer.Write(requestObject.ExpirationCriterion); } if(requestObject.IsSetExpirationDays()) { context.Writer.WritePropertyName("ExpirationDays"); context.Writer.Write(requestObject.ExpirationDays); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static ExpirationSettingsMarshaller Instance = new ExpirationSettingsMarshaller(); } }
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ExpirationSettings Object /// </summary> public class ExpirationSettingsUnmarshaller : IUnmarshaller<ExpirationSettings, XmlUnmarshallerContext>, IUnmarshaller<ExpirationSettings, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ExpirationSettings IUnmarshaller<ExpirationSettings, 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 ExpirationSettings Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ExpirationSettings unmarshalledObject = new ExpirationSettings(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ExpirationCriterion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ExpirationCriterion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ExpirationDays", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.ExpirationDays = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ExpirationSettingsUnmarshaller _instance = new ExpirationSettingsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ExpirationSettingsUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ForbiddenException Object /// </summary> public class ForbiddenExceptionUnmarshaller : IErrorResponseUnmarshaller<ForbiddenException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ForbiddenException 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 ForbiddenException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); ForbiddenException unmarshalledObject = new ForbiddenException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Code", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Code = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ForbiddenExceptionUnmarshaller _instance = new ForbiddenExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ForbiddenExceptionUnmarshaller Instance { get { return _instance; } } } }
91
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// GetChannelMembershipPreferences Request Marshaller /// </summary> public class GetChannelMembershipPreferencesRequestMarshaller : IMarshaller<IRequest, GetChannelMembershipPreferencesRequest> , 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((GetChannelMembershipPreferencesRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetChannelMembershipPreferencesRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (!publicRequest.IsSetMemberArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field MemberArn set"); request.AddPathResource("{memberArn}", StringUtils.FromString(publicRequest.MemberArn)); request.ResourcePath = "/channels/{channelArn}/memberships/{memberArn}/preferences"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } return request; } private static GetChannelMembershipPreferencesRequestMarshaller _instance = new GetChannelMembershipPreferencesRequestMarshaller(); internal static GetChannelMembershipPreferencesRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetChannelMembershipPreferencesRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetChannelMembershipPreferences operation /// </summary> public class GetChannelMembershipPreferencesResponseUnmarshaller : 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) { GetChannelMembershipPreferencesResponse response = new GetChannelMembershipPreferencesResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChannelArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Member", targetDepth)) { var unmarshaller = IdentityUnmarshaller.Instance; response.Member = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Preferences", targetDepth)) { var unmarshaller = ChannelMembershipPreferencesUnmarshaller.Instance; response.Preferences = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetChannelMembershipPreferencesResponseUnmarshaller _instance = new GetChannelMembershipPreferencesResponseUnmarshaller(); internal static GetChannelMembershipPreferencesResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetChannelMembershipPreferencesResponseUnmarshaller Instance { get { return _instance; } } } }
142
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// GetChannelMessage Request Marshaller /// </summary> public class GetChannelMessageRequestMarshaller : IMarshaller<IRequest, GetChannelMessageRequest> , 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((GetChannelMessageRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetChannelMessageRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (!publicRequest.IsSetMessageId()) throw new AmazonChimeSDKMessagingException("Request object does not have required field MessageId set"); request.AddPathResource("{messageId}", StringUtils.FromString(publicRequest.MessageId)); if (publicRequest.IsSetSubChannelId()) request.Parameters.Add("sub-channel-id", StringUtils.FromString(publicRequest.SubChannelId)); request.ResourcePath = "/channels/{channelArn}/messages/{messageId}"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } request.UseQueryString = true; return request; } private static GetChannelMessageRequestMarshaller _instance = new GetChannelMessageRequestMarshaller(); internal static GetChannelMessageRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetChannelMessageRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetChannelMessage operation /// </summary> public class GetChannelMessageResponseUnmarshaller : 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) { GetChannelMessageResponse response = new GetChannelMessageResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelMessage", targetDepth)) { var unmarshaller = ChannelMessageUnmarshaller.Instance; response.ChannelMessage = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.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("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetChannelMessageResponseUnmarshaller _instance = new GetChannelMessageResponseUnmarshaller(); internal static GetChannelMessageResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetChannelMessageResponseUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// GetChannelMessageStatus Request Marshaller /// </summary> public class GetChannelMessageStatusRequestMarshaller : IMarshaller<IRequest, GetChannelMessageStatusRequest> , 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((GetChannelMessageStatusRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetChannelMessageStatusRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; request.AddSubResource("scope", "message-status"); if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (!publicRequest.IsSetMessageId()) throw new AmazonChimeSDKMessagingException("Request object does not have required field MessageId set"); request.AddPathResource("{messageId}", StringUtils.FromString(publicRequest.MessageId)); if (publicRequest.IsSetSubChannelId()) request.Parameters.Add("sub-channel-id", StringUtils.FromString(publicRequest.SubChannelId)); request.ResourcePath = "/channels/{channelArn}/messages/{messageId}"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } request.UseQueryString = true; return request; } private static GetChannelMessageStatusRequestMarshaller _instance = new GetChannelMessageStatusRequestMarshaller(); internal static GetChannelMessageStatusRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetChannelMessageStatusRequestMarshaller Instance { get { return _instance; } } } }
100
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetChannelMessageStatus operation /// </summary> public class GetChannelMessageStatusResponseUnmarshaller : 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) { GetChannelMessageStatusResponse response = new GetChannelMessageStatusResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Status", targetDepth)) { var unmarshaller = ChannelMessageStatusStructureUnmarshaller.Instance; response.Status = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetChannelMessageStatusResponseUnmarshaller _instance = new GetChannelMessageStatusResponseUnmarshaller(); internal static GetChannelMessageStatusResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetChannelMessageStatusResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// GetMessagingSessionEndpoint Request Marshaller /// </summary> public class GetMessagingSessionEndpointRequestMarshaller : IMarshaller<IRequest, GetMessagingSessionEndpointRequest> , 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((GetMessagingSessionEndpointRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetMessagingSessionEndpointRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; request.ResourcePath = "/endpoints/messaging-session"; return request; } private static GetMessagingSessionEndpointRequestMarshaller _instance = new GetMessagingSessionEndpointRequestMarshaller(); internal static GetMessagingSessionEndpointRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetMessagingSessionEndpointRequestMarshaller Instance { get { return _instance; } } } }
84
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetMessagingSessionEndpoint operation /// </summary> public class GetMessagingSessionEndpointResponseUnmarshaller : 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) { GetMessagingSessionEndpointResponse response = new GetMessagingSessionEndpointResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Endpoint", targetDepth)) { var unmarshaller = MessagingSessionEndpointUnmarshaller.Instance; response.Endpoint = 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("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetMessagingSessionEndpointResponseUnmarshaller _instance = new GetMessagingSessionEndpointResponseUnmarshaller(); internal static GetMessagingSessionEndpointResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetMessagingSessionEndpointResponseUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// GetMessagingStreamingConfigurations Request Marshaller /// </summary> public class GetMessagingStreamingConfigurationsRequestMarshaller : IMarshaller<IRequest, GetMessagingStreamingConfigurationsRequest> , 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((GetMessagingStreamingConfigurationsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetMessagingStreamingConfigurationsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; if (!publicRequest.IsSetAppInstanceArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field AppInstanceArn set"); request.AddPathResource("{appInstanceArn}", StringUtils.FromString(publicRequest.AppInstanceArn)); request.ResourcePath = "/app-instances/{appInstanceArn}/streaming-configurations"; return request; } private static GetMessagingStreamingConfigurationsRequestMarshaller _instance = new GetMessagingStreamingConfigurationsRequestMarshaller(); internal static GetMessagingStreamingConfigurationsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetMessagingStreamingConfigurationsRequestMarshaller Instance { get { return _instance; } } } }
87
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetMessagingStreamingConfigurations operation /// </summary> public class GetMessagingStreamingConfigurationsResponseUnmarshaller : 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) { GetMessagingStreamingConfigurationsResponse response = new GetMessagingStreamingConfigurationsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("StreamingConfigurations", targetDepth)) { var unmarshaller = new ListUnmarshaller<StreamingConfiguration, StreamingConfigurationUnmarshaller>(StreamingConfigurationUnmarshaller.Instance); response.StreamingConfigurations = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.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("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetMessagingStreamingConfigurationsResponseUnmarshaller _instance = new GetMessagingStreamingConfigurationsResponseUnmarshaller(); internal static GetMessagingStreamingConfigurationsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetMessagingStreamingConfigurationsResponseUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Identity Object /// </summary> public class IdentityUnmarshaller : IUnmarshaller<Identity, XmlUnmarshallerContext>, IUnmarshaller<Identity, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Identity IUnmarshaller<Identity, 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 Identity Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Identity unmarshalledObject = new Identity(); 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("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static IdentityUnmarshaller _instance = new IdentityUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static IdentityUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// LambdaConfiguration Marshaller /// </summary> public class LambdaConfigurationMarshaller : IRequestMarshaller<LambdaConfiguration, 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(LambdaConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetInvocationType()) { context.Writer.WritePropertyName("InvocationType"); context.Writer.Write(requestObject.InvocationType); } if(requestObject.IsSetResourceArn()) { context.Writer.WritePropertyName("ResourceArn"); context.Writer.Write(requestObject.ResourceArn); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static LambdaConfigurationMarshaller Instance = new LambdaConfigurationMarshaller(); } }
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for LambdaConfiguration Object /// </summary> public class LambdaConfigurationUnmarshaller : IUnmarshaller<LambdaConfiguration, XmlUnmarshallerContext>, IUnmarshaller<LambdaConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> LambdaConfiguration IUnmarshaller<LambdaConfiguration, 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 LambdaConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; LambdaConfiguration unmarshalledObject = new LambdaConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("InvocationType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.InvocationType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ResourceArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceArn = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static LambdaConfigurationUnmarshaller _instance = new LambdaConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static LambdaConfigurationUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// ListChannelBans Request Marshaller /// </summary> public class ListChannelBansRequestMarshaller : IMarshaller<IRequest, ListChannelBansRequest> , 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((ListChannelBansRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListChannelBansRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (publicRequest.IsSetMaxResults()) request.Parameters.Add("max-results", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("next-token", StringUtils.FromString(publicRequest.NextToken)); request.ResourcePath = "/channels/{channelArn}/bans"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } request.UseQueryString = true; return request; } private static ListChannelBansRequestMarshaller _instance = new ListChannelBansRequestMarshaller(); internal static ListChannelBansRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelBansRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListChannelBans operation /// </summary> public class ListChannelBansResponseUnmarshaller : 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) { ListChannelBansResponse response = new ListChannelBansResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChannelArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ChannelBans", targetDepth)) { var unmarshaller = new ListUnmarshaller<ChannelBanSummary, ChannelBanSummaryUnmarshaller>(ChannelBanSummaryUnmarshaller.Instance); response.ChannelBans = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListChannelBansResponseUnmarshaller _instance = new ListChannelBansResponseUnmarshaller(); internal static ListChannelBansResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelBansResponseUnmarshaller Instance { get { return _instance; } } } }
142
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// ListChannelFlows Request Marshaller /// </summary> public class ListChannelFlowsRequestMarshaller : IMarshaller<IRequest, ListChannelFlowsRequest> , 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((ListChannelFlowsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListChannelFlowsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; if (publicRequest.IsSetAppInstanceArn()) request.Parameters.Add("app-instance-arn", StringUtils.FromString(publicRequest.AppInstanceArn)); if (publicRequest.IsSetMaxResults()) request.Parameters.Add("max-results", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("next-token", StringUtils.FromString(publicRequest.NextToken)); request.ResourcePath = "/channel-flows"; request.UseQueryString = true; return request; } private static ListChannelFlowsRequestMarshaller _instance = new ListChannelFlowsRequestMarshaller(); internal static ListChannelFlowsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelFlowsRequestMarshaller Instance { get { return _instance; } } } }
94
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListChannelFlows operation /// </summary> public class ListChannelFlowsResponseUnmarshaller : 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) { ListChannelFlowsResponse response = new ListChannelFlowsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelFlows", targetDepth)) { var unmarshaller = new ListUnmarshaller<ChannelFlowSummary, ChannelFlowSummaryUnmarshaller>(ChannelFlowSummaryUnmarshaller.Instance); response.ChannelFlows = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListChannelFlowsResponseUnmarshaller _instance = new ListChannelFlowsResponseUnmarshaller(); internal static ListChannelFlowsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelFlowsResponseUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// ListChannelMembershipsForAppInstanceUser Request Marshaller /// </summary> public class ListChannelMembershipsForAppInstanceUserRequestMarshaller : IMarshaller<IRequest, ListChannelMembershipsForAppInstanceUserRequest> , 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((ListChannelMembershipsForAppInstanceUserRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListChannelMembershipsForAppInstanceUserRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; request.AddSubResource("scope", "app-instance-user-memberships"); if (publicRequest.IsSetAppInstanceUserArn()) request.Parameters.Add("app-instance-user-arn", StringUtils.FromString(publicRequest.AppInstanceUserArn)); if (publicRequest.IsSetMaxResults()) request.Parameters.Add("max-results", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("next-token", StringUtils.FromString(publicRequest.NextToken)); request.ResourcePath = "/channels"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } request.UseQueryString = true; return request; } private static ListChannelMembershipsForAppInstanceUserRequestMarshaller _instance = new ListChannelMembershipsForAppInstanceUserRequestMarshaller(); internal static ListChannelMembershipsForAppInstanceUserRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelMembershipsForAppInstanceUserRequestMarshaller Instance { get { return _instance; } } } }
100
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListChannelMembershipsForAppInstanceUser operation /// </summary> public class ListChannelMembershipsForAppInstanceUserResponseUnmarshaller : 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) { ListChannelMembershipsForAppInstanceUserResponse response = new ListChannelMembershipsForAppInstanceUserResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelMemberships", targetDepth)) { var unmarshaller = new ListUnmarshaller<ChannelMembershipForAppInstanceUserSummary, ChannelMembershipForAppInstanceUserSummaryUnmarshaller>(ChannelMembershipForAppInstanceUserSummaryUnmarshaller.Instance); response.ChannelMemberships = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListChannelMembershipsForAppInstanceUserResponseUnmarshaller _instance = new ListChannelMembershipsForAppInstanceUserResponseUnmarshaller(); internal static ListChannelMembershipsForAppInstanceUserResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelMembershipsForAppInstanceUserResponseUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// ListChannelMemberships Request Marshaller /// </summary> public class ListChannelMembershipsRequestMarshaller : IMarshaller<IRequest, ListChannelMembershipsRequest> , 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((ListChannelMembershipsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListChannelMembershipsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (publicRequest.IsSetMaxResults()) request.Parameters.Add("max-results", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("next-token", StringUtils.FromString(publicRequest.NextToken)); if (publicRequest.IsSetSubChannelId()) request.Parameters.Add("sub-channel-id", StringUtils.FromString(publicRequest.SubChannelId)); if (publicRequest.IsSetType()) request.Parameters.Add("type", StringUtils.FromString(publicRequest.Type)); request.ResourcePath = "/channels/{channelArn}/memberships"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } request.UseQueryString = true; return request; } private static ListChannelMembershipsRequestMarshaller _instance = new ListChannelMembershipsRequestMarshaller(); internal static ListChannelMembershipsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelMembershipsRequestMarshaller Instance { get { return _instance; } } } }
105
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListChannelMemberships operation /// </summary> public class ListChannelMembershipsResponseUnmarshaller : 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) { ListChannelMembershipsResponse response = new ListChannelMembershipsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChannelArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ChannelMemberships", targetDepth)) { var unmarshaller = new ListUnmarshaller<ChannelMembershipSummary, ChannelMembershipSummaryUnmarshaller>(ChannelMembershipSummaryUnmarshaller.Instance); response.ChannelMemberships = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListChannelMembershipsResponseUnmarshaller _instance = new ListChannelMembershipsResponseUnmarshaller(); internal static ListChannelMembershipsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelMembershipsResponseUnmarshaller Instance { get { return _instance; } } } }
142
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// ListChannelMessages Request Marshaller /// </summary> public class ListChannelMessagesRequestMarshaller : IMarshaller<IRequest, ListChannelMessagesRequest> , 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((ListChannelMessagesRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListChannelMessagesRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (publicRequest.IsSetMaxResults()) request.Parameters.Add("max-results", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("next-token", StringUtils.FromString(publicRequest.NextToken)); if (publicRequest.IsSetNotAfter()) request.Parameters.Add("not-after", StringUtils.FromDateTimeToISO8601(publicRequest.NotAfter)); if (publicRequest.IsSetNotBefore()) request.Parameters.Add("not-before", StringUtils.FromDateTimeToISO8601(publicRequest.NotBefore)); if (publicRequest.IsSetSortOrder()) request.Parameters.Add("sort-order", StringUtils.FromString(publicRequest.SortOrder)); if (publicRequest.IsSetSubChannelId()) request.Parameters.Add("sub-channel-id", StringUtils.FromString(publicRequest.SubChannelId)); request.ResourcePath = "/channels/{channelArn}/messages"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } request.UseQueryString = true; return request; } private static ListChannelMessagesRequestMarshaller _instance = new ListChannelMessagesRequestMarshaller(); internal static ListChannelMessagesRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelMessagesRequestMarshaller Instance { get { return _instance; } } } }
111
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListChannelMessages operation /// </summary> public class ListChannelMessagesResponseUnmarshaller : 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) { ListChannelMessagesResponse response = new ListChannelMessagesResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChannelArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ChannelMessages", targetDepth)) { var unmarshaller = new ListUnmarshaller<ChannelMessageSummary, ChannelMessageSummaryUnmarshaller>(ChannelMessageSummaryUnmarshaller.Instance); response.ChannelMessages = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SubChannelId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SubChannelId = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListChannelMessagesResponseUnmarshaller _instance = new ListChannelMessagesResponseUnmarshaller(); internal static ListChannelMessagesResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelMessagesResponseUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// ListChannelModerators Request Marshaller /// </summary> public class ListChannelModeratorsRequestMarshaller : IMarshaller<IRequest, ListChannelModeratorsRequest> , 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((ListChannelModeratorsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListChannelModeratorsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (publicRequest.IsSetMaxResults()) request.Parameters.Add("max-results", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("next-token", StringUtils.FromString(publicRequest.NextToken)); request.ResourcePath = "/channels/{channelArn}/moderators"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } request.UseQueryString = true; return request; } private static ListChannelModeratorsRequestMarshaller _instance = new ListChannelModeratorsRequestMarshaller(); internal static ListChannelModeratorsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelModeratorsRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListChannelModerators operation /// </summary> public class ListChannelModeratorsResponseUnmarshaller : 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) { ListChannelModeratorsResponse response = new ListChannelModeratorsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChannelArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ChannelModerators", targetDepth)) { var unmarshaller = new ListUnmarshaller<ChannelModeratorSummary, ChannelModeratorSummaryUnmarshaller>(ChannelModeratorSummaryUnmarshaller.Instance); response.ChannelModerators = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListChannelModeratorsResponseUnmarshaller _instance = new ListChannelModeratorsResponseUnmarshaller(); internal static ListChannelModeratorsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelModeratorsResponseUnmarshaller Instance { get { return _instance; } } } }
142
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// ListChannelsAssociatedWithChannelFlow Request Marshaller /// </summary> public class ListChannelsAssociatedWithChannelFlowRequestMarshaller : IMarshaller<IRequest, ListChannelsAssociatedWithChannelFlowRequest> , 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((ListChannelsAssociatedWithChannelFlowRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListChannelsAssociatedWithChannelFlowRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; request.AddSubResource("scope", "channel-flow-associations"); if (publicRequest.IsSetChannelFlowArn()) request.Parameters.Add("channel-flow-arn", StringUtils.FromString(publicRequest.ChannelFlowArn)); if (publicRequest.IsSetMaxResults()) request.Parameters.Add("max-results", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("next-token", StringUtils.FromString(publicRequest.NextToken)); request.ResourcePath = "/channels"; request.UseQueryString = true; return request; } private static ListChannelsAssociatedWithChannelFlowRequestMarshaller _instance = new ListChannelsAssociatedWithChannelFlowRequestMarshaller(); internal static ListChannelsAssociatedWithChannelFlowRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelsAssociatedWithChannelFlowRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListChannelsAssociatedWithChannelFlow operation /// </summary> public class ListChannelsAssociatedWithChannelFlowResponseUnmarshaller : 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) { ListChannelsAssociatedWithChannelFlowResponse response = new ListChannelsAssociatedWithChannelFlowResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Channels", targetDepth)) { var unmarshaller = new ListUnmarshaller<ChannelAssociatedWithFlowSummary, ChannelAssociatedWithFlowSummaryUnmarshaller>(ChannelAssociatedWithFlowSummaryUnmarshaller.Instance); response.Channels = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListChannelsAssociatedWithChannelFlowResponseUnmarshaller _instance = new ListChannelsAssociatedWithChannelFlowResponseUnmarshaller(); internal static ListChannelsAssociatedWithChannelFlowResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelsAssociatedWithChannelFlowResponseUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// ListChannelsModeratedByAppInstanceUser Request Marshaller /// </summary> public class ListChannelsModeratedByAppInstanceUserRequestMarshaller : IMarshaller<IRequest, ListChannelsModeratedByAppInstanceUserRequest> , 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((ListChannelsModeratedByAppInstanceUserRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListChannelsModeratedByAppInstanceUserRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; request.AddSubResource("scope", "app-instance-user-moderated-channels"); if (publicRequest.IsSetAppInstanceUserArn()) request.Parameters.Add("app-instance-user-arn", StringUtils.FromString(publicRequest.AppInstanceUserArn)); if (publicRequest.IsSetMaxResults()) request.Parameters.Add("max-results", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("next-token", StringUtils.FromString(publicRequest.NextToken)); request.ResourcePath = "/channels"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } request.UseQueryString = true; return request; } private static ListChannelsModeratedByAppInstanceUserRequestMarshaller _instance = new ListChannelsModeratedByAppInstanceUserRequestMarshaller(); internal static ListChannelsModeratedByAppInstanceUserRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelsModeratedByAppInstanceUserRequestMarshaller Instance { get { return _instance; } } } }
100
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListChannelsModeratedByAppInstanceUser operation /// </summary> public class ListChannelsModeratedByAppInstanceUserResponseUnmarshaller : 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) { ListChannelsModeratedByAppInstanceUserResponse response = new ListChannelsModeratedByAppInstanceUserResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Channels", targetDepth)) { var unmarshaller = new ListUnmarshaller<ChannelModeratedByAppInstanceUserSummary, ChannelModeratedByAppInstanceUserSummaryUnmarshaller>(ChannelModeratedByAppInstanceUserSummaryUnmarshaller.Instance); response.Channels = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListChannelsModeratedByAppInstanceUserResponseUnmarshaller _instance = new ListChannelsModeratedByAppInstanceUserResponseUnmarshaller(); internal static ListChannelsModeratedByAppInstanceUserResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelsModeratedByAppInstanceUserResponseUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// ListChannels Request Marshaller /// </summary> public class ListChannelsRequestMarshaller : IMarshaller<IRequest, ListChannelsRequest> , 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((ListChannelsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListChannelsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; if (publicRequest.IsSetAppInstanceArn()) request.Parameters.Add("app-instance-arn", StringUtils.FromString(publicRequest.AppInstanceArn)); if (publicRequest.IsSetMaxResults()) request.Parameters.Add("max-results", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("next-token", StringUtils.FromString(publicRequest.NextToken)); if (publicRequest.IsSetPrivacy()) request.Parameters.Add("privacy", StringUtils.FromString(publicRequest.Privacy)); request.ResourcePath = "/channels"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } request.UseQueryString = true; return request; } private static ListChannelsRequestMarshaller _instance = new ListChannelsRequestMarshaller(); internal static ListChannelsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelsRequestMarshaller Instance { get { return _instance; } } } }
102
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListChannels operation /// </summary> public class ListChannelsResponseUnmarshaller : 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) { ListChannelsResponse response = new ListChannelsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Channels", targetDepth)) { var unmarshaller = new ListUnmarshaller<ChannelSummary, ChannelSummaryUnmarshaller>(ChannelSummaryUnmarshaller.Instance); response.Channels = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListChannelsResponseUnmarshaller _instance = new ListChannelsResponseUnmarshaller(); internal static ListChannelsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListChannelsResponseUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// ListSubChannels Request Marshaller /// </summary> public class ListSubChannelsRequestMarshaller : IMarshaller<IRequest, ListSubChannelsRequest> , 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((ListSubChannelsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListSubChannelsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (publicRequest.IsSetMaxResults()) request.Parameters.Add("max-results", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("next-token", StringUtils.FromString(publicRequest.NextToken)); request.ResourcePath = "/channels/{channelArn}/subchannels"; if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } request.UseQueryString = true; return request; } private static ListSubChannelsRequestMarshaller _instance = new ListSubChannelsRequestMarshaller(); internal static ListSubChannelsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListSubChannelsRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListSubChannels operation /// </summary> public class ListSubChannelsResponseUnmarshaller : 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) { ListSubChannelsResponse response = new ListSubChannelsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChannelArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SubChannels", targetDepth)) { var unmarshaller = new ListUnmarshaller<SubChannelSummary, SubChannelSummaryUnmarshaller>(SubChannelSummaryUnmarshaller.Instance); response.SubChannels = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListSubChannelsResponseUnmarshaller _instance = new ListSubChannelsResponseUnmarshaller(); internal static ListSubChannelsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListSubChannelsResponseUnmarshaller Instance { get { return _instance; } } } }
142
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// ListTagsForResource Request Marshaller /// </summary> public class ListTagsForResourceRequestMarshaller : IMarshaller<IRequest, ListTagsForResourceRequest> , 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((ListTagsForResourceRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListTagsForResourceRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "GET"; if (publicRequest.IsSetResourceARN()) request.Parameters.Add("arn", StringUtils.FromString(publicRequest.ResourceARN)); request.ResourcePath = "/tags"; request.UseQueryString = true; return request; } private static ListTagsForResourceRequestMarshaller _instance = new ListTagsForResourceRequestMarshaller(); internal static ListTagsForResourceRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListTagsForResourceRequestMarshaller Instance { get { return _instance; } } } }
88
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListTagsForResource operation /// </summary> public class ListTagsForResourceResponseUnmarshaller : 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) { ListTagsForResourceResponse response = new ListTagsForResourceResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Tags", targetDepth)) { var unmarshaller = new ListUnmarshaller<Tag, TagUnmarshaller>(TagUnmarshaller.Instance); response.Tags = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListTagsForResourceResponseUnmarshaller _instance = new ListTagsForResourceResponseUnmarshaller(); internal static ListTagsForResourceResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListTagsForResourceResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// MessageAttributeValue Marshaller /// </summary> public class MessageAttributeValueMarshaller : IRequestMarshaller<MessageAttributeValue, 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(MessageAttributeValue requestObject, JsonMarshallerContext context) { if(requestObject.IsSetStringValues()) { context.Writer.WritePropertyName("StringValues"); context.Writer.WriteArrayStart(); foreach(var requestObjectStringValuesListValue in requestObject.StringValues) { context.Writer.Write(requestObjectStringValuesListValue); } context.Writer.WriteArrayEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static MessageAttributeValueMarshaller Instance = new MessageAttributeValueMarshaller(); } }
67
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for MessageAttributeValue Object /// </summary> public class MessageAttributeValueUnmarshaller : IUnmarshaller<MessageAttributeValue, XmlUnmarshallerContext>, IUnmarshaller<MessageAttributeValue, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> MessageAttributeValue IUnmarshaller<MessageAttributeValue, 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 MessageAttributeValue Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; MessageAttributeValue unmarshalledObject = new MessageAttributeValue(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("StringValues", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.StringValues = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static MessageAttributeValueUnmarshaller _instance = new MessageAttributeValueUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static MessageAttributeValueUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for MessagingSessionEndpoint Object /// </summary> public class MessagingSessionEndpointUnmarshaller : IUnmarshaller<MessagingSessionEndpoint, XmlUnmarshallerContext>, IUnmarshaller<MessagingSessionEndpoint, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> MessagingSessionEndpoint IUnmarshaller<MessagingSessionEndpoint, 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 MessagingSessionEndpoint Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; MessagingSessionEndpoint unmarshalledObject = new MessagingSessionEndpoint(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Url", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Url = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static MessagingSessionEndpointUnmarshaller _instance = new MessagingSessionEndpointUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static MessagingSessionEndpointUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for NotFoundException Object /// </summary> public class NotFoundExceptionUnmarshaller : IErrorResponseUnmarshaller<NotFoundException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public NotFoundException 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 NotFoundException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); NotFoundException unmarshalledObject = new NotFoundException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Code", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Code = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static NotFoundExceptionUnmarshaller _instance = new NotFoundExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static NotFoundExceptionUnmarshaller Instance { get { return _instance; } } } }
91
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// ProcessorConfiguration Marshaller /// </summary> public class ProcessorConfigurationMarshaller : IRequestMarshaller<ProcessorConfiguration, 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(ProcessorConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetLambda()) { context.Writer.WritePropertyName("Lambda"); context.Writer.WriteObjectStart(); var marshaller = LambdaConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.Lambda, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static ProcessorConfigurationMarshaller Instance = new ProcessorConfigurationMarshaller(); } }
67
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ProcessorConfiguration Object /// </summary> public class ProcessorConfigurationUnmarshaller : IUnmarshaller<ProcessorConfiguration, XmlUnmarshallerContext>, IUnmarshaller<ProcessorConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ProcessorConfiguration IUnmarshaller<ProcessorConfiguration, 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 ProcessorConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ProcessorConfiguration unmarshalledObject = new ProcessorConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Lambda", targetDepth)) { var unmarshaller = LambdaConfigurationUnmarshaller.Instance; unmarshalledObject.Lambda = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ProcessorConfigurationUnmarshaller _instance = new ProcessorConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ProcessorConfigurationUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Processor Marshaller /// </summary> public class ProcessorMarshaller : IRequestMarshaller<Processor, 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(Processor requestObject, JsonMarshallerContext context) { if(requestObject.IsSetConfiguration()) { context.Writer.WritePropertyName("Configuration"); context.Writer.WriteObjectStart(); var marshaller = ProcessorConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.Configuration, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetExecutionOrder()) { context.Writer.WritePropertyName("ExecutionOrder"); context.Writer.Write(requestObject.ExecutionOrder); } if(requestObject.IsSetFallbackAction()) { context.Writer.WritePropertyName("FallbackAction"); context.Writer.Write(requestObject.FallbackAction); } if(requestObject.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(requestObject.Name); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static ProcessorMarshaller Instance = new ProcessorMarshaller(); } }
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Processor Object /// </summary> public class ProcessorUnmarshaller : IUnmarshaller<Processor, XmlUnmarshallerContext>, IUnmarshaller<Processor, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Processor IUnmarshaller<Processor, 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 Processor Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Processor unmarshalledObject = new Processor(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Configuration", targetDepth)) { var unmarshaller = ProcessorConfigurationUnmarshaller.Instance; unmarshalledObject.Configuration = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ExecutionOrder", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.ExecutionOrder = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FallbackAction", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FallbackAction = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ProcessorUnmarshaller _instance = new ProcessorUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ProcessorUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// PushNotificationConfiguration Marshaller /// </summary> public class PushNotificationConfigurationMarshaller : IRequestMarshaller<PushNotificationConfiguration, 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(PushNotificationConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetBody()) { context.Writer.WritePropertyName("Body"); context.Writer.Write(requestObject.Body); } if(requestObject.IsSetTitle()) { context.Writer.WritePropertyName("Title"); context.Writer.Write(requestObject.Title); } if(requestObject.IsSetType()) { context.Writer.WritePropertyName("Type"); context.Writer.Write(requestObject.Type); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static PushNotificationConfigurationMarshaller Instance = new PushNotificationConfigurationMarshaller(); } }
74
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// PushNotificationPreferences Marshaller /// </summary> public class PushNotificationPreferencesMarshaller : IRequestMarshaller<PushNotificationPreferences, 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(PushNotificationPreferences requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAllowNotifications()) { context.Writer.WritePropertyName("AllowNotifications"); context.Writer.Write(requestObject.AllowNotifications); } if(requestObject.IsSetFilterRule()) { context.Writer.WritePropertyName("FilterRule"); context.Writer.Write(requestObject.FilterRule); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static PushNotificationPreferencesMarshaller Instance = new PushNotificationPreferencesMarshaller(); } }
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for PushNotificationPreferences Object /// </summary> public class PushNotificationPreferencesUnmarshaller : IUnmarshaller<PushNotificationPreferences, XmlUnmarshallerContext>, IUnmarshaller<PushNotificationPreferences, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> PushNotificationPreferences IUnmarshaller<PushNotificationPreferences, 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 PushNotificationPreferences Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; PushNotificationPreferences unmarshalledObject = new PushNotificationPreferences(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AllowNotifications", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AllowNotifications = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FilterRule", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FilterRule = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static PushNotificationPreferencesUnmarshaller _instance = new PushNotificationPreferencesUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static PushNotificationPreferencesUnmarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// PutChannelExpirationSettings Request Marshaller /// </summary> public class PutChannelExpirationSettingsRequestMarshaller : IMarshaller<IRequest, PutChannelExpirationSettingsRequest> , 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((PutChannelExpirationSettingsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(PutChannelExpirationSettingsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "PUT"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); request.ResourcePath = "/channels/{channelArn}/expiration-settings"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetExpirationSettings()) { context.Writer.WritePropertyName("ExpirationSettings"); context.Writer.WriteObjectStart(); var marshaller = ExpirationSettingsMarshaller.Instance; marshaller.Marshall(publicRequest.ExpirationSettings, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } return request; } private static PutChannelExpirationSettingsRequestMarshaller _instance = new PutChannelExpirationSettingsRequestMarshaller(); internal static PutChannelExpirationSettingsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static PutChannelExpirationSettingsRequestMarshaller 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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for PutChannelExpirationSettings operation /// </summary> public class PutChannelExpirationSettingsResponseUnmarshaller : 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) { PutChannelExpirationSettingsResponse response = new PutChannelExpirationSettingsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ChannelArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChannelArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ExpirationSettings", targetDepth)) { var unmarshaller = ExpirationSettingsUnmarshaller.Instance; response.ExpirationSettings = 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException")) { return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException")) { return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException")) { return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonChimeSDKMessagingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static PutChannelExpirationSettingsResponseUnmarshaller _instance = new PutChannelExpirationSettingsResponseUnmarshaller(); internal static PutChannelExpirationSettingsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static PutChannelExpirationSettingsResponseUnmarshaller Instance { get { return _instance; } } } }
140
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 chime-sdk-messaging-2021-05-15.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.ChimeSDKMessaging.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ChimeSDKMessaging.Model.Internal.MarshallTransformations { /// <summary> /// PutChannelMembershipPreferences Request Marshaller /// </summary> public class PutChannelMembershipPreferencesRequestMarshaller : IMarshaller<IRequest, PutChannelMembershipPreferencesRequest> , 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((PutChannelMembershipPreferencesRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(PutChannelMembershipPreferencesRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKMessaging"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2021-05-15"; request.HttpMethod = "PUT"; if (!publicRequest.IsSetChannelArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field ChannelArn set"); request.AddPathResource("{channelArn}", StringUtils.FromString(publicRequest.ChannelArn)); if (!publicRequest.IsSetMemberArn()) throw new AmazonChimeSDKMessagingException("Request object does not have required field MemberArn set"); request.AddPathResource("{memberArn}", StringUtils.FromString(publicRequest.MemberArn)); request.ResourcePath = "/channels/{channelArn}/memberships/{memberArn}/preferences"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetPreferences()) { context.Writer.WritePropertyName("Preferences"); context.Writer.WriteObjectStart(); var marshaller = ChannelMembershipPreferencesMarshaller.Instance; marshaller.Marshall(publicRequest.Preferences, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetChimeBearer()) { request.Headers["x-amz-chime-bearer"] = publicRequest.ChimeBearer; } return request; } private static PutChannelMembershipPreferencesRequestMarshaller _instance = new PutChannelMembershipPreferencesRequestMarshaller(); internal static PutChannelMembershipPreferencesRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static PutChannelMembershipPreferencesRequestMarshaller Instance { get { return _instance; } } } }
117