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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetArchiveRule operation /// </summary> public class GetArchiveRuleResponseUnmarshaller : 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) { GetArchiveRuleResponse response = new GetArchiveRuleResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("archiveRule", targetDepth)) { var unmarshaller = ArchiveRuleSummaryUnmarshaller.Instance; response.ArchiveRule = 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetArchiveRuleResponseUnmarshaller _instance = new GetArchiveRuleResponseUnmarshaller(); internal static GetArchiveRuleResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetArchiveRuleResponseUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// GetFinding Request Marshaller /// </summary> public class GetFindingRequestMarshaller : IMarshaller<IRequest, GetFindingRequest> , 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((GetFindingRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetFindingRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonAccessAnalyzerException("Request object does not have required field Id set"); request.AddPathResource("{id}", StringUtils.FromString(publicRequest.Id)); if (publicRequest.IsSetAnalyzerArn()) request.Parameters.Add("analyzerArn", StringUtils.FromString(publicRequest.AnalyzerArn)); request.ResourcePath = "/finding/{id}"; request.UseQueryString = true; return request; } private static GetFindingRequestMarshaller _instance = new GetFindingRequestMarshaller(); internal static GetFindingRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetFindingRequestMarshaller 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetFinding operation /// </summary> public class GetFindingResponseUnmarshaller : 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) { GetFindingResponse response = new GetFindingResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("finding", targetDepth)) { var unmarshaller = FindingUnmarshaller.Instance; response.Finding = 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetFindingResponseUnmarshaller _instance = new GetFindingResponseUnmarshaller(); internal static GetFindingResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetFindingResponseUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// GetGeneratedPolicy Request Marshaller /// </summary> public class GetGeneratedPolicyRequestMarshaller : IMarshaller<IRequest, GetGeneratedPolicyRequest> , 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((GetGeneratedPolicyRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetGeneratedPolicyRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "GET"; if (!publicRequest.IsSetJobId()) throw new AmazonAccessAnalyzerException("Request object does not have required field JobId set"); request.AddPathResource("{jobId}", StringUtils.FromString(publicRequest.JobId)); if (publicRequest.IsSetIncludeResourcePlaceholders()) request.Parameters.Add("includeResourcePlaceholders", StringUtils.FromBool(publicRequest.IncludeResourcePlaceholders)); if (publicRequest.IsSetIncludeServiceLevelTemplate()) request.Parameters.Add("includeServiceLevelTemplate", StringUtils.FromBool(publicRequest.IncludeServiceLevelTemplate)); request.ResourcePath = "/policy/generation/{jobId}"; request.UseQueryString = true; return request; } private static GetGeneratedPolicyRequestMarshaller _instance = new GetGeneratedPolicyRequestMarshaller(); internal static GetGeneratedPolicyRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetGeneratedPolicyRequestMarshaller 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetGeneratedPolicy operation /// </summary> public class GetGeneratedPolicyResponseUnmarshaller : 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) { GetGeneratedPolicyResponse response = new GetGeneratedPolicyResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("generatedPolicyResult", targetDepth)) { var unmarshaller = GeneratedPolicyResultUnmarshaller.Instance; response.GeneratedPolicyResult = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("jobDetails", targetDepth)) { var unmarshaller = JobDetailsUnmarshaller.Instance; response.JobDetails = 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static GetGeneratedPolicyResponseUnmarshaller _instance = new GetGeneratedPolicyResponseUnmarshaller(); internal static GetGeneratedPolicyResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetGeneratedPolicyResponseUnmarshaller Instance { get { return _instance; } } } }
128
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// IamRoleConfiguration Marshaller /// </summary> public class IamRoleConfigurationMarshaller : IRequestMarshaller<IamRoleConfiguration, 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(IamRoleConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetTrustPolicy()) { context.Writer.WritePropertyName("trustPolicy"); context.Writer.Write(requestObject.TrustPolicy); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static IamRoleConfigurationMarshaller Instance = new IamRoleConfigurationMarshaller(); } }
62
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for IamRoleConfiguration Object /// </summary> public class IamRoleConfigurationUnmarshaller : IUnmarshaller<IamRoleConfiguration, XmlUnmarshallerContext>, IUnmarshaller<IamRoleConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> IamRoleConfiguration IUnmarshaller<IamRoleConfiguration, 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 IamRoleConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; IamRoleConfiguration unmarshalledObject = new IamRoleConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("trustPolicy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TrustPolicy = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static IamRoleConfigurationUnmarshaller _instance = new IamRoleConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static IamRoleConfigurationUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// InlineArchiveRule Marshaller /// </summary> public class InlineArchiveRuleMarshaller : IRequestMarshaller<InlineArchiveRule, 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(InlineArchiveRule requestObject, JsonMarshallerContext context) { if(requestObject.IsSetFilter()) { context.Writer.WritePropertyName("filter"); context.Writer.WriteObjectStart(); foreach (var requestObjectFilterKvp in requestObject.Filter) { context.Writer.WritePropertyName(requestObjectFilterKvp.Key); var requestObjectFilterValue = requestObjectFilterKvp.Value; context.Writer.WriteObjectStart(); var marshaller = CriterionMarshaller.Instance; marshaller.Marshall(requestObjectFilterValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteObjectEnd(); } if(requestObject.IsSetRuleName()) { context.Writer.WritePropertyName("ruleName"); context.Writer.Write(requestObject.RuleName); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static InlineArchiveRuleMarshaller Instance = new InlineArchiveRuleMarshaller(); } }
81
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for InternalServerException Object /// </summary> public class InternalServerExceptionUnmarshaller : IErrorResponseUnmarshaller<InternalServerException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public InternalServerException 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 InternalServerException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); InternalServerException unmarshalledObject = new InternalServerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Retry-After", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.RetryAfterSeconds = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static InternalServerExceptionUnmarshaller _instance = new InternalServerExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static InternalServerExceptionUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// InternetConfiguration Marshaller /// </summary> public class InternetConfigurationMarshaller : IRequestMarshaller<InternetConfiguration, 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(InternetConfiguration requestObject, JsonMarshallerContext context) { } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static InternetConfigurationMarshaller Instance = new InternetConfigurationMarshaller(); } }
56
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for InternetConfiguration Object /// </summary> public class InternetConfigurationUnmarshaller : IUnmarshaller<InternetConfiguration, XmlUnmarshallerContext>, IUnmarshaller<InternetConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> InternetConfiguration IUnmarshaller<InternetConfiguration, 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 InternetConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; InternetConfiguration unmarshalledObject = new InternetConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static InternetConfigurationUnmarshaller _instance = new InternetConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static InternetConfigurationUnmarshaller Instance { get { return _instance; } } } }
86
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for JobDetails Object /// </summary> public class JobDetailsUnmarshaller : IUnmarshaller<JobDetails, XmlUnmarshallerContext>, IUnmarshaller<JobDetails, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> JobDetails IUnmarshaller<JobDetails, 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 JobDetails Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; JobDetails unmarshalledObject = new JobDetails(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("completedOn", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CompletedOn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("jobError", targetDepth)) { var unmarshaller = JobErrorUnmarshaller.Instance; unmarshalledObject.JobError = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("jobId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.JobId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("startedOn", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.StartedOn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static JobDetailsUnmarshaller _instance = new JobDetailsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static JobDetailsUnmarshaller Instance { get { return _instance; } } } }
116
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for JobError Object /// </summary> public class JobErrorUnmarshaller : IUnmarshaller<JobError, XmlUnmarshallerContext>, IUnmarshaller<JobError, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> JobError IUnmarshaller<JobError, 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 JobError Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; JobError unmarshalledObject = new JobError(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("code", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Code = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("message", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Message = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static JobErrorUnmarshaller _instance = new JobErrorUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static JobErrorUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// KmsGrantConfiguration Marshaller /// </summary> public class KmsGrantConfigurationMarshaller : IRequestMarshaller<KmsGrantConfiguration, 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(KmsGrantConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetConstraints()) { context.Writer.WritePropertyName("constraints"); context.Writer.WriteObjectStart(); var marshaller = KmsGrantConstraintsMarshaller.Instance; marshaller.Marshall(requestObject.Constraints, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetGranteePrincipal()) { context.Writer.WritePropertyName("granteePrincipal"); context.Writer.Write(requestObject.GranteePrincipal); } if(requestObject.IsSetIssuingAccount()) { context.Writer.WritePropertyName("issuingAccount"); context.Writer.Write(requestObject.IssuingAccount); } if(requestObject.IsSetOperations()) { context.Writer.WritePropertyName("operations"); context.Writer.WriteArrayStart(); foreach(var requestObjectOperationsListValue in requestObject.Operations) { context.Writer.Write(requestObjectOperationsListValue); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetRetiringPrincipal()) { context.Writer.WritePropertyName("retiringPrincipal"); context.Writer.Write(requestObject.RetiringPrincipal); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static KmsGrantConfigurationMarshaller Instance = new KmsGrantConfigurationMarshaller(); } }
96
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for KmsGrantConfiguration Object /// </summary> public class KmsGrantConfigurationUnmarshaller : IUnmarshaller<KmsGrantConfiguration, XmlUnmarshallerContext>, IUnmarshaller<KmsGrantConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> KmsGrantConfiguration IUnmarshaller<KmsGrantConfiguration, 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 KmsGrantConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; KmsGrantConfiguration unmarshalledObject = new KmsGrantConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("constraints", targetDepth)) { var unmarshaller = KmsGrantConstraintsUnmarshaller.Instance; unmarshalledObject.Constraints = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("granteePrincipal", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.GranteePrincipal = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("issuingAccount", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.IssuingAccount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("operations", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.Operations = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("retiringPrincipal", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.RetiringPrincipal = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static KmsGrantConfigurationUnmarshaller _instance = new KmsGrantConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static KmsGrantConfigurationUnmarshaller Instance { get { return _instance; } } } }
116
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// KmsGrantConstraints Marshaller /// </summary> public class KmsGrantConstraintsMarshaller : IRequestMarshaller<KmsGrantConstraints, 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(KmsGrantConstraints requestObject, JsonMarshallerContext context) { if(requestObject.IsSetEncryptionContextEquals()) { context.Writer.WritePropertyName("encryptionContextEquals"); context.Writer.WriteObjectStart(); foreach (var requestObjectEncryptionContextEqualsKvp in requestObject.EncryptionContextEquals) { context.Writer.WritePropertyName(requestObjectEncryptionContextEqualsKvp.Key); var requestObjectEncryptionContextEqualsValue = requestObjectEncryptionContextEqualsKvp.Value; context.Writer.Write(requestObjectEncryptionContextEqualsValue); } context.Writer.WriteObjectEnd(); } if(requestObject.IsSetEncryptionContextSubset()) { context.Writer.WritePropertyName("encryptionContextSubset"); context.Writer.WriteObjectStart(); foreach (var requestObjectEncryptionContextSubsetKvp in requestObject.EncryptionContextSubset) { context.Writer.WritePropertyName(requestObjectEncryptionContextSubsetKvp.Key); var requestObjectEncryptionContextSubsetValue = requestObjectEncryptionContextSubsetKvp.Value; context.Writer.Write(requestObjectEncryptionContextSubsetValue); } context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static KmsGrantConstraintsMarshaller Instance = new KmsGrantConstraintsMarshaller(); } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for KmsGrantConstraints Object /// </summary> public class KmsGrantConstraintsUnmarshaller : IUnmarshaller<KmsGrantConstraints, XmlUnmarshallerContext>, IUnmarshaller<KmsGrantConstraints, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> KmsGrantConstraints IUnmarshaller<KmsGrantConstraints, 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 KmsGrantConstraints Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; KmsGrantConstraints unmarshalledObject = new KmsGrantConstraints(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("encryptionContextEquals", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.EncryptionContextEquals = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("encryptionContextSubset", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.EncryptionContextSubset = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static KmsGrantConstraintsUnmarshaller _instance = new KmsGrantConstraintsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static KmsGrantConstraintsUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// KmsKeyConfiguration Marshaller /// </summary> public class KmsKeyConfigurationMarshaller : IRequestMarshaller<KmsKeyConfiguration, 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(KmsKeyConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetGrants()) { context.Writer.WritePropertyName("grants"); context.Writer.WriteArrayStart(); foreach(var requestObjectGrantsListValue in requestObject.Grants) { context.Writer.WriteObjectStart(); var marshaller = KmsGrantConfigurationMarshaller.Instance; marshaller.Marshall(requestObjectGrantsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetKeyPolicies()) { context.Writer.WritePropertyName("keyPolicies"); context.Writer.WriteObjectStart(); foreach (var requestObjectKeyPoliciesKvp in requestObject.KeyPolicies) { context.Writer.WritePropertyName(requestObjectKeyPoliciesKvp.Key); var requestObjectKeyPoliciesValue = requestObjectKeyPoliciesKvp.Value; context.Writer.Write(requestObjectKeyPoliciesValue); } context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static KmsKeyConfigurationMarshaller Instance = new KmsKeyConfigurationMarshaller(); } }
86
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for KmsKeyConfiguration Object /// </summary> public class KmsKeyConfigurationUnmarshaller : IUnmarshaller<KmsKeyConfiguration, XmlUnmarshallerContext>, IUnmarshaller<KmsKeyConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> KmsKeyConfiguration IUnmarshaller<KmsKeyConfiguration, 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 KmsKeyConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; KmsKeyConfiguration unmarshalledObject = new KmsKeyConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("grants", targetDepth)) { var unmarshaller = new ListUnmarshaller<KmsGrantConfiguration, KmsGrantConfigurationUnmarshaller>(KmsGrantConfigurationUnmarshaller.Instance); unmarshalledObject.Grants = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("keyPolicies", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.KeyPolicies = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static KmsKeyConfigurationUnmarshaller _instance = new KmsKeyConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static KmsKeyConfigurationUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// ListAccessPreviewFindings Request Marshaller /// </summary> public class ListAccessPreviewFindingsRequestMarshaller : IMarshaller<IRequest, ListAccessPreviewFindingsRequest> , 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((ListAccessPreviewFindingsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListAccessPreviewFindingsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "POST"; if (!publicRequest.IsSetAccessPreviewId()) throw new AmazonAccessAnalyzerException("Request object does not have required field AccessPreviewId set"); request.AddPathResource("{accessPreviewId}", StringUtils.FromString(publicRequest.AccessPreviewId)); request.ResourcePath = "/access-preview/{accessPreviewId}"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAnalyzerArn()) { context.Writer.WritePropertyName("analyzerArn"); context.Writer.Write(publicRequest.AnalyzerArn); } if(publicRequest.IsSetFilter()) { context.Writer.WritePropertyName("filter"); context.Writer.WriteObjectStart(); foreach (var publicRequestFilterKvp in publicRequest.Filter) { context.Writer.WritePropertyName(publicRequestFilterKvp.Key); var publicRequestFilterValue = publicRequestFilterKvp.Value; context.Writer.WriteObjectStart(); var marshaller = CriterionMarshaller.Instance; marshaller.Marshall(publicRequestFilterValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetMaxResults()) { context.Writer.WritePropertyName("maxResults"); context.Writer.Write(publicRequest.MaxResults); } if(publicRequest.IsSetNextToken()) { context.Writer.WritePropertyName("nextToken"); context.Writer.Write(publicRequest.NextToken); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static ListAccessPreviewFindingsRequestMarshaller _instance = new ListAccessPreviewFindingsRequestMarshaller(); internal static ListAccessPreviewFindingsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListAccessPreviewFindingsRequestMarshaller Instance { get { return _instance; } } } }
135
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListAccessPreviewFindings operation /// </summary> public class ListAccessPreviewFindingsResponseUnmarshaller : 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) { ListAccessPreviewFindingsResponse response = new ListAccessPreviewFindingsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("findings", targetDepth)) { var unmarshaller = new ListUnmarshaller<AccessPreviewFinding, AccessPreviewFindingUnmarshaller>(AccessPreviewFindingUnmarshaller.Instance); response.Findings = 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.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("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListAccessPreviewFindingsResponseUnmarshaller _instance = new ListAccessPreviewFindingsResponseUnmarshaller(); internal static ListAccessPreviewFindingsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListAccessPreviewFindingsResponseUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// ListAccessPreviews Request Marshaller /// </summary> public class ListAccessPreviewsRequestMarshaller : IMarshaller<IRequest, ListAccessPreviewsRequest> , 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((ListAccessPreviewsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListAccessPreviewsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "GET"; if (publicRequest.IsSetAnalyzerArn()) request.Parameters.Add("analyzerArn", StringUtils.FromString(publicRequest.AnalyzerArn)); if (publicRequest.IsSetMaxResults()) request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken)); request.ResourcePath = "/access-preview"; request.UseQueryString = true; return request; } private static ListAccessPreviewsRequestMarshaller _instance = new ListAccessPreviewsRequestMarshaller(); internal static ListAccessPreviewsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListAccessPreviewsRequestMarshaller 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListAccessPreviews operation /// </summary> public class ListAccessPreviewsResponseUnmarshaller : 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) { ListAccessPreviewsResponse response = new ListAccessPreviewsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("accessPreviews", targetDepth)) { var unmarshaller = new ListUnmarshaller<AccessPreviewSummary, AccessPreviewSummaryUnmarshaller>(AccessPreviewSummaryUnmarshaller.Instance); response.AccessPreviews = 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListAccessPreviewsResponseUnmarshaller _instance = new ListAccessPreviewsResponseUnmarshaller(); internal static ListAccessPreviewsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListAccessPreviewsResponseUnmarshaller Instance { get { return _instance; } } } }
132
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// ListAnalyzedResources Request Marshaller /// </summary> public class ListAnalyzedResourcesRequestMarshaller : IMarshaller<IRequest, ListAnalyzedResourcesRequest> , 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((ListAnalyzedResourcesRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListAnalyzedResourcesRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "POST"; request.ResourcePath = "/analyzed-resource"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAnalyzerArn()) { context.Writer.WritePropertyName("analyzerArn"); context.Writer.Write(publicRequest.AnalyzerArn); } if(publicRequest.IsSetMaxResults()) { context.Writer.WritePropertyName("maxResults"); context.Writer.Write(publicRequest.MaxResults); } if(publicRequest.IsSetNextToken()) { context.Writer.WritePropertyName("nextToken"); context.Writer.Write(publicRequest.NextToken); } if(publicRequest.IsSetResourceType()) { context.Writer.WritePropertyName("resourceType"); context.Writer.Write(publicRequest.ResourceType); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static ListAnalyzedResourcesRequestMarshaller _instance = new ListAnalyzedResourcesRequestMarshaller(); internal static ListAnalyzedResourcesRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListAnalyzedResourcesRequestMarshaller 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListAnalyzedResources operation /// </summary> public class ListAnalyzedResourcesResponseUnmarshaller : 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) { ListAnalyzedResourcesResponse response = new ListAnalyzedResourcesResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("analyzedResources", targetDepth)) { var unmarshaller = new ListUnmarshaller<AnalyzedResourceSummary, AnalyzedResourceSummaryUnmarshaller>(AnalyzedResourceSummaryUnmarshaller.Instance); response.AnalyzedResources = 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListAnalyzedResourcesResponseUnmarshaller _instance = new ListAnalyzedResourcesResponseUnmarshaller(); internal static ListAnalyzedResourcesResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListAnalyzedResourcesResponseUnmarshaller Instance { get { return _instance; } } } }
132
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// ListAnalyzers Request Marshaller /// </summary> public class ListAnalyzersRequestMarshaller : IMarshaller<IRequest, ListAnalyzersRequest> , 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((ListAnalyzersRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListAnalyzersRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "GET"; if (publicRequest.IsSetMaxResults()) request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken)); if (publicRequest.IsSetType()) request.Parameters.Add("type", StringUtils.FromString(publicRequest.Type)); request.ResourcePath = "/analyzer"; request.UseQueryString = true; return request; } private static ListAnalyzersRequestMarshaller _instance = new ListAnalyzersRequestMarshaller(); internal static ListAnalyzersRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListAnalyzersRequestMarshaller 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListAnalyzers operation /// </summary> public class ListAnalyzersResponseUnmarshaller : 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) { ListAnalyzersResponse response = new ListAnalyzersResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("analyzers", targetDepth)) { var unmarshaller = new ListUnmarshaller<AnalyzerSummary, AnalyzerSummaryUnmarshaller>(AnalyzerSummaryUnmarshaller.Instance); response.Analyzers = 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListAnalyzersResponseUnmarshaller _instance = new ListAnalyzersResponseUnmarshaller(); internal static ListAnalyzersResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListAnalyzersResponseUnmarshaller Instance { get { return _instance; } } } }
128
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// ListArchiveRules Request Marshaller /// </summary> public class ListArchiveRulesRequestMarshaller : IMarshaller<IRequest, ListArchiveRulesRequest> , 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((ListArchiveRulesRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListArchiveRulesRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "GET"; if (!publicRequest.IsSetAnalyzerName()) throw new AmazonAccessAnalyzerException("Request object does not have required field AnalyzerName set"); request.AddPathResource("{analyzerName}", StringUtils.FromString(publicRequest.AnalyzerName)); if (publicRequest.IsSetMaxResults()) request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken)); request.ResourcePath = "/analyzer/{analyzerName}/archive-rule"; request.UseQueryString = true; return request; } private static ListArchiveRulesRequestMarshaller _instance = new ListArchiveRulesRequestMarshaller(); internal static ListArchiveRulesRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListArchiveRulesRequestMarshaller 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListArchiveRules operation /// </summary> public class ListArchiveRulesResponseUnmarshaller : 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) { ListArchiveRulesResponse response = new ListArchiveRulesResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("archiveRules", targetDepth)) { var unmarshaller = new ListUnmarshaller<ArchiveRuleSummary, ArchiveRuleSummaryUnmarshaller>(ArchiveRuleSummaryUnmarshaller.Instance); response.ArchiveRules = 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListArchiveRulesResponseUnmarshaller _instance = new ListArchiveRulesResponseUnmarshaller(); internal static ListArchiveRulesResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListArchiveRulesResponseUnmarshaller Instance { get { return _instance; } } } }
128
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// ListFindings Request Marshaller /// </summary> public class ListFindingsRequestMarshaller : IMarshaller<IRequest, ListFindingsRequest> , 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((ListFindingsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListFindingsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "POST"; request.ResourcePath = "/finding"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAnalyzerArn()) { context.Writer.WritePropertyName("analyzerArn"); context.Writer.Write(publicRequest.AnalyzerArn); } if(publicRequest.IsSetFilter()) { context.Writer.WritePropertyName("filter"); context.Writer.WriteObjectStart(); foreach (var publicRequestFilterKvp in publicRequest.Filter) { context.Writer.WritePropertyName(publicRequestFilterKvp.Key); var publicRequestFilterValue = publicRequestFilterKvp.Value; context.Writer.WriteObjectStart(); var marshaller = CriterionMarshaller.Instance; marshaller.Marshall(publicRequestFilterValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetMaxResults()) { context.Writer.WritePropertyName("maxResults"); context.Writer.Write(publicRequest.MaxResults); } if(publicRequest.IsSetNextToken()) { context.Writer.WritePropertyName("nextToken"); context.Writer.Write(publicRequest.NextToken); } if(publicRequest.IsSetSort()) { context.Writer.WritePropertyName("sort"); context.Writer.WriteObjectStart(); var marshaller = SortCriteriaMarshaller.Instance; marshaller.Marshall(publicRequest.Sort, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static ListFindingsRequestMarshaller _instance = new ListFindingsRequestMarshaller(); internal static ListFindingsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListFindingsRequestMarshaller Instance { get { return _instance; } } } }
143
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListFindings operation /// </summary> public class ListFindingsResponseUnmarshaller : 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) { ListFindingsResponse response = new ListFindingsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("findings", targetDepth)) { var unmarshaller = new ListUnmarshaller<FindingSummary, FindingSummaryUnmarshaller>(FindingSummaryUnmarshaller.Instance); response.Findings = 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListFindingsResponseUnmarshaller _instance = new ListFindingsResponseUnmarshaller(); internal static ListFindingsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListFindingsResponseUnmarshaller Instance { get { return _instance; } } } }
132
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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// ListPolicyGenerations Request Marshaller /// </summary> public class ListPolicyGenerationsRequestMarshaller : IMarshaller<IRequest, ListPolicyGenerationsRequest> , 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((ListPolicyGenerationsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListPolicyGenerationsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "GET"; if (publicRequest.IsSetMaxResults()) request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken)); if (publicRequest.IsSetPrincipalArn()) request.Parameters.Add("principalArn", StringUtils.FromString(publicRequest.PrincipalArn)); request.ResourcePath = "/policy/generation"; request.UseQueryString = true; return request; } private static ListPolicyGenerationsRequestMarshaller _instance = new ListPolicyGenerationsRequestMarshaller(); internal static ListPolicyGenerationsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListPolicyGenerationsRequestMarshaller 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ListPolicyGenerations operation /// </summary> public class ListPolicyGenerationsResponseUnmarshaller : 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) { ListPolicyGenerationsResponse response = new ListPolicyGenerationsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("nextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("policyGenerations", targetDepth)) { var unmarshaller = new ListUnmarshaller<PolicyGeneration, PolicyGenerationUnmarshaller>(PolicyGenerationUnmarshaller.Instance); response.PolicyGenerations = 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ListPolicyGenerationsResponseUnmarshaller _instance = new ListPolicyGenerationsResponseUnmarshaller(); internal static ListPolicyGenerationsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListPolicyGenerationsResponseUnmarshaller Instance { get { return _instance; } } } }
128
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.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.AccessAnalyzer"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "GET"; if (!publicRequest.IsSetResourceArn()) throw new AmazonAccessAnalyzerException("Request object does not have required field ResourceArn set"); request.AddPathResource("{resourceArn}", StringUtils.FromString(publicRequest.ResourceArn)); request.ResourcePath = "/tags/{resourceArn}"; 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; } } } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.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 DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(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; } } } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Location Object /// </summary> public class LocationUnmarshaller : IUnmarshaller<Location, XmlUnmarshallerContext>, IUnmarshaller<Location, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Location IUnmarshaller<Location, 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 Location Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Location unmarshalledObject = new Location(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("path", targetDepth)) { var unmarshaller = new ListUnmarshaller<PathElement, PathElementUnmarshaller>(PathElementUnmarshaller.Instance); unmarshalledObject.Path = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("span", targetDepth)) { var unmarshaller = SpanUnmarshaller.Instance; unmarshalledObject.Span = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static LocationUnmarshaller _instance = new LocationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static LocationUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// NetworkOriginConfiguration Marshaller /// </summary> public class NetworkOriginConfigurationMarshaller : IRequestMarshaller<NetworkOriginConfiguration, 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(NetworkOriginConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetInternetConfiguration()) { context.Writer.WritePropertyName("internetConfiguration"); context.Writer.WriteObjectStart(); var marshaller = InternetConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.InternetConfiguration, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetVpcConfiguration()) { context.Writer.WritePropertyName("vpcConfiguration"); context.Writer.WriteObjectStart(); var marshaller = VpcConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.VpcConfiguration, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static NetworkOriginConfigurationMarshaller Instance = new NetworkOriginConfigurationMarshaller(); } }
78
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for NetworkOriginConfiguration Object /// </summary> public class NetworkOriginConfigurationUnmarshaller : IUnmarshaller<NetworkOriginConfiguration, XmlUnmarshallerContext>, IUnmarshaller<NetworkOriginConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> NetworkOriginConfiguration IUnmarshaller<NetworkOriginConfiguration, 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 NetworkOriginConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; NetworkOriginConfiguration unmarshalledObject = new NetworkOriginConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("internetConfiguration", targetDepth)) { var unmarshaller = InternetConfigurationUnmarshaller.Instance; unmarshalledObject.InternetConfiguration = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("vpcConfiguration", targetDepth)) { var unmarshaller = VpcConfigurationUnmarshaller.Instance; unmarshalledObject.VpcConfiguration = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static NetworkOriginConfigurationUnmarshaller _instance = new NetworkOriginConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static NetworkOriginConfigurationUnmarshaller 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for PathElement Object /// </summary> public class PathElementUnmarshaller : IUnmarshaller<PathElement, XmlUnmarshallerContext>, IUnmarshaller<PathElement, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> PathElement IUnmarshaller<PathElement, 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 PathElement Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; PathElement unmarshalledObject = new PathElement(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("index", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Index = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("key", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Key = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("substring", targetDepth)) { var unmarshaller = SubstringUnmarshaller.Instance; unmarshalledObject.Substring = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("value", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Value = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static PathElementUnmarshaller _instance = new PathElementUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static PathElementUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// PolicyGenerationDetails Marshaller /// </summary> public class PolicyGenerationDetailsMarshaller : IRequestMarshaller<PolicyGenerationDetails, 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(PolicyGenerationDetails requestObject, JsonMarshallerContext context) { if(requestObject.IsSetPrincipalArn()) { context.Writer.WritePropertyName("principalArn"); context.Writer.Write(requestObject.PrincipalArn); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static PolicyGenerationDetailsMarshaller Instance = new PolicyGenerationDetailsMarshaller(); } }
62
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for PolicyGeneration Object /// </summary> public class PolicyGenerationUnmarshaller : IUnmarshaller<PolicyGeneration, XmlUnmarshallerContext>, IUnmarshaller<PolicyGeneration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> PolicyGeneration IUnmarshaller<PolicyGeneration, 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 PolicyGeneration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; PolicyGeneration unmarshalledObject = new PolicyGeneration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("completedOn", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CompletedOn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("jobId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.JobId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("principalArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.PrincipalArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("startedOn", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.StartedOn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static PolicyGenerationUnmarshaller _instance = new PolicyGenerationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static PolicyGenerationUnmarshaller Instance { get { return _instance; } } } }
116
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Position Object /// </summary> public class PositionUnmarshaller : IUnmarshaller<Position, XmlUnmarshallerContext>, IUnmarshaller<Position, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Position IUnmarshaller<Position, 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 Position Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Position unmarshalledObject = new Position(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("column", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Column = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("line", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Line = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("offset", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Offset = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static PositionUnmarshaller _instance = new PositionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static PositionUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// RdsDbClusterSnapshotAttributeValue Marshaller /// </summary> public class RdsDbClusterSnapshotAttributeValueMarshaller : IRequestMarshaller<RdsDbClusterSnapshotAttributeValue, 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(RdsDbClusterSnapshotAttributeValue requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAccountIds()) { context.Writer.WritePropertyName("accountIds"); context.Writer.WriteArrayStart(); foreach(var requestObjectAccountIdsListValue in requestObject.AccountIds) { context.Writer.Write(requestObjectAccountIdsListValue); } context.Writer.WriteArrayEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static RdsDbClusterSnapshotAttributeValueMarshaller Instance = new RdsDbClusterSnapshotAttributeValueMarshaller(); } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for RdsDbClusterSnapshotAttributeValue Object /// </summary> public class RdsDbClusterSnapshotAttributeValueUnmarshaller : IUnmarshaller<RdsDbClusterSnapshotAttributeValue, XmlUnmarshallerContext>, IUnmarshaller<RdsDbClusterSnapshotAttributeValue, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> RdsDbClusterSnapshotAttributeValue IUnmarshaller<RdsDbClusterSnapshotAttributeValue, 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 RdsDbClusterSnapshotAttributeValue Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; RdsDbClusterSnapshotAttributeValue unmarshalledObject = new RdsDbClusterSnapshotAttributeValue(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("accountIds", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.AccountIds = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static RdsDbClusterSnapshotAttributeValueUnmarshaller _instance = new RdsDbClusterSnapshotAttributeValueUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static RdsDbClusterSnapshotAttributeValueUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// RdsDbClusterSnapshotConfiguration Marshaller /// </summary> public class RdsDbClusterSnapshotConfigurationMarshaller : IRequestMarshaller<RdsDbClusterSnapshotConfiguration, 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(RdsDbClusterSnapshotConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAttributes()) { context.Writer.WritePropertyName("attributes"); context.Writer.WriteObjectStart(); foreach (var requestObjectAttributesKvp in requestObject.Attributes) { context.Writer.WritePropertyName(requestObjectAttributesKvp.Key); var requestObjectAttributesValue = requestObjectAttributesKvp.Value; context.Writer.WriteObjectStart(); var marshaller = RdsDbClusterSnapshotAttributeValueMarshaller.Instance; marshaller.Marshall(requestObjectAttributesValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteObjectEnd(); } if(requestObject.IsSetKmsKeyId()) { context.Writer.WritePropertyName("kmsKeyId"); context.Writer.Write(requestObject.KmsKeyId); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static RdsDbClusterSnapshotConfigurationMarshaller Instance = new RdsDbClusterSnapshotConfigurationMarshaller(); } }
81
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for RdsDbClusterSnapshotConfiguration Object /// </summary> public class RdsDbClusterSnapshotConfigurationUnmarshaller : IUnmarshaller<RdsDbClusterSnapshotConfiguration, XmlUnmarshallerContext>, IUnmarshaller<RdsDbClusterSnapshotConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> RdsDbClusterSnapshotConfiguration IUnmarshaller<RdsDbClusterSnapshotConfiguration, 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 RdsDbClusterSnapshotConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; RdsDbClusterSnapshotConfiguration unmarshalledObject = new RdsDbClusterSnapshotConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("attributes", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, RdsDbClusterSnapshotAttributeValue, StringUnmarshaller, RdsDbClusterSnapshotAttributeValueUnmarshaller>(StringUnmarshaller.Instance, RdsDbClusterSnapshotAttributeValueUnmarshaller.Instance); unmarshalledObject.Attributes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("kmsKeyId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.KmsKeyId = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static RdsDbClusterSnapshotConfigurationUnmarshaller _instance = new RdsDbClusterSnapshotConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static RdsDbClusterSnapshotConfigurationUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// RdsDbSnapshotAttributeValue Marshaller /// </summary> public class RdsDbSnapshotAttributeValueMarshaller : IRequestMarshaller<RdsDbSnapshotAttributeValue, 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(RdsDbSnapshotAttributeValue requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAccountIds()) { context.Writer.WritePropertyName("accountIds"); context.Writer.WriteArrayStart(); foreach(var requestObjectAccountIdsListValue in requestObject.AccountIds) { context.Writer.Write(requestObjectAccountIdsListValue); } context.Writer.WriteArrayEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static RdsDbSnapshotAttributeValueMarshaller Instance = new RdsDbSnapshotAttributeValueMarshaller(); } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for RdsDbSnapshotAttributeValue Object /// </summary> public class RdsDbSnapshotAttributeValueUnmarshaller : IUnmarshaller<RdsDbSnapshotAttributeValue, XmlUnmarshallerContext>, IUnmarshaller<RdsDbSnapshotAttributeValue, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> RdsDbSnapshotAttributeValue IUnmarshaller<RdsDbSnapshotAttributeValue, 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 RdsDbSnapshotAttributeValue Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; RdsDbSnapshotAttributeValue unmarshalledObject = new RdsDbSnapshotAttributeValue(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("accountIds", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.AccountIds = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static RdsDbSnapshotAttributeValueUnmarshaller _instance = new RdsDbSnapshotAttributeValueUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static RdsDbSnapshotAttributeValueUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// RdsDbSnapshotConfiguration Marshaller /// </summary> public class RdsDbSnapshotConfigurationMarshaller : IRequestMarshaller<RdsDbSnapshotConfiguration, 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(RdsDbSnapshotConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAttributes()) { context.Writer.WritePropertyName("attributes"); context.Writer.WriteObjectStart(); foreach (var requestObjectAttributesKvp in requestObject.Attributes) { context.Writer.WritePropertyName(requestObjectAttributesKvp.Key); var requestObjectAttributesValue = requestObjectAttributesKvp.Value; context.Writer.WriteObjectStart(); var marshaller = RdsDbSnapshotAttributeValueMarshaller.Instance; marshaller.Marshall(requestObjectAttributesValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteObjectEnd(); } if(requestObject.IsSetKmsKeyId()) { context.Writer.WritePropertyName("kmsKeyId"); context.Writer.Write(requestObject.KmsKeyId); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static RdsDbSnapshotConfigurationMarshaller Instance = new RdsDbSnapshotConfigurationMarshaller(); } }
81
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for RdsDbSnapshotConfiguration Object /// </summary> public class RdsDbSnapshotConfigurationUnmarshaller : IUnmarshaller<RdsDbSnapshotConfiguration, XmlUnmarshallerContext>, IUnmarshaller<RdsDbSnapshotConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> RdsDbSnapshotConfiguration IUnmarshaller<RdsDbSnapshotConfiguration, 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 RdsDbSnapshotConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; RdsDbSnapshotConfiguration unmarshalledObject = new RdsDbSnapshotConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("attributes", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, RdsDbSnapshotAttributeValue, StringUnmarshaller, RdsDbSnapshotAttributeValueUnmarshaller>(StringUnmarshaller.Instance, RdsDbSnapshotAttributeValueUnmarshaller.Instance); unmarshalledObject.Attributes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("kmsKeyId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.KmsKeyId = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static RdsDbSnapshotConfigurationUnmarshaller _instance = new RdsDbSnapshotConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static RdsDbSnapshotConfigurationUnmarshaller 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ResourceNotFoundException Object /// </summary> public class ResourceNotFoundExceptionUnmarshaller : IErrorResponseUnmarshaller<ResourceNotFoundException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ResourceNotFoundException 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 ResourceNotFoundException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); ResourceNotFoundException unmarshalledObject = new ResourceNotFoundException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("resourceId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceType = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ResourceNotFoundExceptionUnmarshaller _instance = new ResourceNotFoundExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ResourceNotFoundExceptionUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// S3AccessPointConfiguration Marshaller /// </summary> public class S3AccessPointConfigurationMarshaller : IRequestMarshaller<S3AccessPointConfiguration, 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(S3AccessPointConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAccessPointPolicy()) { context.Writer.WritePropertyName("accessPointPolicy"); context.Writer.Write(requestObject.AccessPointPolicy); } if(requestObject.IsSetNetworkOrigin()) { context.Writer.WritePropertyName("networkOrigin"); context.Writer.WriteObjectStart(); var marshaller = NetworkOriginConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.NetworkOrigin, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetPublicAccessBlock()) { context.Writer.WritePropertyName("publicAccessBlock"); context.Writer.WriteObjectStart(); var marshaller = S3PublicAccessBlockConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.PublicAccessBlock, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static S3AccessPointConfigurationMarshaller Instance = new S3AccessPointConfigurationMarshaller(); } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for S3AccessPointConfiguration Object /// </summary> public class S3AccessPointConfigurationUnmarshaller : IUnmarshaller<S3AccessPointConfiguration, XmlUnmarshallerContext>, IUnmarshaller<S3AccessPointConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> S3AccessPointConfiguration IUnmarshaller<S3AccessPointConfiguration, 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 S3AccessPointConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; S3AccessPointConfiguration unmarshalledObject = new S3AccessPointConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("accessPointPolicy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AccessPointPolicy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("networkOrigin", targetDepth)) { var unmarshaller = NetworkOriginConfigurationUnmarshaller.Instance; unmarshalledObject.NetworkOrigin = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("publicAccessBlock", targetDepth)) { var unmarshaller = S3PublicAccessBlockConfigurationUnmarshaller.Instance; unmarshalledObject.PublicAccessBlock = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static S3AccessPointConfigurationUnmarshaller _instance = new S3AccessPointConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static S3AccessPointConfigurationUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// S3BucketAclGrantConfiguration Marshaller /// </summary> public class S3BucketAclGrantConfigurationMarshaller : IRequestMarshaller<S3BucketAclGrantConfiguration, 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(S3BucketAclGrantConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetGrantee()) { context.Writer.WritePropertyName("grantee"); context.Writer.WriteObjectStart(); var marshaller = AclGranteeMarshaller.Instance; marshaller.Marshall(requestObject.Grantee, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetPermission()) { context.Writer.WritePropertyName("permission"); context.Writer.Write(requestObject.Permission); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static S3BucketAclGrantConfigurationMarshaller Instance = new S3BucketAclGrantConfigurationMarshaller(); } }
73
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for S3BucketAclGrantConfiguration Object /// </summary> public class S3BucketAclGrantConfigurationUnmarshaller : IUnmarshaller<S3BucketAclGrantConfiguration, XmlUnmarshallerContext>, IUnmarshaller<S3BucketAclGrantConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> S3BucketAclGrantConfiguration IUnmarshaller<S3BucketAclGrantConfiguration, 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 S3BucketAclGrantConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; S3BucketAclGrantConfiguration unmarshalledObject = new S3BucketAclGrantConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("grantee", targetDepth)) { var unmarshaller = AclGranteeUnmarshaller.Instance; unmarshalledObject.Grantee = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("permission", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Permission = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static S3BucketAclGrantConfigurationUnmarshaller _instance = new S3BucketAclGrantConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static S3BucketAclGrantConfigurationUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// S3BucketConfiguration Marshaller /// </summary> public class S3BucketConfigurationMarshaller : IRequestMarshaller<S3BucketConfiguration, 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(S3BucketConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAccessPoints()) { context.Writer.WritePropertyName("accessPoints"); context.Writer.WriteObjectStart(); foreach (var requestObjectAccessPointsKvp in requestObject.AccessPoints) { context.Writer.WritePropertyName(requestObjectAccessPointsKvp.Key); var requestObjectAccessPointsValue = requestObjectAccessPointsKvp.Value; context.Writer.WriteObjectStart(); var marshaller = S3AccessPointConfigurationMarshaller.Instance; marshaller.Marshall(requestObjectAccessPointsValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteObjectEnd(); } if(requestObject.IsSetBucketAclGrants()) { context.Writer.WritePropertyName("bucketAclGrants"); context.Writer.WriteArrayStart(); foreach(var requestObjectBucketAclGrantsListValue in requestObject.BucketAclGrants) { context.Writer.WriteObjectStart(); var marshaller = S3BucketAclGrantConfigurationMarshaller.Instance; marshaller.Marshall(requestObjectBucketAclGrantsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetBucketPolicy()) { context.Writer.WritePropertyName("bucketPolicy"); context.Writer.Write(requestObject.BucketPolicy); } if(requestObject.IsSetBucketPublicAccessBlock()) { context.Writer.WritePropertyName("bucketPublicAccessBlock"); context.Writer.WriteObjectStart(); var marshaller = S3PublicAccessBlockConfigurationMarshaller.Instance; marshaller.Marshall(requestObject.BucketPublicAccessBlock, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static S3BucketConfigurationMarshaller Instance = new S3BucketConfigurationMarshaller(); } }
108
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for S3BucketConfiguration Object /// </summary> public class S3BucketConfigurationUnmarshaller : IUnmarshaller<S3BucketConfiguration, XmlUnmarshallerContext>, IUnmarshaller<S3BucketConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> S3BucketConfiguration IUnmarshaller<S3BucketConfiguration, 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 S3BucketConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; S3BucketConfiguration unmarshalledObject = new S3BucketConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("accessPoints", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, S3AccessPointConfiguration, StringUnmarshaller, S3AccessPointConfigurationUnmarshaller>(StringUnmarshaller.Instance, S3AccessPointConfigurationUnmarshaller.Instance); unmarshalledObject.AccessPoints = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("bucketAclGrants", targetDepth)) { var unmarshaller = new ListUnmarshaller<S3BucketAclGrantConfiguration, S3BucketAclGrantConfigurationUnmarshaller>(S3BucketAclGrantConfigurationUnmarshaller.Instance); unmarshalledObject.BucketAclGrants = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("bucketPolicy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.BucketPolicy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("bucketPublicAccessBlock", targetDepth)) { var unmarshaller = S3PublicAccessBlockConfigurationUnmarshaller.Instance; unmarshalledObject.BucketPublicAccessBlock = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static S3BucketConfigurationUnmarshaller _instance = new S3BucketConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static S3BucketConfigurationUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// S3PublicAccessBlockConfiguration Marshaller /// </summary> public class S3PublicAccessBlockConfigurationMarshaller : IRequestMarshaller<S3PublicAccessBlockConfiguration, 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(S3PublicAccessBlockConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetIgnorePublicAcls()) { context.Writer.WritePropertyName("ignorePublicAcls"); context.Writer.Write(requestObject.IgnorePublicAcls); } if(requestObject.IsSetRestrictPublicBuckets()) { context.Writer.WritePropertyName("restrictPublicBuckets"); context.Writer.Write(requestObject.RestrictPublicBuckets); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static S3PublicAccessBlockConfigurationMarshaller Instance = new S3PublicAccessBlockConfigurationMarshaller(); } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for S3PublicAccessBlockConfiguration Object /// </summary> public class S3PublicAccessBlockConfigurationUnmarshaller : IUnmarshaller<S3PublicAccessBlockConfiguration, XmlUnmarshallerContext>, IUnmarshaller<S3PublicAccessBlockConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> S3PublicAccessBlockConfiguration IUnmarshaller<S3PublicAccessBlockConfiguration, 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 S3PublicAccessBlockConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; S3PublicAccessBlockConfiguration unmarshalledObject = new S3PublicAccessBlockConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ignorePublicAcls", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IgnorePublicAcls = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("restrictPublicBuckets", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.RestrictPublicBuckets = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static S3PublicAccessBlockConfigurationUnmarshaller _instance = new S3PublicAccessBlockConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static S3PublicAccessBlockConfigurationUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// SecretsManagerSecretConfiguration Marshaller /// </summary> public class SecretsManagerSecretConfigurationMarshaller : IRequestMarshaller<SecretsManagerSecretConfiguration, 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(SecretsManagerSecretConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetKmsKeyId()) { context.Writer.WritePropertyName("kmsKeyId"); context.Writer.Write(requestObject.KmsKeyId); } if(requestObject.IsSetSecretPolicy()) { context.Writer.WritePropertyName("secretPolicy"); context.Writer.Write(requestObject.SecretPolicy); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static SecretsManagerSecretConfigurationMarshaller Instance = new SecretsManagerSecretConfigurationMarshaller(); } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for SecretsManagerSecretConfiguration Object /// </summary> public class SecretsManagerSecretConfigurationUnmarshaller : IUnmarshaller<SecretsManagerSecretConfiguration, XmlUnmarshallerContext>, IUnmarshaller<SecretsManagerSecretConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> SecretsManagerSecretConfiguration IUnmarshaller<SecretsManagerSecretConfiguration, 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 SecretsManagerSecretConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; SecretsManagerSecretConfiguration unmarshalledObject = new SecretsManagerSecretConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("kmsKeyId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.KmsKeyId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("secretPolicy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.SecretPolicy = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static SecretsManagerSecretConfigurationUnmarshaller _instance = new SecretsManagerSecretConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static SecretsManagerSecretConfigurationUnmarshaller 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ServiceQuotaExceededException Object /// </summary> public class ServiceQuotaExceededExceptionUnmarshaller : IErrorResponseUnmarshaller<ServiceQuotaExceededException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ServiceQuotaExceededException 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 ServiceQuotaExceededException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); ServiceQuotaExceededException unmarshalledObject = new ServiceQuotaExceededException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("resourceId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceType = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ServiceQuotaExceededExceptionUnmarshaller _instance = new ServiceQuotaExceededExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ServiceQuotaExceededExceptionUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// SnsTopicConfiguration Marshaller /// </summary> public class SnsTopicConfigurationMarshaller : IRequestMarshaller<SnsTopicConfiguration, 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(SnsTopicConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetTopicPolicy()) { context.Writer.WritePropertyName("topicPolicy"); context.Writer.Write(requestObject.TopicPolicy); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static SnsTopicConfigurationMarshaller Instance = new SnsTopicConfigurationMarshaller(); } }
62
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for SnsTopicConfiguration Object /// </summary> public class SnsTopicConfigurationUnmarshaller : IUnmarshaller<SnsTopicConfiguration, XmlUnmarshallerContext>, IUnmarshaller<SnsTopicConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> SnsTopicConfiguration IUnmarshaller<SnsTopicConfiguration, 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 SnsTopicConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; SnsTopicConfiguration unmarshalledObject = new SnsTopicConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("topicPolicy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TopicPolicy = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static SnsTopicConfigurationUnmarshaller _instance = new SnsTopicConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static SnsTopicConfigurationUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// SortCriteria Marshaller /// </summary> public class SortCriteriaMarshaller : IRequestMarshaller<SortCriteria, 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(SortCriteria requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAttributeName()) { context.Writer.WritePropertyName("attributeName"); context.Writer.Write(requestObject.AttributeName); } if(requestObject.IsSetOrderBy()) { context.Writer.WritePropertyName("orderBy"); context.Writer.Write(requestObject.OrderBy); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static SortCriteriaMarshaller Instance = new SortCriteriaMarshaller(); } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Span Object /// </summary> public class SpanUnmarshaller : IUnmarshaller<Span, XmlUnmarshallerContext>, IUnmarshaller<Span, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Span IUnmarshaller<Span, 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 Span Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Span unmarshalledObject = new Span(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("end", targetDepth)) { var unmarshaller = PositionUnmarshaller.Instance; unmarshalledObject.End = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("start", targetDepth)) { var unmarshaller = PositionUnmarshaller.Instance; unmarshalledObject.Start = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static SpanUnmarshaller _instance = new SpanUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static SpanUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// SqsQueueConfiguration Marshaller /// </summary> public class SqsQueueConfigurationMarshaller : IRequestMarshaller<SqsQueueConfiguration, 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(SqsQueueConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetQueuePolicy()) { context.Writer.WritePropertyName("queuePolicy"); context.Writer.Write(requestObject.QueuePolicy); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static SqsQueueConfigurationMarshaller Instance = new SqsQueueConfigurationMarshaller(); } }
62
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for SqsQueueConfiguration Object /// </summary> public class SqsQueueConfigurationUnmarshaller : IUnmarshaller<SqsQueueConfiguration, XmlUnmarshallerContext>, IUnmarshaller<SqsQueueConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> SqsQueueConfiguration IUnmarshaller<SqsQueueConfiguration, 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 SqsQueueConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; SqsQueueConfiguration unmarshalledObject = new SqsQueueConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("queuePolicy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.QueuePolicy = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static SqsQueueConfigurationUnmarshaller _instance = new SqsQueueConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static SqsQueueConfigurationUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// StartPolicyGeneration Request Marshaller /// </summary> public class StartPolicyGenerationRequestMarshaller : IMarshaller<IRequest, StartPolicyGenerationRequest> , 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((StartPolicyGenerationRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(StartPolicyGenerationRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "PUT"; request.ResourcePath = "/policy/generation"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientToken()) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(publicRequest.ClientToken); } else if(!(publicRequest.IsSetClientToken())) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetCloudTrailDetails()) { context.Writer.WritePropertyName("cloudTrailDetails"); context.Writer.WriteObjectStart(); var marshaller = CloudTrailDetailsMarshaller.Instance; marshaller.Marshall(publicRequest.CloudTrailDetails, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetPolicyGenerationDetails()) { context.Writer.WritePropertyName("policyGenerationDetails"); context.Writer.WriteObjectStart(); var marshaller = PolicyGenerationDetailsMarshaller.Instance; marshaller.Marshall(publicRequest.PolicyGenerationDetails, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static StartPolicyGenerationRequestMarshaller _instance = new StartPolicyGenerationRequestMarshaller(); internal static StartPolicyGenerationRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static StartPolicyGenerationRequestMarshaller Instance { get { return _instance; } } } }
128
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for StartPolicyGeneration operation /// </summary> public class StartPolicyGenerationResponseUnmarshaller : 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) { StartPolicyGenerationResponse response = new StartPolicyGenerationResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("jobId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.JobId = 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.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("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceQuotaExceededException")) { return ServiceQuotaExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static StartPolicyGenerationResponseUnmarshaller _instance = new StartPolicyGenerationResponseUnmarshaller(); internal static StartPolicyGenerationResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static StartPolicyGenerationResponseUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// StartResourceScan Request Marshaller /// </summary> public class StartResourceScanRequestMarshaller : IMarshaller<IRequest, StartResourceScanRequest> , 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((StartResourceScanRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(StartResourceScanRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "POST"; request.ResourcePath = "/resource/scan"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAnalyzerArn()) { context.Writer.WritePropertyName("analyzerArn"); context.Writer.Write(publicRequest.AnalyzerArn); } if(publicRequest.IsSetResourceArn()) { context.Writer.WritePropertyName("resourceArn"); context.Writer.Write(publicRequest.ResourceArn); } if(publicRequest.IsSetResourceOwnerAccount()) { context.Writer.WritePropertyName("resourceOwnerAccount"); context.Writer.Write(publicRequest.ResourceOwnerAccount); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static StartResourceScanRequestMarshaller _instance = new StartResourceScanRequestMarshaller(); internal static StartResourceScanRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static StartResourceScanRequestMarshaller Instance { get { return _instance; } } } }
113
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for StartResourceScan operation /// </summary> public class StartResourceScanResponseUnmarshaller : 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) { StartResourceScanResponse response = new StartResourceScanResponse(); 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static StartResourceScanResponseUnmarshaller _instance = new StartResourceScanResponseUnmarshaller(); internal static StartResourceScanResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static StartResourceScanResponseUnmarshaller Instance { get { return _instance; } } } }
115
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for StatusReason Object /// </summary> public class StatusReasonUnmarshaller : IUnmarshaller<StatusReason, XmlUnmarshallerContext>, IUnmarshaller<StatusReason, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> StatusReason IUnmarshaller<StatusReason, 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 StatusReason Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; StatusReason unmarshalledObject = new StatusReason(); 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 StatusReasonUnmarshaller _instance = new StatusReasonUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static StatusReasonUnmarshaller 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Substring Object /// </summary> public class SubstringUnmarshaller : IUnmarshaller<Substring, XmlUnmarshallerContext>, IUnmarshaller<Substring, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Substring IUnmarshaller<Substring, 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 Substring Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Substring unmarshalledObject = new Substring(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("length", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Length = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("start", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Start = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static SubstringUnmarshaller _instance = new SubstringUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static SubstringUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// TagResource Request Marshaller /// </summary> public class TagResourceRequestMarshaller : IMarshaller<IRequest, TagResourceRequest> , 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((TagResourceRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(TagResourceRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "POST"; if (!publicRequest.IsSetResourceArn()) throw new AmazonAccessAnalyzerException("Request object does not have required field ResourceArn set"); request.AddPathResource("{resourceArn}", StringUtils.FromString(publicRequest.ResourceArn)); request.ResourcePath = "/tags/{resourceArn}"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("tags"); context.Writer.WriteObjectStart(); foreach (var publicRequestTagsKvp in publicRequest.Tags) { context.Writer.WritePropertyName(publicRequestTagsKvp.Key); var publicRequestTagsValue = publicRequestTagsKvp.Value; context.Writer.Write(publicRequestTagsValue); } context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static TagResourceRequestMarshaller _instance = new TagResourceRequestMarshaller(); internal static TagResourceRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static TagResourceRequestMarshaller Instance { get { return _instance; } } } }
112
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for TagResource operation /// </summary> public class TagResourceResponseUnmarshaller : 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) { TagResourceResponse response = new TagResourceResponse(); 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static TagResourceResponseUnmarshaller _instance = new TagResourceResponseUnmarshaller(); internal static TagResourceResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static TagResourceResponseUnmarshaller Instance { get { return _instance; } } } }
115
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ThrottlingException Object /// </summary> public class ThrottlingExceptionUnmarshaller : IErrorResponseUnmarshaller<ThrottlingException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ThrottlingException 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 ThrottlingException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); ThrottlingException unmarshalledObject = new ThrottlingException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Retry-After", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.RetryAfterSeconds = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ThrottlingExceptionUnmarshaller _instance = new ThrottlingExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ThrottlingExceptionUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Trail Marshaller /// </summary> public class TrailMarshaller : IRequestMarshaller<Trail, 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(Trail requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAllRegions()) { context.Writer.WritePropertyName("allRegions"); context.Writer.Write(requestObject.AllRegions); } if(requestObject.IsSetCloudTrailArn()) { context.Writer.WritePropertyName("cloudTrailArn"); context.Writer.Write(requestObject.CloudTrailArn); } if(requestObject.IsSetRegions()) { context.Writer.WritePropertyName("regions"); context.Writer.WriteArrayStart(); foreach(var requestObjectRegionsListValue in requestObject.Regions) { context.Writer.Write(requestObjectRegionsListValue); } context.Writer.WriteArrayEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static TrailMarshaller Instance = new TrailMarshaller(); } }
79
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for TrailProperties Object /// </summary> public class TrailPropertiesUnmarshaller : IUnmarshaller<TrailProperties, XmlUnmarshallerContext>, IUnmarshaller<TrailProperties, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> TrailProperties IUnmarshaller<TrailProperties, 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 TrailProperties Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; TrailProperties unmarshalledObject = new TrailProperties(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("allRegions", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.AllRegions = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("cloudTrailArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.CloudTrailArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("regions", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.Regions = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static TrailPropertiesUnmarshaller _instance = new TrailPropertiesUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static TrailPropertiesUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// UntagResource Request Marshaller /// </summary> public class UntagResourceRequestMarshaller : IMarshaller<IRequest, UntagResourceRequest> , 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((UntagResourceRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(UntagResourceRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetResourceArn()) throw new AmazonAccessAnalyzerException("Request object does not have required field ResourceArn set"); request.AddPathResource("{resourceArn}", StringUtils.FromString(publicRequest.ResourceArn)); if (publicRequest.IsSetTagKeys()) request.ParameterCollection.Add("tagKeys", publicRequest.TagKeys); request.ResourcePath = "/tags/{resourceArn}"; request.UseQueryString = true; return request; } private static UntagResourceRequestMarshaller _instance = new UntagResourceRequestMarshaller(); internal static UntagResourceRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static UntagResourceRequestMarshaller 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for UntagResource operation /// </summary> public class UntagResourceResponseUnmarshaller : 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) { UntagResourceResponse response = new UntagResourceResponse(); 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static UntagResourceResponseUnmarshaller _instance = new UntagResourceResponseUnmarshaller(); internal static UntagResourceResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static UntagResourceResponseUnmarshaller Instance { get { return _instance; } } } }
115
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// UpdateArchiveRule Request Marshaller /// </summary> public class UpdateArchiveRuleRequestMarshaller : IMarshaller<IRequest, UpdateArchiveRuleRequest> , 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((UpdateArchiveRuleRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(UpdateArchiveRuleRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "PUT"; if (!publicRequest.IsSetAnalyzerName()) throw new AmazonAccessAnalyzerException("Request object does not have required field AnalyzerName set"); request.AddPathResource("{analyzerName}", StringUtils.FromString(publicRequest.AnalyzerName)); if (!publicRequest.IsSetRuleName()) throw new AmazonAccessAnalyzerException("Request object does not have required field RuleName set"); request.AddPathResource("{ruleName}", StringUtils.FromString(publicRequest.RuleName)); request.ResourcePath = "/analyzer/{analyzerName}/archive-rule/{ruleName}"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientToken()) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(publicRequest.ClientToken); } else if(!(publicRequest.IsSetClientToken())) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetFilter()) { context.Writer.WritePropertyName("filter"); context.Writer.WriteObjectStart(); foreach (var publicRequestFilterKvp in publicRequest.Filter) { context.Writer.WritePropertyName(publicRequestFilterKvp.Key); var publicRequestFilterValue = publicRequestFilterKvp.Value; context.Writer.WriteObjectStart(); var marshaller = CriterionMarshaller.Instance; marshaller.Marshall(publicRequestFilterValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static UpdateArchiveRuleRequestMarshaller _instance = new UpdateArchiveRuleRequestMarshaller(); internal static UpdateArchiveRuleRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static UpdateArchiveRuleRequestMarshaller Instance { get { return _instance; } } } }
131
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for UpdateArchiveRule operation /// </summary> public class UpdateArchiveRuleResponseUnmarshaller : 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) { UpdateArchiveRuleResponse response = new UpdateArchiveRuleResponse(); 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static UpdateArchiveRuleResponseUnmarshaller _instance = new UpdateArchiveRuleResponseUnmarshaller(); internal static UpdateArchiveRuleResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static UpdateArchiveRuleResponseUnmarshaller Instance { get { return _instance; } } } }
115
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// UpdateFindings Request Marshaller /// </summary> public class UpdateFindingsRequestMarshaller : IMarshaller<IRequest, UpdateFindingsRequest> , 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((UpdateFindingsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(UpdateFindingsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "PUT"; request.ResourcePath = "/finding"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAnalyzerArn()) { context.Writer.WritePropertyName("analyzerArn"); context.Writer.Write(publicRequest.AnalyzerArn); } if(publicRequest.IsSetClientToken()) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(publicRequest.ClientToken); } else if(!(publicRequest.IsSetClientToken())) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetIds()) { context.Writer.WritePropertyName("ids"); context.Writer.WriteArrayStart(); foreach(var publicRequestIdsListValue in publicRequest.Ids) { context.Writer.Write(publicRequestIdsListValue); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetResourceArn()) { context.Writer.WritePropertyName("resourceArn"); context.Writer.Write(publicRequest.ResourceArn); } if(publicRequest.IsSetStatus()) { context.Writer.WritePropertyName("status"); context.Writer.Write(publicRequest.Status); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static UpdateFindingsRequestMarshaller _instance = new UpdateFindingsRequestMarshaller(); internal static UpdateFindingsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static UpdateFindingsRequestMarshaller Instance { get { return _instance; } } } }
135
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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for UpdateFindings operation /// </summary> public class UpdateFindingsResponseUnmarshaller : 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) { UpdateFindingsResponse response = new UpdateFindingsResponse(); 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static UpdateFindingsResponseUnmarshaller _instance = new UpdateFindingsResponseUnmarshaller(); internal static UpdateFindingsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static UpdateFindingsResponseUnmarshaller Instance { get { return _instance; } } } }
115
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ValidatePolicyFinding Object /// </summary> public class ValidatePolicyFindingUnmarshaller : IUnmarshaller<ValidatePolicyFinding, XmlUnmarshallerContext>, IUnmarshaller<ValidatePolicyFinding, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ValidatePolicyFinding IUnmarshaller<ValidatePolicyFinding, 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 ValidatePolicyFinding Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ValidatePolicyFinding unmarshalledObject = new ValidatePolicyFinding(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("findingDetails", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FindingDetails = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("findingType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FindingType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("issueCode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.IssueCode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("learnMoreLink", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.LearnMoreLink = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("locations", targetDepth)) { var unmarshaller = new ListUnmarshaller<Location, LocationUnmarshaller>(LocationUnmarshaller.Instance); unmarshalledObject.Locations = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ValidatePolicyFindingUnmarshaller _instance = new ValidatePolicyFindingUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ValidatePolicyFindingUnmarshaller Instance { get { return _instance; } } } }
116
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// ValidatePolicy Request Marshaller /// </summary> public class ValidatePolicyRequestMarshaller : IMarshaller<IRequest, ValidatePolicyRequest> , 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((ValidatePolicyRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ValidatePolicyRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AccessAnalyzer"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-11-01"; request.HttpMethod = "POST"; if (publicRequest.IsSetMaxResults()) request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken)); request.ResourcePath = "/policy/validation"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetLocale()) { context.Writer.WritePropertyName("locale"); context.Writer.Write(publicRequest.Locale); } if(publicRequest.IsSetPolicyDocument()) { context.Writer.WritePropertyName("policyDocument"); context.Writer.Write(publicRequest.PolicyDocument); } if(publicRequest.IsSetPolicyType()) { context.Writer.WritePropertyName("policyType"); context.Writer.Write(publicRequest.PolicyType); } if(publicRequest.IsSetValidatePolicyResourceType()) { context.Writer.WritePropertyName("validatePolicyResourceType"); context.Writer.Write(publicRequest.ValidatePolicyResourceType); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } request.UseQueryString = true; return request; } private static ValidatePolicyRequestMarshaller _instance = new ValidatePolicyRequestMarshaller(); internal static ValidatePolicyRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ValidatePolicyRequestMarshaller 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ValidatePolicy operation /// </summary> public class ValidatePolicyResponseUnmarshaller : 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) { ValidatePolicyResponse response = new ValidatePolicyResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("findings", targetDepth)) { var unmarshaller = new ListUnmarshaller<ValidatePolicyFinding, ValidatePolicyFindingUnmarshaller>(ValidatePolicyFindingUnmarshaller.Instance); response.Findings = 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("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerException")) { return InternalServerExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottlingException")) { return ThrottlingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAccessAnalyzerException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static ValidatePolicyResponseUnmarshaller _instance = new ValidatePolicyResponseUnmarshaller(); internal static ValidatePolicyResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ValidatePolicyResponseUnmarshaller Instance { get { return _instance; } } } }
128
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ValidationExceptionField Object /// </summary> public class ValidationExceptionFieldUnmarshaller : IUnmarshaller<ValidationExceptionField, XmlUnmarshallerContext>, IUnmarshaller<ValidationExceptionField, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ValidationExceptionField IUnmarshaller<ValidationExceptionField, 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 ValidationExceptionField Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ValidationExceptionField unmarshalledObject = new ValidationExceptionField(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("message", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Message = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ValidationExceptionFieldUnmarshaller _instance = new ValidationExceptionFieldUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ValidationExceptionFieldUnmarshaller 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ValidationException Object /// </summary> public class ValidationExceptionUnmarshaller : IErrorResponseUnmarshaller<ValidationException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ValidationException 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 ValidationException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); ValidationException unmarshalledObject = new ValidationException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("fieldList", targetDepth)) { var unmarshaller = new ListUnmarshaller<ValidationExceptionField, ValidationExceptionFieldUnmarshaller>(ValidationExceptionFieldUnmarshaller.Instance); unmarshalledObject.FieldList = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("reason", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Reason = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ValidationExceptionUnmarshaller _instance = new ValidationExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ValidationExceptionUnmarshaller 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 accessanalyzer-2019-11-01.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.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// VpcConfiguration Marshaller /// </summary> public class VpcConfigurationMarshaller : IRequestMarshaller<VpcConfiguration, 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(VpcConfiguration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetVpcId()) { context.Writer.WritePropertyName("vpcId"); context.Writer.Write(requestObject.VpcId); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static VpcConfigurationMarshaller Instance = new VpcConfigurationMarshaller(); } }
62
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AccessAnalyzer.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AccessAnalyzer.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for VpcConfiguration Object /// </summary> public class VpcConfigurationUnmarshaller : IUnmarshaller<VpcConfiguration, XmlUnmarshallerContext>, IUnmarshaller<VpcConfiguration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> VpcConfiguration IUnmarshaller<VpcConfiguration, 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 VpcConfiguration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; VpcConfiguration unmarshalledObject = new VpcConfiguration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("vpcId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.VpcId = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static VpcConfigurationUnmarshaller _instance = new VpcConfigurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static VpcConfigurationUnmarshaller 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 accessanalyzer-2019-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Text; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Paginators for the AccessAnalyzer service ///</summary> public class AccessAnalyzerPaginatorFactory : IAccessAnalyzerPaginatorFactory { private readonly IAmazonAccessAnalyzer client; internal AccessAnalyzerPaginatorFactory(IAmazonAccessAnalyzer client) { this.client = client; } /// <summary> /// Paginator for ListAccessPreviewFindings operation ///</summary> public IListAccessPreviewFindingsPaginator ListAccessPreviewFindings(ListAccessPreviewFindingsRequest request) { return new ListAccessPreviewFindingsPaginator(this.client, request); } /// <summary> /// Paginator for ListAccessPreviews operation ///</summary> public IListAccessPreviewsPaginator ListAccessPreviews(ListAccessPreviewsRequest request) { return new ListAccessPreviewsPaginator(this.client, request); } /// <summary> /// Paginator for ListAnalyzedResources operation ///</summary> public IListAnalyzedResourcesPaginator ListAnalyzedResources(ListAnalyzedResourcesRequest request) { return new ListAnalyzedResourcesPaginator(this.client, request); } /// <summary> /// Paginator for ListAnalyzers operation ///</summary> public IListAnalyzersPaginator ListAnalyzers(ListAnalyzersRequest request) { return new ListAnalyzersPaginator(this.client, request); } /// <summary> /// Paginator for ListArchiveRules operation ///</summary> public IListArchiveRulesPaginator ListArchiveRules(ListArchiveRulesRequest request) { return new ListArchiveRulesPaginator(this.client, request); } /// <summary> /// Paginator for ListFindings operation ///</summary> public IListFindingsPaginator ListFindings(ListFindingsRequest request) { return new ListFindingsPaginator(this.client, request); } /// <summary> /// Paginator for ListPolicyGenerations operation ///</summary> public IListPolicyGenerationsPaginator ListPolicyGenerations(ListPolicyGenerationsRequest request) { return new ListPolicyGenerationsPaginator(this.client, request); } /// <summary> /// Paginator for ValidatePolicy operation ///</summary> public IValidatePolicyPaginator ValidatePolicy(ValidatePolicyRequest request) { return new ValidatePolicyPaginator(this.client, request); } } }
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 accessanalyzer-2019-11-01.normal.json service model. */ namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Paginators for the AccessAnalyzer service ///</summary> public interface IAccessAnalyzerPaginatorFactory { /// <summary> /// Paginator for ListAccessPreviewFindings operation ///</summary> IListAccessPreviewFindingsPaginator ListAccessPreviewFindings(ListAccessPreviewFindingsRequest request); /// <summary> /// Paginator for ListAccessPreviews operation ///</summary> IListAccessPreviewsPaginator ListAccessPreviews(ListAccessPreviewsRequest request); /// <summary> /// Paginator for ListAnalyzedResources operation ///</summary> IListAnalyzedResourcesPaginator ListAnalyzedResources(ListAnalyzedResourcesRequest request); /// <summary> /// Paginator for ListAnalyzers operation ///</summary> IListAnalyzersPaginator ListAnalyzers(ListAnalyzersRequest request); /// <summary> /// Paginator for ListArchiveRules operation ///</summary> IListArchiveRulesPaginator ListArchiveRules(ListArchiveRulesRequest request); /// <summary> /// Paginator for ListFindings operation ///</summary> IListFindingsPaginator ListFindings(ListFindingsRequest request); /// <summary> /// Paginator for ListPolicyGenerations operation ///</summary> IListPolicyGenerationsPaginator ListPolicyGenerations(ListPolicyGenerationsRequest request); /// <summary> /// Paginator for ValidatePolicy operation ///</summary> IValidatePolicyPaginator ValidatePolicy(ValidatePolicyRequest request); } }
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 accessanalyzer-2019-11-01.normal.json service model. */ using Amazon.Runtime; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Paginator for the ListAccessPreviewFindings operation ///</summary> public interface IListAccessPreviewFindingsPaginator { /// <summary> /// Enumerable containing all full responses for the operation /// </summary> IPaginatedEnumerable<ListAccessPreviewFindingsResponse> Responses { get; } /// <summary> /// Enumerable containing all of the Findings /// </summary> IPaginatedEnumerable<AccessPreviewFinding> Findings { get; } } }
38
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 accessanalyzer-2019-11-01.normal.json service model. */ using Amazon.Runtime; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Paginator for the ListAccessPreviews operation ///</summary> public interface IListAccessPreviewsPaginator { /// <summary> /// Enumerable containing all full responses for the operation /// </summary> IPaginatedEnumerable<ListAccessPreviewsResponse> Responses { get; } /// <summary> /// Enumerable containing all of the AccessPreviews /// </summary> IPaginatedEnumerable<AccessPreviewSummary> AccessPreviews { get; } } }
38
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 accessanalyzer-2019-11-01.normal.json service model. */ using Amazon.Runtime; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Paginator for the ListAnalyzedResources operation ///</summary> public interface IListAnalyzedResourcesPaginator { /// <summary> /// Enumerable containing all full responses for the operation /// </summary> IPaginatedEnumerable<ListAnalyzedResourcesResponse> Responses { get; } /// <summary> /// Enumerable containing all of the AnalyzedResources /// </summary> IPaginatedEnumerable<AnalyzedResourceSummary> AnalyzedResources { get; } } }
38
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 accessanalyzer-2019-11-01.normal.json service model. */ using Amazon.Runtime; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Paginator for the ListAnalyzers operation ///</summary> public interface IListAnalyzersPaginator { /// <summary> /// Enumerable containing all full responses for the operation /// </summary> IPaginatedEnumerable<ListAnalyzersResponse> Responses { get; } /// <summary> /// Enumerable containing all of the Analyzers /// </summary> IPaginatedEnumerable<AnalyzerSummary> Analyzers { get; } } }
38
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 accessanalyzer-2019-11-01.normal.json service model. */ using Amazon.Runtime; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Paginator for the ListArchiveRules operation ///</summary> public interface IListArchiveRulesPaginator { /// <summary> /// Enumerable containing all full responses for the operation /// </summary> IPaginatedEnumerable<ListArchiveRulesResponse> Responses { get; } /// <summary> /// Enumerable containing all of the ArchiveRules /// </summary> IPaginatedEnumerable<ArchiveRuleSummary> ArchiveRules { get; } } }
38
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 accessanalyzer-2019-11-01.normal.json service model. */ using Amazon.Runtime; namespace Amazon.AccessAnalyzer.Model { /// <summary> /// Paginator for the ListFindings operation ///</summary> public interface IListFindingsPaginator { /// <summary> /// Enumerable containing all full responses for the operation /// </summary> IPaginatedEnumerable<ListFindingsResponse> Responses { get; } /// <summary> /// Enumerable containing all of the Findings /// </summary> IPaginatedEnumerable<FindingSummary> Findings { get; } } }
38