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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// The API request rate limits. /// </summary> public partial class ThrottleSettings { private int? _burstLimit; private double? _rateLimit; /// <summary> /// Gets and sets the property BurstLimit. /// <para> /// The API target request burst rate limit. This allows more requests through for a period /// of time than the target rate limit. /// </para> /// </summary> public int BurstLimit { get { return this._burstLimit.GetValueOrDefault(); } set { this._burstLimit = value; } } // Check to see if BurstLimit property is set internal bool IsSetBurstLimit() { return this._burstLimit.HasValue; } /// <summary> /// Gets and sets the property RateLimit. /// <para> /// The API target request rate limit. /// </para> /// </summary> public double RateLimit { get { return this._rateLimit.GetValueOrDefault(); } set { this._rateLimit = value; } } // Check to see if RateLimit property is set internal bool IsSetRateLimit() { return this._rateLimit.HasValue; } } }
77
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Specifies the TLS configuration for an integration. /// </summary> public partial class TlsConfig { private bool? _insecureSkipVerification; /// <summary> /// Gets and sets the property InsecureSkipVerification. /// <para> /// Specifies whether or not API Gateway skips verification that the certificate for an /// integration endpoint is issued by a supported certificate authority. This isn’t recommended, /// but it enables you to use certificates that are signed by private certificate authorities, /// or certificates that are self-signed. If enabled, API Gateway still performs basic /// certificate validation, which includes checking the certificate's expiration date, /// hostname, and presence of a root certificate authority. Supported only for <code>HTTP</code> /// and <code>HTTP_PROXY</code> integrations. /// </para> /// <important> /// <para> /// Enabling <code>insecureSkipVerification</code> isn't recommended, especially for integrations /// with public HTTPS endpoints. If you enable <code>insecureSkipVerification</code>, /// you increase the risk of man-in-the-middle attacks. /// </para> /// </important> /// </summary> public bool InsecureSkipVerification { get { return this._insecureSkipVerification.GetValueOrDefault(); } set { this._insecureSkipVerification = value; } } // Check to see if InsecureSkipVerification property is set internal bool IsSetInsecureSkipVerification() { return this._insecureSkipVerification.HasValue; } } }
70
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// The request has reached its throttling limit. Retry after the specified time period. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class TooManyRequestsException : AmazonAPIGatewayException { private string _retryAfterSeconds; /// <summary> /// Constructs a new TooManyRequestsException with the specified error /// message. /// </summary> /// <param name="message"> /// Describes the error encountered. /// </param> public TooManyRequestsException(string message) : base(message) {} /// <summary> /// Construct instance of TooManyRequestsException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> public TooManyRequestsException(string message, Exception innerException) : base(message, innerException) {} /// <summary> /// Construct instance of TooManyRequestsException /// </summary> /// <param name="innerException"></param> public TooManyRequestsException(Exception innerException) : base(innerException) {} /// <summary> /// Construct instance of TooManyRequestsException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public TooManyRequestsException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, innerException, errorType, errorCode, requestId, statusCode) {} /// <summary> /// Construct instance of TooManyRequestsException /// </summary> /// <param name="message"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public TooManyRequestsException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, errorType, errorCode, requestId, statusCode) {} #if !NETSTANDARD /// <summary> /// Constructs a new instance of the TooManyRequestsException class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected TooManyRequestsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.RetryAfterSeconds = (string)info.GetValue("RetryAfterSeconds", typeof(string)); } /// <summary> /// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception> #if BCL35 [System.Security.Permissions.SecurityPermission( System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] #endif [System.Security.SecurityCritical] // These FxCop rules are giving false-positives for this method [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { base.GetObjectData(info, context); info.AddValue("RetryAfterSeconds", this.RetryAfterSeconds); } #endif /// <summary> /// Gets and sets the property RetryAfterSeconds. /// </summary> public string RetryAfterSeconds { get { return this._retryAfterSeconds; } set { this._retryAfterSeconds = value; } } // Check to see if RetryAfterSeconds property is set internal bool IsSetRetryAfterSeconds() { return this._retryAfterSeconds != null; } } }
142
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// The request is denied because the caller has insufficient permissions. /// </summary> #if !NETSTANDARD [Serializable] #endif public partial class UnauthorizedException : AmazonAPIGatewayException { /// <summary> /// Constructs a new UnauthorizedException with the specified error /// message. /// </summary> /// <param name="message"> /// Describes the error encountered. /// </param> public UnauthorizedException(string message) : base(message) {} /// <summary> /// Construct instance of UnauthorizedException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> public UnauthorizedException(string message, Exception innerException) : base(message, innerException) {} /// <summary> /// Construct instance of UnauthorizedException /// </summary> /// <param name="innerException"></param> public UnauthorizedException(Exception innerException) : base(innerException) {} /// <summary> /// Construct instance of UnauthorizedException /// </summary> /// <param name="message"></param> /// <param name="innerException"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public UnauthorizedException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, innerException, errorType, errorCode, requestId, statusCode) {} /// <summary> /// Construct instance of UnauthorizedException /// </summary> /// <param name="message"></param> /// <param name="errorType"></param> /// <param name="errorCode"></param> /// <param name="requestId"></param> /// <param name="statusCode"></param> public UnauthorizedException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode) : base(message, errorType, errorCode, requestId, statusCode) {} #if !NETSTANDARD /// <summary> /// Constructs a new instance of the UnauthorizedException class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected UnauthorizedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } /// <summary> /// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception> #if BCL35 [System.Security.Permissions.SecurityPermission( System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] #endif [System.Security.SecurityCritical] // These FxCop rules are giving false-positives for this method [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { base.GetObjectData(info, context); } #endif } }
124
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UntagResource operation. /// Removes a tag from a given resource. /// </summary> public partial class UntagResourceRequest : AmazonAPIGatewayRequest { private string _resourceArn; private List<string> _tagKeys = new List<string>(); /// <summary> /// Gets and sets the property ResourceArn. /// <para> /// The ARN of a resource that can be tagged. /// </para> /// </summary> [AWSProperty(Required=true)] public string ResourceArn { get { return this._resourceArn; } set { this._resourceArn = value; } } // Check to see if ResourceArn property is set internal bool IsSetResourceArn() { return this._resourceArn != null; } /// <summary> /// Gets and sets the property TagKeys. /// <para> /// The Tag keys to delete. /// </para> /// </summary> [AWSProperty(Required=true)] public List<string> TagKeys { get { return this._tagKeys; } set { this._tagKeys = value; } } // Check to see if TagKeys property is set internal bool IsSetTagKeys() { return this._tagKeys != null && this._tagKeys.Count > 0; } } }
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// This is the response object from the UntagResource operation. /// </summary> public partial class UntagResourceResponse : AmazonWebServiceResponse { } }
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateAccount operation. /// Changes information about the current Account resource. /// </summary> public partial class UpdateAccountRequest : AmazonAPIGatewayRequest { private List<PatchOperation> _patchOperations = new List<PatchOperation>(); /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } } }
59
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents an AWS account that is associated with API Gateway. /// </summary> public partial class UpdateAccountResponse : AmazonWebServiceResponse { private string _apiKeyVersion; private string _cloudwatchRoleArn; private List<string> _features = new List<string>(); private ThrottleSettings _throttleSettings; /// <summary> /// Gets and sets the property ApiKeyVersion. /// <para> /// The version of the API keys used for the account. /// </para> /// </summary> public string ApiKeyVersion { get { return this._apiKeyVersion; } set { this._apiKeyVersion = value; } } // Check to see if ApiKeyVersion property is set internal bool IsSetApiKeyVersion() { return this._apiKeyVersion != null; } /// <summary> /// Gets and sets the property CloudwatchRoleArn. /// <para> /// The ARN of an Amazon CloudWatch role for the current Account. /// </para> /// </summary> public string CloudwatchRoleArn { get { return this._cloudwatchRoleArn; } set { this._cloudwatchRoleArn = value; } } // Check to see if CloudwatchRoleArn property is set internal bool IsSetCloudwatchRoleArn() { return this._cloudwatchRoleArn != null; } /// <summary> /// Gets and sets the property Features. /// <para> /// A list of features supported for the account. When usage plans are enabled, the features /// list will include an entry of <code>"UsagePlans"</code>. /// </para> /// </summary> public List<string> Features { get { return this._features; } set { this._features = value; } } // Check to see if Features property is set internal bool IsSetFeatures() { return this._features != null && this._features.Count > 0; } /// <summary> /// Gets and sets the property ThrottleSettings. /// <para> /// Specifies the API request limits configured for the current Account. /// </para> /// </summary> public ThrottleSettings ThrottleSettings { get { return this._throttleSettings; } set { this._throttleSettings = value; } } // Check to see if ThrottleSettings property is set internal bool IsSetThrottleSettings() { return this._throttleSettings != null; } } }
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateApiKey operation. /// Changes information about an ApiKey resource. /// </summary> public partial class UpdateApiKeyRequest : AmazonAPIGatewayRequest { private string _apiKey; private List<PatchOperation> _patchOperations = new List<PatchOperation>(); /// <summary> /// Gets and sets the property ApiKey. /// <para> /// The identifier of the ApiKey resource to be updated. /// </para> /// </summary> [AWSProperty(Required=true)] public string ApiKey { get { return this._apiKey; } set { this._apiKey = value; } } // Check to see if ApiKey property is set internal bool IsSetApiKey() { return this._apiKey != null; } /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } } }
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// A resource that can be distributed to callers for executing Method resources that /// require an API key. API keys can be mapped to any Stage on any RestApi, which indicates /// that the callers with the API key can make requests to that stage. /// </summary> public partial class UpdateApiKeyResponse : AmazonWebServiceResponse { private DateTime? _createdDate; private string _customerId; private string _description; private bool? _enabled; private string _id; private DateTime? _lastUpdatedDate; private string _name; private List<string> _stageKeys = new List<string>(); private Dictionary<string, string> _tags = new Dictionary<string, string>(); private string _value; /// <summary> /// Gets and sets the property CreatedDate. /// <para> /// The timestamp when the API Key was created. /// </para> /// </summary> public DateTime CreatedDate { get { return this._createdDate.GetValueOrDefault(); } set { this._createdDate = value; } } // Check to see if CreatedDate property is set internal bool IsSetCreatedDate() { return this._createdDate.HasValue; } /// <summary> /// Gets and sets the property CustomerId. /// <para> /// An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace. /// </para> /// </summary> public string CustomerId { get { return this._customerId; } set { this._customerId = value; } } // Check to see if CustomerId property is set internal bool IsSetCustomerId() { return this._customerId != null; } /// <summary> /// Gets and sets the property Description. /// <para> /// The description of the API Key. /// </para> /// </summary> public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property Enabled. /// <para> /// Specifies whether the API Key can be used by callers. /// </para> /// </summary> public bool Enabled { get { return this._enabled.GetValueOrDefault(); } set { this._enabled = value; } } // Check to see if Enabled property is set internal bool IsSetEnabled() { return this._enabled.HasValue; } /// <summary> /// Gets and sets the property Id. /// <para> /// The identifier of the API Key. /// </para> /// </summary> public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } /// <summary> /// Gets and sets the property LastUpdatedDate. /// <para> /// The timestamp when the API Key was last updated. /// </para> /// </summary> public DateTime LastUpdatedDate { get { return this._lastUpdatedDate.GetValueOrDefault(); } set { this._lastUpdatedDate = value; } } // Check to see if LastUpdatedDate property is set internal bool IsSetLastUpdatedDate() { return this._lastUpdatedDate.HasValue; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of the API Key. /// </para> /// </summary> public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property StageKeys. /// <para> /// A list of Stage resources that are associated with the ApiKey resource. /// </para> /// </summary> public List<string> StageKeys { get { return this._stageKeys; } set { this._stageKeys = value; } } // Check to see if StageKeys property is set internal bool IsSetStageKeys() { return this._stageKeys != null && this._stageKeys.Count > 0; } /// <summary> /// Gets and sets the property Tags. /// <para> /// The collection of tags. Each tag element is associated with a given resource. /// </para> /// </summary> public Dictionary<string, string> Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } /// <summary> /// Gets and sets the property Value. /// <para> /// The value of the API Key. /// </para> /// </summary> public string Value { get { return this._value; } set { this._value = value; } } // Check to see if Value property is set internal bool IsSetValue() { return this._value != null; } } }
230
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateAuthorizer operation. /// Updates an existing Authorizer resource. /// </summary> public partial class UpdateAuthorizerRequest : AmazonAPIGatewayRequest { private string _authorizerId; private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private string _restApiId; /// <summary> /// Gets and sets the property AuthorizerId. /// <para> /// The identifier of the Authorizer resource. /// </para> /// </summary> [AWSProperty(Required=true)] public string AuthorizerId { get { return this._authorizerId; } set { this._authorizerId = value; } } // Check to see if AuthorizerId property is set internal bool IsSetAuthorizerId() { return this._authorizerId != null; } /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property RestApiId. /// <para> /// The string identifier of the associated RestApi. /// </para> /// </summary> [AWSProperty(Required=true)] public string RestApiId { get { return this._restApiId; } set { this._restApiId = value; } } // Check to see if RestApiId property is set internal bool IsSetRestApiId() { return this._restApiId != null; } } }
99
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents an authorization layer for methods. If enabled on a method, API Gateway /// will activate the authorizer when a client calls the method. /// </summary> public partial class UpdateAuthorizerResponse : AmazonWebServiceResponse { private string _authorizerCredentials; private int? _authorizerResultTtlInSeconds; private string _authorizerUri; private string _authType; private string _id; private string _identitySource; private string _identityValidationExpression; private string _name; private List<string> _providerarNs = new List<string>(); private AuthorizerType _type; /// <summary> /// Gets and sets the property AuthorizerCredentials. /// <para> /// Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. /// To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name /// (ARN). To use resource-based permissions on the Lambda function, specify null. /// </para> /// </summary> public string AuthorizerCredentials { get { return this._authorizerCredentials; } set { this._authorizerCredentials = value; } } // Check to see if AuthorizerCredentials property is set internal bool IsSetAuthorizerCredentials() { return this._authorizerCredentials != null; } /// <summary> /// Gets and sets the property AuthorizerResultTtlInSeconds. /// <para> /// The TTL in seconds of cached authorizer results. If it equals 0, authorization caching /// is disabled. If it is greater than 0, API Gateway will cache authorizer responses. /// If this field is not set, the default value is 300. The maximum value is 3600, or /// 1 hour. /// </para> /// </summary> public int AuthorizerResultTtlInSeconds { get { return this._authorizerResultTtlInSeconds.GetValueOrDefault(); } set { this._authorizerResultTtlInSeconds = value; } } // Check to see if AuthorizerResultTtlInSeconds property is set internal bool IsSetAuthorizerResultTtlInSeconds() { return this._authorizerResultTtlInSeconds.HasValue; } /// <summary> /// Gets and sets the property AuthorizerUri. /// <para> /// Specifies the authorizer's Uniform Resource Identifier (URI). For <code>TOKEN</code> /// or <code>REQUEST</code> authorizers, this must be a well-formed Lambda function URI, /// for example, <code>arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations</code>. /// In general, the URI has this form <code>arn:aws:apigateway:{region}:lambda:path/{service_api}</code>, /// where <code>{region}</code> is the same as the region hosting the Lambda function, /// <code>path</code> indicates that the remaining substring in the URI should be treated /// as the path to the resource, including the initial <code>/</code>. For Lambda functions, /// this is usually of the form <code>/2015-03-31/functions/[FunctionARN]/invocations</code>. /// </para> /// </summary> public string AuthorizerUri { get { return this._authorizerUri; } set { this._authorizerUri = value; } } // Check to see if AuthorizerUri property is set internal bool IsSetAuthorizerUri() { return this._authorizerUri != null; } /// <summary> /// Gets and sets the property AuthType. /// <para> /// Optional customer-defined field, used in OpenAPI imports and exports without functional /// impact. /// </para> /// </summary> public string AuthType { get { return this._authType; } set { this._authType = value; } } // Check to see if AuthType property is set internal bool IsSetAuthType() { return this._authType != null; } /// <summary> /// Gets and sets the property Id. /// <para> /// The identifier for the authorizer resource. /// </para> /// </summary> public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } /// <summary> /// Gets and sets the property IdentitySource. /// <para> /// The identity source for which authorization is requested. For a <code>TOKEN</code> /// or <code>COGNITO_USER_POOLS</code> authorizer, this is required and specifies the /// request header mapping expression for the custom header holding the authorization /// token submitted by the client. For example, if the token header name is <code>Auth</code>, /// the header mapping expression is <code>method.request.header.Auth</code>. For the /// <code>REQUEST</code> authorizer, this is required when authorization caching is enabled. /// The value is a comma-separated string of one or more mapping expressions of the specified /// request parameters. For example, if an <code>Auth</code> header, a <code>Name</code> /// query string parameter are defined as identity sources, this value is <code>method.request.header.Auth</code>, /// <code>method.request.querystring.Name</code>. These parameters will be used to derive /// the authorization caching key and to perform runtime validation of the <code>REQUEST</code> /// authorizer by verifying all of the identity-related request parameters are present, /// not null and non-empty. Only when this is true does the authorizer invoke the authorizer /// Lambda function, otherwise, it returns a 401 Unauthorized response without calling /// the Lambda function. The valid value is a string of comma-separated mapping expressions /// of the specified request parameters. When the authorization caching is not enabled, /// this property is optional. /// </para> /// </summary> public string IdentitySource { get { return this._identitySource; } set { this._identitySource = value; } } // Check to see if IdentitySource property is set internal bool IsSetIdentitySource() { return this._identitySource != null; } /// <summary> /// Gets and sets the property IdentityValidationExpression. /// <para> /// A validation expression for the incoming identity token. For <code>TOKEN</code> authorizers, /// this value is a regular expression. For <code>COGNITO_USER_POOLS</code> authorizers, /// API Gateway will match the <code>aud</code> field of the incoming token from the client /// against the specified regular expression. It will invoke the authorizer's Lambda function /// when there is a match. Otherwise, it will return a 401 Unauthorized response without /// calling the Lambda function. The validation expression does not apply to the <code>REQUEST</code> /// authorizer. /// </para> /// </summary> public string IdentityValidationExpression { get { return this._identityValidationExpression; } set { this._identityValidationExpression = value; } } // Check to see if IdentityValidationExpression property is set internal bool IsSetIdentityValidationExpression() { return this._identityValidationExpression != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of the authorizer. /// </para> /// </summary> public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property ProviderARNs. /// <para> /// A list of the Amazon Cognito user pool ARNs for the <code>COGNITO_USER_POOLS</code> /// authorizer. Each element is of this format: <code>arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}</code>. /// For a <code>TOKEN</code> or <code>REQUEST</code> authorizer, this is not defined. /// /// </para> /// </summary> public List<string> ProviderARNs { get { return this._providerarNs; } set { this._providerarNs = value; } } // Check to see if ProviderARNs property is set internal bool IsSetProviderARNs() { return this._providerarNs != null && this._providerarNs.Count > 0; } /// <summary> /// Gets and sets the property Type. /// <para> /// The authorizer type. Valid values are <code>TOKEN</code> for a Lambda function using /// a single authorization token submitted in a custom header, <code>REQUEST</code> for /// a Lambda function using incoming request parameters, and <code>COGNITO_USER_POOLS</code> /// for using an Amazon Cognito user pool. /// </para> /// </summary> public AuthorizerType Type { get { return this._type; } set { this._type = value; } } // Check to see if Type property is set internal bool IsSetType() { return this._type != null; } } }
270
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateBasePathMapping operation. /// Changes information about the BasePathMapping resource. /// </summary> public partial class UpdateBasePathMappingRequest : AmazonAPIGatewayRequest { private string _basePath; private string _domainName; private List<PatchOperation> _patchOperations = new List<PatchOperation>(); /// <summary> /// Gets and sets the property BasePath. /// <para> /// The base path of the BasePathMapping resource to change. /// </para> /// /// <para> /// To specify an empty base path, set this parameter to <code>'(none)'</code>. /// </para> /// </summary> [AWSProperty(Required=true)] public string BasePath { get { return this._basePath; } set { this._basePath = value; } } // Check to see if BasePath property is set internal bool IsSetBasePath() { return this._basePath != null; } /// <summary> /// Gets and sets the property DomainName. /// <para> /// The domain name of the BasePathMapping resource to change. /// </para> /// </summary> [AWSProperty(Required=true)] public string DomainName { get { return this._domainName; } set { this._domainName = value; } } // Check to see if DomainName property is set internal bool IsSetDomainName() { return this._domainName != null; } /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } } }
103
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents the base path that callers of the API must provide as part of the URL after /// the domain name. /// </summary> public partial class UpdateBasePathMappingResponse : AmazonWebServiceResponse { private string _basePath; private string _restApiId; private string _stage; /// <summary> /// Gets and sets the property BasePath. /// <para> /// The base path name that callers of the API must provide as part of the URL after the /// domain name. /// </para> /// </summary> public string BasePath { get { return this._basePath; } set { this._basePath = value; } } // Check to see if BasePath property is set internal bool IsSetBasePath() { return this._basePath != null; } /// <summary> /// Gets and sets the property RestApiId. /// <para> /// The string identifier of the associated RestApi. /// </para> /// </summary> public string RestApiId { get { return this._restApiId; } set { this._restApiId = value; } } // Check to see if RestApiId property is set internal bool IsSetRestApiId() { return this._restApiId != null; } /// <summary> /// Gets and sets the property Stage. /// <para> /// The name of the associated stage. /// </para> /// </summary> public string Stage { get { return this._stage; } set { this._stage = value; } } // Check to see if Stage property is set internal bool IsSetStage() { return this._stage != null; } } }
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateClientCertificate operation. /// Changes information about an ClientCertificate resource. /// </summary> public partial class UpdateClientCertificateRequest : AmazonAPIGatewayRequest { private string _clientCertificateId; private List<PatchOperation> _patchOperations = new List<PatchOperation>(); /// <summary> /// Gets and sets the property ClientCertificateId. /// <para> /// The identifier of the ClientCertificate resource to be updated. /// </para> /// </summary> [AWSProperty(Required=true)] public string ClientCertificateId { get { return this._clientCertificateId; } set { this._clientCertificateId = value; } } // Check to see if ClientCertificateId property is set internal bool IsSetClientCertificateId() { return this._clientCertificateId != null; } /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } } }
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents a client certificate used to configure client-side SSL authentication while /// sending requests to the integration endpoint. /// </summary> public partial class UpdateClientCertificateResponse : AmazonWebServiceResponse { private string _clientCertificateId; private DateTime? _createdDate; private string _description; private DateTime? _expirationDate; private string _pemEncodedCertificate; private Dictionary<string, string> _tags = new Dictionary<string, string>(); /// <summary> /// Gets and sets the property ClientCertificateId. /// <para> /// The identifier of the client certificate. /// </para> /// </summary> public string ClientCertificateId { get { return this._clientCertificateId; } set { this._clientCertificateId = value; } } // Check to see if ClientCertificateId property is set internal bool IsSetClientCertificateId() { return this._clientCertificateId != null; } /// <summary> /// Gets and sets the property CreatedDate. /// <para> /// The timestamp when the client certificate was created. /// </para> /// </summary> public DateTime CreatedDate { get { return this._createdDate.GetValueOrDefault(); } set { this._createdDate = value; } } // Check to see if CreatedDate property is set internal bool IsSetCreatedDate() { return this._createdDate.HasValue; } /// <summary> /// Gets and sets the property Description. /// <para> /// The description of the client certificate. /// </para> /// </summary> public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property ExpirationDate. /// <para> /// The timestamp when the client certificate will expire. /// </para> /// </summary> public DateTime ExpirationDate { get { return this._expirationDate.GetValueOrDefault(); } set { this._expirationDate = value; } } // Check to see if ExpirationDate property is set internal bool IsSetExpirationDate() { return this._expirationDate.HasValue; } /// <summary> /// Gets and sets the property PemEncodedCertificate. /// <para> /// The PEM-encoded public key of the client certificate, which can be used to configure /// certificate authentication in the integration endpoint . /// </para> /// </summary> public string PemEncodedCertificate { get { return this._pemEncodedCertificate; } set { this._pemEncodedCertificate = value; } } // Check to see if PemEncodedCertificate property is set internal bool IsSetPemEncodedCertificate() { return this._pemEncodedCertificate != null; } /// <summary> /// Gets and sets the property Tags. /// <para> /// The collection of tags. Each tag element is associated with a given resource. /// </para> /// </summary> public Dictionary<string, string> Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } } }
154
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateDeployment operation. /// Changes information about a Deployment resource. /// </summary> public partial class UpdateDeploymentRequest : AmazonAPIGatewayRequest { private string _deploymentId; private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private string _restApiId; /// <summary> /// Gets and sets the property DeploymentId. /// <para> /// The replacement identifier for the Deployment resource to change information about. /// </para> /// </summary> [AWSProperty(Required=true)] public string DeploymentId { get { return this._deploymentId; } set { this._deploymentId = value; } } // Check to see if DeploymentId property is set internal bool IsSetDeploymentId() { return this._deploymentId != null; } /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property RestApiId. /// <para> /// The string identifier of the associated RestApi. /// </para> /// </summary> [AWSProperty(Required=true)] public string RestApiId { get { return this._restApiId; } set { this._restApiId = value; } } // Check to see if RestApiId property is set internal bool IsSetRestApiId() { return this._restApiId != null; } } }
99
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// An immutable representation of a RestApi resource that can be called by users using /// Stages. A deployment must be associated with a Stage for it to be callable over the /// Internet. /// </summary> public partial class UpdateDeploymentResponse : AmazonWebServiceResponse { private Dictionary<string, Dictionary<string, MethodSnapshot>> _apiSummary = new Dictionary<string, Dictionary<string, MethodSnapshot>>(); private DateTime? _createdDate; private string _description; private string _id; /// <summary> /// Gets and sets the property ApiSummary. /// <para> /// A summary of the RestApi at the date and time that the deployment resource was created. /// </para> /// </summary> public Dictionary<string, Dictionary<string, MethodSnapshot>> ApiSummary { get { return this._apiSummary; } set { this._apiSummary = value; } } // Check to see if ApiSummary property is set internal bool IsSetApiSummary() { return this._apiSummary != null && this._apiSummary.Count > 0; } /// <summary> /// Gets and sets the property CreatedDate. /// <para> /// The date and time that the deployment resource was created. /// </para> /// </summary> public DateTime CreatedDate { get { return this._createdDate.GetValueOrDefault(); } set { this._createdDate = value; } } // Check to see if CreatedDate property is set internal bool IsSetCreatedDate() { return this._createdDate.HasValue; } /// <summary> /// Gets and sets the property Description. /// <para> /// The description for the deployment resource. /// </para> /// </summary> public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property Id. /// <para> /// The identifier for the deployment resource. /// </para> /// </summary> public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } } }
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateDocumentationPart operation. /// Updates a documentation part. /// </summary> public partial class UpdateDocumentationPartRequest : AmazonAPIGatewayRequest { private string _documentationPartId; private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private string _restApiId; /// <summary> /// Gets and sets the property DocumentationPartId. /// <para> /// The identifier of the to-be-updated documentation part. /// </para> /// </summary> [AWSProperty(Required=true)] public string DocumentationPartId { get { return this._documentationPartId; } set { this._documentationPartId = value; } } // Check to see if DocumentationPartId property is set internal bool IsSetDocumentationPartId() { return this._documentationPartId != null; } /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property RestApiId. /// <para> /// The string identifier of the associated RestApi. /// </para> /// </summary> [AWSProperty(Required=true)] public string RestApiId { get { return this._restApiId; } set { this._restApiId = value; } } // Check to see if RestApiId property is set internal bool IsSetRestApiId() { return this._restApiId != null; } } }
99
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// A documentation part for a targeted API entity. /// </summary> public partial class UpdateDocumentationPartResponse : AmazonWebServiceResponse { private string _id; private DocumentationPartLocation _location; private string _properties; /// <summary> /// Gets and sets the property Id. /// <para> /// The DocumentationPart identifier, generated by API Gateway when the <code>DocumentationPart</code> /// is created. /// </para> /// </summary> public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } /// <summary> /// Gets and sets the property Location. /// <para> /// The location of the API entity to which the documentation applies. Valid fields depend /// on the targeted API entity type. All the valid location fields are not required. If /// not explicitly specified, a valid location field is treated as a wildcard and associated /// documentation content may be inherited by matching entities, unless overridden. /// </para> /// </summary> public DocumentationPartLocation Location { get { return this._location; } set { this._location = value; } } // Check to see if Location property is set internal bool IsSetLocation() { return this._location != null; } /// <summary> /// Gets and sets the property Properties. /// <para> /// A content map of API-specific key-value pairs describing the targeted API entity. /// The map must be encoded as a JSON string, e.g., <code>"{ \"description\": \"The API /// does ...\" }"</code>. Only OpenAPI-compliant documentation-related fields from the /// properties map are exported and, hence, published as part of the API entity definitions, /// while the original documentation parts are exported in a OpenAPI extension of <code>x-amazon-apigateway-documentation</code>. /// </para> /// </summary> public string Properties { get { return this._properties; } set { this._properties = value; } } // Check to see if Properties property is set internal bool IsSetProperties() { return this._properties != null; } } }
103
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateDocumentationVersion operation. /// Updates a documentation version. /// </summary> public partial class UpdateDocumentationVersionRequest : AmazonAPIGatewayRequest { private string _documentationVersion; private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private string _restApiId; /// <summary> /// Gets and sets the property DocumentationVersion. /// <para> /// The version identifier of the to-be-updated documentation version. /// </para> /// </summary> [AWSProperty(Required=true)] public string DocumentationVersion { get { return this._documentationVersion; } set { this._documentationVersion = value; } } // Check to see if DocumentationVersion property is set internal bool IsSetDocumentationVersion() { return this._documentationVersion != null; } /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property RestApiId. /// <para> /// The string identifier of the associated RestApi.. /// </para> /// </summary> [AWSProperty(Required=true)] public string RestApiId { get { return this._restApiId; } set { this._restApiId = value; } } // Check to see if RestApiId property is set internal bool IsSetRestApiId() { return this._restApiId != null; } } }
99
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// A snapshot of the documentation of an API. /// </summary> public partial class UpdateDocumentationVersionResponse : AmazonWebServiceResponse { private DateTime? _createdDate; private string _description; private string _version; /// <summary> /// Gets and sets the property CreatedDate. /// <para> /// The date when the API documentation snapshot is created. /// </para> /// </summary> public DateTime CreatedDate { get { return this._createdDate.GetValueOrDefault(); } set { this._createdDate = value; } } // Check to see if CreatedDate property is set internal bool IsSetCreatedDate() { return this._createdDate.HasValue; } /// <summary> /// Gets and sets the property Description. /// <para> /// The description of the API documentation snapshot. /// </para> /// </summary> public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property Version. /// <para> /// The version identifier of the API documentation snapshot. /// </para> /// </summary> public string Version { get { return this._version; } set { this._version = value; } } // Check to see if Version property is set internal bool IsSetVersion() { return this._version != null; } } }
95
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateDomainName operation. /// Changes information about the DomainName resource. /// </summary> public partial class UpdateDomainNameRequest : AmazonAPIGatewayRequest { private string _domainName; private List<PatchOperation> _patchOperations = new List<PatchOperation>(); /// <summary> /// Gets and sets the property DomainName. /// <para> /// The name of the DomainName resource to be changed. /// </para> /// </summary> [AWSProperty(Required=true)] public string DomainName { get { return this._domainName; } set { this._domainName = value; } } // Check to see if DomainName property is set internal bool IsSetDomainName() { return this._domainName != null; } /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } } }
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents a custom domain name as a user-friendly host name of an API (RestApi). /// </summary> public partial class UpdateDomainNameResponse : AmazonWebServiceResponse { private string _certificateArn; private string _certificateName; private DateTime? _certificateUploadDate; private string _distributionDomainName; private string _distributionHostedZoneId; private DomainNameStatus _domainNameStatus; private string _domainNameStatusMessage; private EndpointConfiguration _endpointConfiguration; private MutualTlsAuthentication _mutualTlsAuthentication; private string _name; private string _ownershipVerificationCertificateArn; private string _regionalCertificateArn; private string _regionalCertificateName; private string _regionalDomainName; private string _regionalHostedZoneId; private SecurityPolicy _securityPolicy; private Dictionary<string, string> _tags = new Dictionary<string, string>(); /// <summary> /// Gets and sets the property CertificateArn. /// <para> /// The reference to an AWS-managed certificate that will be used by edge-optimized endpoint /// for this domain name. AWS Certificate Manager is the only supported source. /// </para> /// </summary> public string CertificateArn { get { return this._certificateArn; } set { this._certificateArn = value; } } // Check to see if CertificateArn property is set internal bool IsSetCertificateArn() { return this._certificateArn != null; } /// <summary> /// Gets and sets the property CertificateName. /// <para> /// The name of the certificate that will be used by edge-optimized endpoint for this /// domain name. /// </para> /// </summary> public string CertificateName { get { return this._certificateName; } set { this._certificateName = value; } } // Check to see if CertificateName property is set internal bool IsSetCertificateName() { return this._certificateName != null; } /// <summary> /// Gets and sets the property CertificateUploadDate. /// <para> /// The timestamp when the certificate that was used by edge-optimized endpoint for this /// domain name was uploaded. /// </para> /// </summary> public DateTime CertificateUploadDate { get { return this._certificateUploadDate.GetValueOrDefault(); } set { this._certificateUploadDate = value; } } // Check to see if CertificateUploadDate property is set internal bool IsSetCertificateUploadDate() { return this._certificateUploadDate.HasValue; } /// <summary> /// Gets and sets the property DistributionDomainName. /// <para> /// The domain name of the Amazon CloudFront distribution associated with this custom /// domain name for an edge-optimized endpoint. You set up this association when adding /// a DNS record pointing the custom domain name to this distribution name. For more information /// about CloudFront distributions, see the Amazon CloudFront documentation. /// </para> /// </summary> public string DistributionDomainName { get { return this._distributionDomainName; } set { this._distributionDomainName = value; } } // Check to see if DistributionDomainName property is set internal bool IsSetDistributionDomainName() { return this._distributionDomainName != null; } /// <summary> /// Gets and sets the property DistributionHostedZoneId. /// <para> /// The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint. /// The valid value is <code>Z2FDTNDATAQYW2</code> for all the regions. For more information, /// see Set up a Regional Custom Domain Name and AWS Regions and Endpoints for API Gateway. /// /// </para> /// </summary> public string DistributionHostedZoneId { get { return this._distributionHostedZoneId; } set { this._distributionHostedZoneId = value; } } // Check to see if DistributionHostedZoneId property is set internal bool IsSetDistributionHostedZoneId() { return this._distributionHostedZoneId != null; } /// <summary> /// Gets and sets the property DomainNameStatus. /// <para> /// The status of the DomainName migration. The valid values are <code>AVAILABLE</code> /// and <code>UPDATING</code>. If the status is <code>UPDATING</code>, the domain cannot /// be modified further until the existing operation is complete. If it is <code>AVAILABLE</code>, /// the domain can be updated. /// </para> /// </summary> public DomainNameStatus DomainNameStatus { get { return this._domainNameStatus; } set { this._domainNameStatus = value; } } // Check to see if DomainNameStatus property is set internal bool IsSetDomainNameStatus() { return this._domainNameStatus != null; } /// <summary> /// Gets and sets the property DomainNameStatusMessage. /// <para> /// An optional text message containing detailed information about status of the DomainName /// migration. /// </para> /// </summary> public string DomainNameStatusMessage { get { return this._domainNameStatusMessage; } set { this._domainNameStatusMessage = value; } } // Check to see if DomainNameStatusMessage property is set internal bool IsSetDomainNameStatusMessage() { return this._domainNameStatusMessage != null; } /// <summary> /// Gets and sets the property EndpointConfiguration. /// <para> /// The endpoint configuration of this DomainName showing the endpoint types of the domain /// name. /// </para> /// </summary> public EndpointConfiguration EndpointConfiguration { get { return this._endpointConfiguration; } set { this._endpointConfiguration = value; } } // Check to see if EndpointConfiguration property is set internal bool IsSetEndpointConfiguration() { return this._endpointConfiguration != null; } /// <summary> /// Gets and sets the property MutualTlsAuthentication. /// <para> /// The mutual TLS authentication configuration for a custom domain name. If specified, /// API Gateway performs two-way authentication between the client and the server. Clients /// must present a trusted certificate to access your API. /// </para> /// </summary> public MutualTlsAuthentication MutualTlsAuthentication { get { return this._mutualTlsAuthentication; } set { this._mutualTlsAuthentication = value; } } // Check to see if MutualTlsAuthentication property is set internal bool IsSetMutualTlsAuthentication() { return this._mutualTlsAuthentication != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The custom domain name as an API host name, for example, <code>my-api.example.com</code>. /// </para> /// </summary> public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property OwnershipVerificationCertificateArn. /// <para> /// The ARN of the public certificate issued by ACM to validate ownership of your custom /// domain. Only required when configuring mutual TLS and using an ACM imported or private /// CA certificate ARN as the regionalCertificateArn. /// </para> /// </summary> public string OwnershipVerificationCertificateArn { get { return this._ownershipVerificationCertificateArn; } set { this._ownershipVerificationCertificateArn = value; } } // Check to see if OwnershipVerificationCertificateArn property is set internal bool IsSetOwnershipVerificationCertificateArn() { return this._ownershipVerificationCertificateArn != null; } /// <summary> /// Gets and sets the property RegionalCertificateArn. /// <para> /// The reference to an AWS-managed certificate that will be used for validating the regional /// domain name. AWS Certificate Manager is the only supported source. /// </para> /// </summary> public string RegionalCertificateArn { get { return this._regionalCertificateArn; } set { this._regionalCertificateArn = value; } } // Check to see if RegionalCertificateArn property is set internal bool IsSetRegionalCertificateArn() { return this._regionalCertificateArn != null; } /// <summary> /// Gets and sets the property RegionalCertificateName. /// <para> /// The name of the certificate that will be used for validating the regional domain name. /// </para> /// </summary> public string RegionalCertificateName { get { return this._regionalCertificateName; } set { this._regionalCertificateName = value; } } // Check to see if RegionalCertificateName property is set internal bool IsSetRegionalCertificateName() { return this._regionalCertificateName != null; } /// <summary> /// Gets and sets the property RegionalDomainName. /// <para> /// The domain name associated with the regional endpoint for this custom domain name. /// You set up this association by adding a DNS record that points the custom domain name /// to this regional domain name. The regional domain name is returned by API Gateway /// when you create a regional endpoint. /// </para> /// </summary> public string RegionalDomainName { get { return this._regionalDomainName; } set { this._regionalDomainName = value; } } // Check to see if RegionalDomainName property is set internal bool IsSetRegionalDomainName() { return this._regionalDomainName != null; } /// <summary> /// Gets and sets the property RegionalHostedZoneId. /// <para> /// The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. For more /// information, see Set up a Regional Custom Domain Name and AWS Regions and Endpoints /// for API Gateway. /// </para> /// </summary> public string RegionalHostedZoneId { get { return this._regionalHostedZoneId; } set { this._regionalHostedZoneId = value; } } // Check to see if RegionalHostedZoneId property is set internal bool IsSetRegionalHostedZoneId() { return this._regionalHostedZoneId != null; } /// <summary> /// Gets and sets the property SecurityPolicy. /// <para> /// The Transport Layer Security (TLS) version + cipher suite for this DomainName. The /// valid values are <code>TLS_1_0</code> and <code>TLS_1_2</code>. /// </para> /// </summary> public SecurityPolicy SecurityPolicy { get { return this._securityPolicy; } set { this._securityPolicy = value; } } // Check to see if SecurityPolicy property is set internal bool IsSetSecurityPolicy() { return this._securityPolicy != null; } /// <summary> /// Gets and sets the property Tags. /// <para> /// The collection of tags. Each tag element is associated with a given resource. /// </para> /// </summary> public Dictionary<string, string> Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } } }
386
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateGatewayResponse operation. /// Updates a GatewayResponse of a specified response type on the given RestApi. /// </summary> public partial class UpdateGatewayResponseRequest : AmazonAPIGatewayRequest { private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private GatewayResponseType _responseType; private string _restApiId; /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property ResponseType. /// <para> /// The response type of the associated GatewayResponse. /// </para> /// </summary> [AWSProperty(Required=true)] public GatewayResponseType ResponseType { get { return this._responseType; } set { this._responseType = value; } } // Check to see if ResponseType property is set internal bool IsSetResponseType() { return this._responseType != null; } /// <summary> /// Gets and sets the property RestApiId. /// <para> /// The string identifier of the associated RestApi. /// </para> /// </summary> [AWSProperty(Required=true)] public string RestApiId { get { return this._restApiId; } set { this._restApiId = value; } } // Check to see if RestApiId property is set internal bool IsSetRestApiId() { return this._restApiId != null; } } }
99
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// A gateway response of a given response type and status code, with optional response /// parameters and mapping templates. /// </summary> public partial class UpdateGatewayResponseResponse : AmazonWebServiceResponse { private bool? _defaultResponse; private Dictionary<string, string> _responseParameters = new Dictionary<string, string>(); private Dictionary<string, string> _responseTemplates = new Dictionary<string, string>(); private GatewayResponseType _responseType; private string _statusCode; /// <summary> /// Gets and sets the property DefaultResponse. /// <para> /// A Boolean flag to indicate whether this GatewayResponse is the default gateway response /// (<code>true</code>) or not (<code>false</code>). A default gateway response is one /// generated by API Gateway without any customization by an API developer. /// </para> /// </summary> public bool DefaultResponse { get { return this._defaultResponse.GetValueOrDefault(); } set { this._defaultResponse = value; } } // Check to see if DefaultResponse property is set internal bool IsSetDefaultResponse() { return this._defaultResponse.HasValue; } /// <summary> /// Gets and sets the property ResponseParameters. /// <para> /// Response parameters (paths, query strings and headers) of the GatewayResponse as a /// string-to-string map of key-value pairs. /// </para> /// </summary> public Dictionary<string, string> ResponseParameters { get { return this._responseParameters; } set { this._responseParameters = value; } } // Check to see if ResponseParameters property is set internal bool IsSetResponseParameters() { return this._responseParameters != null && this._responseParameters.Count > 0; } /// <summary> /// Gets and sets the property ResponseTemplates. /// <para> /// Response templates of the GatewayResponse as a string-to-string map of key-value pairs. /// </para> /// </summary> public Dictionary<string, string> ResponseTemplates { get { return this._responseTemplates; } set { this._responseTemplates = value; } } // Check to see if ResponseTemplates property is set internal bool IsSetResponseTemplates() { return this._responseTemplates != null && this._responseTemplates.Count > 0; } /// <summary> /// Gets and sets the property ResponseType. /// <para> /// The response type of the associated GatewayResponse. /// </para> /// </summary> public GatewayResponseType ResponseType { get { return this._responseType; } set { this._responseType = value; } } // Check to see if ResponseType property is set internal bool IsSetResponseType() { return this._responseType != null; } /// <summary> /// Gets and sets the property StatusCode. /// <para> /// The HTTP status code for this GatewayResponse. /// </para> /// </summary> public string StatusCode { get { return this._statusCode; } set { this._statusCode = value; } } // Check to see if StatusCode property is set internal bool IsSetStatusCode() { return this._statusCode != null; } } }
137
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateIntegration operation. /// Represents an update integration. /// </summary> public partial class UpdateIntegrationRequest : AmazonAPIGatewayRequest { private string _httpMethod; private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private string _resourceId; private string _restApiId; /// <summary> /// Gets and sets the property HttpMethod. /// <para> /// Represents an update integration request's HTTP method. /// </para> /// </summary> [AWSProperty(Required=true)] public string HttpMethod { get { return this._httpMethod; } set { this._httpMethod = value; } } // Check to see if HttpMethod property is set internal bool IsSetHttpMethod() { return this._httpMethod != null; } /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property ResourceId. /// <para> /// Represents an update integration request's resource identifier. /// </para> /// </summary> [AWSProperty(Required=true)] public string ResourceId { get { return this._resourceId; } set { this._resourceId = value; } } // Check to see if ResourceId property is set internal bool IsSetResourceId() { return this._resourceId != null; } /// <summary> /// Gets and sets the property RestApiId. /// <para> /// The string identifier of the associated RestApi. /// </para> /// </summary> [AWSProperty(Required=true)] public string RestApiId { get { return this._restApiId; } set { this._restApiId = value; } } // Check to see if RestApiId property is set internal bool IsSetRestApiId() { return this._restApiId != null; } } }
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents an HTTP, HTTP_PROXY, AWS, AWS_PROXY, or Mock integration. /// </summary> public partial class UpdateIntegrationResponse : AmazonWebServiceResponse { private List<string> _cacheKeyParameters = new List<string>(); private string _cacheNamespace; private string _connectionId; private ConnectionType _connectionType; private ContentHandlingStrategy _contentHandling; private string _credentials; private string _httpMethod; private Dictionary<string, IntegrationResponse> _integrationResponses = new Dictionary<string, IntegrationResponse>(); private string _passthroughBehavior; private Dictionary<string, string> _requestParameters = new Dictionary<string, string>(); private Dictionary<string, string> _requestTemplates = new Dictionary<string, string>(); private int? _timeoutInMillis; private TlsConfig _tlsConfig; private IntegrationType _type; private string _uri; /// <summary> /// Gets and sets the property CacheKeyParameters. /// <para> /// A list of request parameters whose values API Gateway caches. To be valid values for /// <code>cacheKeyParameters</code>, these parameters must also be specified for Method /// <code>requestParameters</code>. /// </para> /// </summary> public List<string> CacheKeyParameters { get { return this._cacheKeyParameters; } set { this._cacheKeyParameters = value; } } // Check to see if CacheKeyParameters property is set internal bool IsSetCacheKeyParameters() { return this._cacheKeyParameters != null && this._cacheKeyParameters.Count > 0; } /// <summary> /// Gets and sets the property CacheNamespace. /// <para> /// Specifies a group of related cached parameters. By default, API Gateway uses the resource /// ID as the <code>cacheNamespace</code>. You can specify the same <code>cacheNamespace</code> /// across resources to return the same cached data for requests to different resources. /// </para> /// </summary> public string CacheNamespace { get { return this._cacheNamespace; } set { this._cacheNamespace = value; } } // Check to see if CacheNamespace property is set internal bool IsSetCacheNamespace() { return this._cacheNamespace != null; } /// <summary> /// Gets and sets the property ConnectionId. /// <para> /// The ID of the VpcLink used for the integration when <code>connectionType=VPC_LINK</code> /// and undefined, otherwise. /// </para> /// </summary> public string ConnectionId { get { return this._connectionId; } set { this._connectionId = value; } } // Check to see if ConnectionId property is set internal bool IsSetConnectionId() { return this._connectionId != null; } /// <summary> /// Gets and sets the property ConnectionType. /// <para> /// The type of the network connection to the integration endpoint. The valid value is /// <code>INTERNET</code> for connections through the public routable internet or <code>VPC_LINK</code> /// for private connections between API Gateway and a network load balancer in a VPC. /// The default value is <code>INTERNET</code>. /// </para> /// </summary> public ConnectionType ConnectionType { get { return this._connectionType; } set { this._connectionType = value; } } // Check to see if ConnectionType property is set internal bool IsSetConnectionType() { return this._connectionType != null; } /// <summary> /// Gets and sets the property ContentHandling. /// <para> /// Specifies how to handle request payload content type conversions. Supported values /// are <code>CONVERT_TO_BINARY</code> and <code>CONVERT_TO_TEXT</code>, with the following /// behaviors: /// </para> /// /// <para> /// If this property is not defined, the request payload will be passed through from the /// method request to integration request without modification, provided that the <code>passthroughBehavior</code> /// is configured to support payload pass-through. /// </para> /// </summary> public ContentHandlingStrategy ContentHandling { get { return this._contentHandling; } set { this._contentHandling = value; } } // Check to see if ContentHandling property is set internal bool IsSetContentHandling() { return this._contentHandling != null; } /// <summary> /// Gets and sets the property Credentials. /// <para> /// Specifies the credentials required for the integration, if any. For AWS integrations, /// three options are available. To specify an IAM Role for API Gateway to assume, use /// the role's Amazon Resource Name (ARN). To require that the caller's identity be passed /// through from the request, specify the string <code>arn:aws:iam::\*:user/\*</code>. /// To use resource-based permissions on supported AWS services, specify null. /// </para> /// </summary> public string Credentials { get { return this._credentials; } set { this._credentials = value; } } // Check to see if Credentials property is set internal bool IsSetCredentials() { return this._credentials != null; } /// <summary> /// Gets and sets the property HttpMethod. /// <para> /// Specifies the integration's HTTP method type. /// </para> /// </summary> public string HttpMethod { get { return this._httpMethod; } set { this._httpMethod = value; } } // Check to see if HttpMethod property is set internal bool IsSetHttpMethod() { return this._httpMethod != null; } /// <summary> /// Gets and sets the property IntegrationResponses. /// <para> /// Specifies the integration's responses. /// </para> /// </summary> public Dictionary<string, IntegrationResponse> IntegrationResponses { get { return this._integrationResponses; } set { this._integrationResponses = value; } } // Check to see if IntegrationResponses property is set internal bool IsSetIntegrationResponses() { return this._integrationResponses != null && this._integrationResponses.Count > 0; } /// <summary> /// Gets and sets the property PassthroughBehavior. /// <para> /// Specifies how the method request body of an unmapped content type will be passed through /// the integration request to the back end without transformation. A content type is /// unmapped if no mapping template is defined in the integration or the content type /// does not match any of the mapped content types, as specified in <code>requestTemplates</code>. /// The valid value is one of the following: <code>WHEN_NO_MATCH</code>: passes the method /// request body through the integration request to the back end without transformation /// when the method request content type does not match any content type associated with /// the mapping templates defined in the integration request. <code>WHEN_NO_TEMPLATES</code>: /// passes the method request body through the integration request to the back end without /// transformation when no mapping template is defined in the integration request. If /// a template is defined when this option is selected, the method request of an unmapped /// content-type will be rejected with an HTTP 415 Unsupported Media Type response. <code>NEVER</code>: /// rejects the method request with an HTTP 415 Unsupported Media Type response when either /// the method request content type does not match any content type associated with the /// mapping templates defined in the integration request or no mapping template is defined /// in the integration request. /// </para> /// </summary> public string PassthroughBehavior { get { return this._passthroughBehavior; } set { this._passthroughBehavior = value; } } // Check to see if PassthroughBehavior property is set internal bool IsSetPassthroughBehavior() { return this._passthroughBehavior != null; } /// <summary> /// Gets and sets the property RequestParameters. /// <para> /// A key-value map specifying request parameters that are passed from the method request /// to the back end. The key is an integration request parameter name and the associated /// value is a method request parameter value or static value that must be enclosed within /// single quotes and pre-encoded as required by the back end. The method request parameter /// value must match the pattern of <code>method.request.{location}.{name}</code>, where /// <code>location</code> is <code>querystring</code>, <code>path</code>, or <code>header</code> /// and <code>name</code> must be a valid and unique method request parameter name. /// </para> /// </summary> public Dictionary<string, string> RequestParameters { get { return this._requestParameters; } set { this._requestParameters = value; } } // Check to see if RequestParameters property is set internal bool IsSetRequestParameters() { return this._requestParameters != null && this._requestParameters.Count > 0; } /// <summary> /// Gets and sets the property RequestTemplates. /// <para> /// Represents a map of Velocity templates that are applied on the request payload based /// on the value of the Content-Type header sent by the client. The content type value /// is the key in this map, and the template (as a String) is the value. /// </para> /// </summary> public Dictionary<string, string> RequestTemplates { get { return this._requestTemplates; } set { this._requestTemplates = value; } } // Check to see if RequestTemplates property is set internal bool IsSetRequestTemplates() { return this._requestTemplates != null && this._requestTemplates.Count > 0; } /// <summary> /// Gets and sets the property TimeoutInMillis. /// <para> /// Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds /// or 29 seconds. /// </para> /// </summary> public int TimeoutInMillis { get { return this._timeoutInMillis.GetValueOrDefault(); } set { this._timeoutInMillis = value; } } // Check to see if TimeoutInMillis property is set internal bool IsSetTimeoutInMillis() { return this._timeoutInMillis.HasValue; } /// <summary> /// Gets and sets the property TlsConfig. /// <para> /// Specifies the TLS configuration for an integration. /// </para> /// </summary> public TlsConfig TlsConfig { get { return this._tlsConfig; } set { this._tlsConfig = value; } } // Check to see if TlsConfig property is set internal bool IsSetTlsConfig() { return this._tlsConfig != null; } /// <summary> /// Gets and sets the property Type. /// <para> /// Specifies an API method integration type. The valid value is one of the following: /// </para> /// /// <para> /// For the HTTP and HTTP proxy integrations, each integration can specify a protocol /// (<code>http/https</code>), port and path. Standard 80 and 443 ports are supported /// as well as custom ports above 1024. An HTTP or HTTP proxy integration with a <code>connectionType</code> /// of <code>VPC_LINK</code> is referred to as a private integration and uses a VpcLink /// to connect API Gateway to a network load balancer of a VPC. /// </para> /// </summary> public IntegrationType Type { get { return this._type; } set { this._type = value; } } // Check to see if Type property is set internal bool IsSetType() { return this._type != null; } /// <summary> /// Gets and sets the property Uri. /// <para> /// Specifies Uniform Resource Identifier (URI) of the integration endpoint. /// </para> /// /// <para> /// For <code>HTTP</code> or <code>HTTP_PROXY</code> integrations, the URI must be a fully /// formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard /// integration, where <code>connectionType</code> is not <code>VPC_LINK</code>, or private /// integration, where <code>connectionType</code> is <code>VPC_LINK</code>. For a private /// HTTP integration, the URI is not used for routing. For <code>AWS</code> or <code>AWS_PROXY</code> /// integrations, the URI is of the form <code>arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}</code>. /// Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name /// of the integrated Amazon Web Services service (e.g., s3); and {subdomain} is a designated /// subdomain supported by certain Amazon Web Services service for fast host-name lookup. /// action can be used for an Amazon Web Services service action-based API, using an Action={name}&amp;{p1}={v1}&amp;p2={v2}... /// query string. The ensuing {service_api} refers to a supported action {name} plus any /// required input parameters. Alternatively, path can be used for an AWS service path-based /// API. The ensuing service_api refers to the path to an Amazon Web Services service /// resource, including the region of the integrated Amazon Web Services service, if applicable. /// For example, for integration with the S3 API of GetObject, the uri can be either <code>arn:aws:apigateway:us-west-2:s3:action/GetObject&amp;Bucket={bucket}&amp;Key={key}</code> /// or <code>arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}</code> /// </para> /// </summary> public string Uri { get { return this._uri; } set { this._uri = value; } } // Check to see if Uri property is set internal bool IsSetUri() { return this._uri != null; } } }
394
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateIntegrationResponse operation. /// Represents an update integration response. /// </summary> public partial class UpdateIntegrationResponseRequest : AmazonAPIGatewayRequest { private string _httpMethod; private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private string _resourceId; private string _restApiId; private string _statusCode; /// <summary> /// Gets and sets the property HttpMethod. /// <para> /// Specifies an update integration response request's HTTP method. /// </para> /// </summary> [AWSProperty(Required=true)] public string HttpMethod { get { return this._httpMethod; } set { this._httpMethod = value; } } // Check to see if HttpMethod property is set internal bool IsSetHttpMethod() { return this._httpMethod != null; } /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property ResourceId. /// <para> /// Specifies an update integration response request's resource identifier. /// </para> /// </summary> [AWSProperty(Required=true)] public string ResourceId { get { return this._resourceId; } set { this._resourceId = value; } } // Check to see if ResourceId property is set internal bool IsSetResourceId() { return this._resourceId != null; } /// <summary> /// Gets and sets the property RestApiId. /// <para> /// The string identifier of the associated RestApi. /// </para> /// </summary> [AWSProperty(Required=true)] public string RestApiId { get { return this._restApiId; } set { this._restApiId = value; } } // Check to see if RestApiId property is set internal bool IsSetRestApiId() { return this._restApiId != null; } /// <summary> /// Gets and sets the property StatusCode. /// <para> /// Specifies an update integration response request's status code. /// </para> /// </summary> [AWSProperty(Required=true)] public string StatusCode { get { return this._statusCode; } set { this._statusCode = value; } } // Check to see if StatusCode property is set internal bool IsSetStatusCode() { return this._statusCode != null; } } }
139
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents an integration response. The status code must map to an existing MethodResponse, /// and parameters and templates can be used to transform the back-end response. /// </summary> public partial class UpdateIntegrationResponseResponse : AmazonWebServiceResponse { private ContentHandlingStrategy _contentHandling; private Dictionary<string, string> _responseParameters = new Dictionary<string, string>(); private Dictionary<string, string> _responseTemplates = new Dictionary<string, string>(); private string _selectionPattern; private string _statusCode; /// <summary> /// Gets and sets the property ContentHandling. /// <para> /// Specifies how to handle response payload content type conversions. Supported values /// are <code>CONVERT_TO_BINARY</code> and <code>CONVERT_TO_TEXT</code>, with the following /// behaviors: /// </para> /// /// <para> /// If this property is not defined, the response payload will be passed through from /// the integration response to the method response without modification. /// </para> /// </summary> public ContentHandlingStrategy ContentHandling { get { return this._contentHandling; } set { this._contentHandling = value; } } // Check to see if ContentHandling property is set internal bool IsSetContentHandling() { return this._contentHandling != null; } /// <summary> /// Gets and sets the property ResponseParameters. /// <para> /// A key-value map specifying response parameters that are passed to the method response /// from the back end. The key is a method response header parameter name and the mapped /// value is an integration response header value, a static value enclosed within a pair /// of single quotes, or a JSON expression from the integration response body. The mapping /// key must match the pattern of <code>method.response.header.{name}</code>, where <code>name</code> /// is a valid and unique header name. The mapped non-static value must match the pattern /// of <code>integration.response.header.{name}</code> or <code>integration.response.body.{JSON-expression}</code>, /// where <code>name</code> is a valid and unique response header name and <code>JSON-expression</code> /// is a valid JSON expression without the <code>$</code> prefix. /// </para> /// </summary> public Dictionary<string, string> ResponseParameters { get { return this._responseParameters; } set { this._responseParameters = value; } } // Check to see if ResponseParameters property is set internal bool IsSetResponseParameters() { return this._responseParameters != null && this._responseParameters.Count > 0; } /// <summary> /// Gets and sets the property ResponseTemplates. /// <para> /// Specifies the templates used to transform the integration response body. Response /// templates are represented as a key/value map, with a content-type as the key and a /// template as the value. /// </para> /// </summary> public Dictionary<string, string> ResponseTemplates { get { return this._responseTemplates; } set { this._responseTemplates = value; } } // Check to see if ResponseTemplates property is set internal bool IsSetResponseTemplates() { return this._responseTemplates != null && this._responseTemplates.Count > 0; } /// <summary> /// Gets and sets the property SelectionPattern. /// <para> /// Specifies the regular expression (regex) pattern used to choose an integration response /// based on the response from the back end. For example, if the success response returns /// nothing and the error response returns some string, you could use the <code>.+</code> /// regex to match error response. However, make sure that the error response does not /// contain any newline (<code>\n</code>) character in such cases. If the back end is /// an AWS Lambda function, the AWS Lambda function error header is matched. For all other /// HTTP and AWS back ends, the HTTP status code is matched. /// </para> /// </summary> public string SelectionPattern { get { return this._selectionPattern; } set { this._selectionPattern = value; } } // Check to see if SelectionPattern property is set internal bool IsSetSelectionPattern() { return this._selectionPattern != null; } /// <summary> /// Gets and sets the property StatusCode. /// <para> /// Specifies the status code that is used to map the integration response to an existing /// MethodResponse. /// </para> /// </summary> public string StatusCode { get { return this._statusCode; } set { this._statusCode = value; } } // Check to see if StatusCode property is set internal bool IsSetStatusCode() { return this._statusCode != null; } } }
158
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateMethod operation. /// Updates an existing Method resource. /// </summary> public partial class UpdateMethodRequest : AmazonAPIGatewayRequest { private string _httpMethod; private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private string _resourceId; private string _restApiId; /// <summary> /// Gets and sets the property HttpMethod. /// <para> /// The HTTP verb of the Method resource. /// </para> /// </summary> [AWSProperty(Required=true)] public string HttpMethod { get { return this._httpMethod; } set { this._httpMethod = value; } } // Check to see if HttpMethod property is set internal bool IsSetHttpMethod() { return this._httpMethod != null; } /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property ResourceId. /// <para> /// The Resource identifier for the Method resource. /// </para> /// </summary> [AWSProperty(Required=true)] public string ResourceId { get { return this._resourceId; } set { this._resourceId = value; } } // Check to see if ResourceId property is set internal bool IsSetResourceId() { return this._resourceId != null; } /// <summary> /// Gets and sets the property RestApiId. /// <para> /// The string identifier of the associated RestApi. /// </para> /// </summary> [AWSProperty(Required=true)] public string RestApiId { get { return this._restApiId; } set { this._restApiId = value; } } // Check to see if RestApiId property is set internal bool IsSetRestApiId() { return this._restApiId != null; } } }
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents a client-facing interface by which the client calls the API to access /// back-end resources. A Method resource is integrated with an Integration resource. /// Both consist of a request and one or more responses. The method request takes the /// client input that is passed to the back end through the integration request. A method /// response returns the output from the back end to the client through an integration /// response. A method request is embodied in a Method resource, whereas an integration /// request is embodied in an Integration resource. On the other hand, a method response /// is represented by a MethodResponse resource, whereas an integration response is represented /// by an IntegrationResponse resource. /// </summary> public partial class UpdateMethodResponse : AmazonWebServiceResponse { private bool? _apiKeyRequired; private List<string> _authorizationScopes = new List<string>(); private string _authorizationType; private string _authorizerId; private string _httpMethod; private Integration _methodIntegration; private Dictionary<string, MethodResponse> _methodResponses = new Dictionary<string, MethodResponse>(); private string _operationName; private Dictionary<string, string> _requestModels = new Dictionary<string, string>(); private Dictionary<string, bool> _requestParameters = new Dictionary<string, bool>(); private string _requestValidatorId; /// <summary> /// Gets and sets the property ApiKeyRequired. /// <para> /// A boolean flag specifying whether a valid ApiKey is required to invoke this method. /// </para> /// </summary> public bool ApiKeyRequired { get { return this._apiKeyRequired.GetValueOrDefault(); } set { this._apiKeyRequired = value; } } // Check to see if ApiKeyRequired property is set internal bool IsSetApiKeyRequired() { return this._apiKeyRequired.HasValue; } /// <summary> /// Gets and sets the property AuthorizationScopes. /// <para> /// A list of authorization scopes configured on the method. The scopes are used with /// a <code>COGNITO_USER_POOLS</code> authorizer to authorize the method invocation. The /// authorization works by matching the method scopes against the scopes parsed from the /// access token in the incoming request. The method invocation is authorized if any method /// scopes matches a claimed scope in the access token. Otherwise, the invocation is not /// authorized. When the method scope is configured, the client must provide an access /// token instead of an identity token for authorization purposes. /// </para> /// </summary> public List<string> AuthorizationScopes { get { return this._authorizationScopes; } set { this._authorizationScopes = value; } } // Check to see if AuthorizationScopes property is set internal bool IsSetAuthorizationScopes() { return this._authorizationScopes != null && this._authorizationScopes.Count > 0; } /// <summary> /// Gets and sets the property AuthorizationType. /// <para> /// The method's authorization type. Valid values are <code>NONE</code> for open access, /// <code>AWS_IAM</code> for using AWS IAM permissions, <code>CUSTOM</code> for using /// a custom authorizer, or <code>COGNITO_USER_POOLS</code> for using a Cognito user pool. /// </para> /// </summary> public string AuthorizationType { get { return this._authorizationType; } set { this._authorizationType = value; } } // Check to see if AuthorizationType property is set internal bool IsSetAuthorizationType() { return this._authorizationType != null; } /// <summary> /// Gets and sets the property AuthorizerId. /// <para> /// The identifier of an Authorizer to use on this method. The <code>authorizationType</code> /// must be <code>CUSTOM</code>. /// </para> /// </summary> public string AuthorizerId { get { return this._authorizerId; } set { this._authorizerId = value; } } // Check to see if AuthorizerId property is set internal bool IsSetAuthorizerId() { return this._authorizerId != null; } /// <summary> /// Gets and sets the property HttpMethod. /// <para> /// The method's HTTP verb. /// </para> /// </summary> public string HttpMethod { get { return this._httpMethod; } set { this._httpMethod = value; } } // Check to see if HttpMethod property is set internal bool IsSetHttpMethod() { return this._httpMethod != null; } /// <summary> /// Gets and sets the property MethodIntegration. /// <para> /// Gets the method's integration responsible for passing the client-submitted request /// to the back end and performing necessary transformations to make the request compliant /// with the back end. /// </para> /// </summary> public Integration MethodIntegration { get { return this._methodIntegration; } set { this._methodIntegration = value; } } // Check to see if MethodIntegration property is set internal bool IsSetMethodIntegration() { return this._methodIntegration != null; } /// <summary> /// Gets and sets the property MethodResponses. /// <para> /// Gets a method response associated with a given HTTP status code. /// </para> /// </summary> public Dictionary<string, MethodResponse> MethodResponses { get { return this._methodResponses; } set { this._methodResponses = value; } } // Check to see if MethodResponses property is set internal bool IsSetMethodResponses() { return this._methodResponses != null && this._methodResponses.Count > 0; } /// <summary> /// Gets and sets the property OperationName. /// <para> /// A human-friendly operation identifier for the method. For example, you can assign /// the <code>operationName</code> of <code>ListPets</code> for the <code>GET /pets</code> /// method in the <code>PetStore</code> example. /// </para> /// </summary> public string OperationName { get { return this._operationName; } set { this._operationName = value; } } // Check to see if OperationName property is set internal bool IsSetOperationName() { return this._operationName != null; } /// <summary> /// Gets and sets the property RequestModels. /// <para> /// A key-value map specifying data schemas, represented by Model resources, (as the mapped /// value) of the request payloads of given content types (as the mapping key). /// </para> /// </summary> public Dictionary<string, string> RequestModels { get { return this._requestModels; } set { this._requestModels = value; } } // Check to see if RequestModels property is set internal bool IsSetRequestModels() { return this._requestModels != null && this._requestModels.Count > 0; } /// <summary> /// Gets and sets the property RequestParameters. /// <para> /// A key-value map defining required or optional method request parameters that can be /// accepted by API Gateway. A key is a method request parameter name matching the pattern /// of <code>method.request.{location}.{name}</code>, where <code>location</code> is <code>querystring</code>, /// <code>path</code>, or <code>header</code> and <code>name</code> is a valid and unique /// parameter name. The value associated with the key is a Boolean flag indicating whether /// the parameter is required (<code>true</code>) or optional (<code>false</code>). The /// method request parameter names defined here are available in Integration to be mapped /// to integration request parameters or templates. /// </para> /// </summary> public Dictionary<string, bool> RequestParameters { get { return this._requestParameters; } set { this._requestParameters = value; } } // Check to see if RequestParameters property is set internal bool IsSetRequestParameters() { return this._requestParameters != null && this._requestParameters.Count > 0; } /// <summary> /// Gets and sets the property RequestValidatorId. /// <para> /// The identifier of a RequestValidator for request validation. /// </para> /// </summary> public string RequestValidatorId { get { return this._requestValidatorId; } set { this._requestValidatorId = value; } } // Check to see if RequestValidatorId property is set internal bool IsSetRequestValidatorId() { return this._requestValidatorId != null; } } }
276
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateMethodResponse operation. /// Updates an existing MethodResponse resource. /// </summary> public partial class UpdateMethodResponseRequest : AmazonAPIGatewayRequest { private string _httpMethod; private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private string _resourceId; private string _restApiId; private string _statusCode; /// <summary> /// Gets and sets the property HttpMethod. /// <para> /// The HTTP verb of the Method resource. /// </para> /// </summary> [AWSProperty(Required=true)] public string HttpMethod { get { return this._httpMethod; } set { this._httpMethod = value; } } // Check to see if HttpMethod property is set internal bool IsSetHttpMethod() { return this._httpMethod != null; } /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property ResourceId. /// <para> /// The Resource identifier for the MethodResponse resource. /// </para> /// </summary> [AWSProperty(Required=true)] public string ResourceId { get { return this._resourceId; } set { this._resourceId = value; } } // Check to see if ResourceId property is set internal bool IsSetResourceId() { return this._resourceId != null; } /// <summary> /// Gets and sets the property RestApiId. /// <para> /// The string identifier of the associated RestApi. /// </para> /// </summary> [AWSProperty(Required=true)] public string RestApiId { get { return this._restApiId; } set { this._restApiId = value; } } // Check to see if RestApiId property is set internal bool IsSetRestApiId() { return this._restApiId != null; } /// <summary> /// Gets and sets the property StatusCode. /// <para> /// The status code for the MethodResponse resource. /// </para> /// </summary> [AWSProperty(Required=true)] public string StatusCode { get { return this._statusCode; } set { this._statusCode = value; } } // Check to see if StatusCode property is set internal bool IsSetStatusCode() { return this._statusCode != null; } } }
139
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents a method response of a given HTTP status code returned to the client. The /// method response is passed from the back end through the associated integration response /// that can be transformed using a mapping template. /// </summary> public partial class UpdateMethodResponseResponse : AmazonWebServiceResponse { private Dictionary<string, string> _responseModels = new Dictionary<string, string>(); private Dictionary<string, bool> _responseParameters = new Dictionary<string, bool>(); private string _statusCode; /// <summary> /// Gets and sets the property ResponseModels. /// <para> /// Specifies the Model resources used for the response's content-type. Response models /// are represented as a key/value map, with a content-type as the key and a Model name /// as the value. /// </para> /// </summary> public Dictionary<string, string> ResponseModels { get { return this._responseModels; } set { this._responseModels = value; } } // Check to see if ResponseModels property is set internal bool IsSetResponseModels() { return this._responseModels != null && this._responseModels.Count > 0; } /// <summary> /// Gets and sets the property ResponseParameters. /// <para> /// A key-value map specifying required or optional response parameters that API Gateway /// can send back to the caller. A key defines a method response header and the value /// specifies whether the associated method response header is required or not. The expression /// of the key must match the pattern <code>method.response.header.{name}</code>, where /// <code>name</code> is a valid and unique header name. API Gateway passes certain integration /// response data to the method response headers specified here according to the mapping /// you prescribe in the API's IntegrationResponse. The integration response data that /// can be mapped include an integration response header expressed in <code>integration.response.header.{name}</code>, /// a static value enclosed within a pair of single quotes (e.g., <code>'application/json'</code>), /// or a JSON expression from the back-end response payload in the form of <code>integration.response.body.{JSON-expression}</code>, /// where <code>JSON-expression</code> is a valid JSON expression without the <code>$</code> /// prefix.) /// </para> /// </summary> public Dictionary<string, bool> ResponseParameters { get { return this._responseParameters; } set { this._responseParameters = value; } } // Check to see if ResponseParameters property is set internal bool IsSetResponseParameters() { return this._responseParameters != null && this._responseParameters.Count > 0; } /// <summary> /// Gets and sets the property StatusCode. /// <para> /// The method response's status code. /// </para> /// </summary> public string StatusCode { get { return this._statusCode; } set { this._statusCode = value; } } // Check to see if StatusCode property is set internal bool IsSetStatusCode() { return this._statusCode != null; } } }
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateModel operation. /// Changes information about a model. /// </summary> public partial class UpdateModelRequest : AmazonAPIGatewayRequest { private string _modelName; private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private string _restApiId; /// <summary> /// Gets and sets the property ModelName. /// <para> /// The name of the model to update. /// </para> /// </summary> [AWSProperty(Required=true)] public string ModelName { get { return this._modelName; } set { this._modelName = value; } } // Check to see if ModelName property is set internal bool IsSetModelName() { return this._modelName != null; } /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property RestApiId. /// <para> /// The string identifier of the associated RestApi. /// </para> /// </summary> [AWSProperty(Required=true)] public string RestApiId { get { return this._restApiId; } set { this._restApiId = value; } } // Check to see if RestApiId property is set internal bool IsSetRestApiId() { return this._restApiId != null; } } }
99
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents the data structure of a method's request or response payload. /// </summary> public partial class UpdateModelResponse : AmazonWebServiceResponse { private string _contentType; private string _description; private string _id; private string _name; private string _schema; /// <summary> /// Gets and sets the property ContentType. /// <para> /// The content-type for the model. /// </para> /// </summary> public string ContentType { get { return this._contentType; } set { this._contentType = value; } } // Check to see if ContentType property is set internal bool IsSetContentType() { return this._contentType != null; } /// <summary> /// Gets and sets the property Description. /// <para> /// The description of the model. /// </para> /// </summary> public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property Id. /// <para> /// The identifier for the model resource. /// </para> /// </summary> public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of the model. Must be an alphanumeric string. /// </para> /// </summary> public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property Schema. /// <para> /// The schema for the model. For <code>application/json</code> models, this should be /// JSON schema draft 4 model. Do not include "\*/" characters in the description of any /// properties because such "\*/" characters may be interpreted as the closing marker /// for comments in some languages, such as Java or JavaScript, causing the installation /// of your API's SDK generated by API Gateway to fail. /// </para> /// </summary> public string Schema { get { return this._schema; } set { this._schema = value; } } // Check to see if Schema property is set internal bool IsSetSchema() { return this._schema != null; } } }
137
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateRequestValidator operation. /// Updates a RequestValidator of a given RestApi. /// </summary> public partial class UpdateRequestValidatorRequest : AmazonAPIGatewayRequest { private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private string _requestValidatorId; private string _restApiId; /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property RequestValidatorId. /// <para> /// The identifier of RequestValidator to be updated. /// </para> /// </summary> [AWSProperty(Required=true)] public string RequestValidatorId { get { return this._requestValidatorId; } set { this._requestValidatorId = value; } } // Check to see if RequestValidatorId property is set internal bool IsSetRequestValidatorId() { return this._requestValidatorId != null; } /// <summary> /// Gets and sets the property RestApiId. /// <para> /// The string identifier of the associated RestApi. /// </para> /// </summary> [AWSProperty(Required=true)] public string RestApiId { get { return this._restApiId; } set { this._restApiId = value; } } // Check to see if RestApiId property is set internal bool IsSetRestApiId() { return this._restApiId != null; } } }
99
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// A set of validation rules for incoming Method requests. /// </summary> public partial class UpdateRequestValidatorResponse : AmazonWebServiceResponse { private string _id; private string _name; private bool? _validateRequestBody; private bool? _validateRequestParameters; /// <summary> /// Gets and sets the property Id. /// <para> /// The identifier of this RequestValidator. /// </para> /// </summary> public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of this RequestValidator /// </para> /// </summary> public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property ValidateRequestBody. /// <para> /// A Boolean flag to indicate whether to validate a request body according to the configured /// Model schema. /// </para> /// </summary> public bool ValidateRequestBody { get { return this._validateRequestBody.GetValueOrDefault(); } set { this._validateRequestBody = value; } } // Check to see if ValidateRequestBody property is set internal bool IsSetValidateRequestBody() { return this._validateRequestBody.HasValue; } /// <summary> /// Gets and sets the property ValidateRequestParameters. /// <para> /// A Boolean flag to indicate whether to validate request parameters (<code>true</code>) /// or not (<code>false</code>). /// </para> /// </summary> public bool ValidateRequestParameters { get { return this._validateRequestParameters.GetValueOrDefault(); } set { this._validateRequestParameters = value; } } // Check to see if ValidateRequestParameters property is set internal bool IsSetValidateRequestParameters() { return this._validateRequestParameters.HasValue; } } }
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateResource operation. /// Changes information about a Resource resource. /// </summary> public partial class UpdateResourceRequest : AmazonAPIGatewayRequest { private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private string _resourceId; private string _restApiId; /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property ResourceId. /// <para> /// The identifier of the Resource resource. /// </para> /// </summary> [AWSProperty(Required=true)] public string ResourceId { get { return this._resourceId; } set { this._resourceId = value; } } // Check to see if ResourceId property is set internal bool IsSetResourceId() { return this._resourceId != null; } /// <summary> /// Gets and sets the property RestApiId. /// <para> /// The string identifier of the associated RestApi. /// </para> /// </summary> [AWSProperty(Required=true)] public string RestApiId { get { return this._restApiId; } set { this._restApiId = value; } } // Check to see if RestApiId property is set internal bool IsSetRestApiId() { return this._restApiId != null; } } }
99
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents an API resource. /// </summary> public partial class UpdateResourceResponse : AmazonWebServiceResponse { private string _id; private string _parentId; private string _path; private string _pathPart; private Dictionary<string, Method> _resourceMethods = new Dictionary<string, Method>(); /// <summary> /// Gets and sets the property Id. /// <para> /// The resource's identifier. /// </para> /// </summary> public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } /// <summary> /// Gets and sets the property ParentId. /// <para> /// The parent resource's identifier. /// </para> /// </summary> public string ParentId { get { return this._parentId; } set { this._parentId = value; } } // Check to see if ParentId property is set internal bool IsSetParentId() { return this._parentId != null; } /// <summary> /// Gets and sets the property Path. /// <para> /// The full path for this resource. /// </para> /// </summary> public string Path { get { return this._path; } set { this._path = value; } } // Check to see if Path property is set internal bool IsSetPath() { return this._path != null; } /// <summary> /// Gets and sets the property PathPart. /// <para> /// The last path segment for this resource. /// </para> /// </summary> public string PathPart { get { return this._pathPart; } set { this._pathPart = value; } } // Check to see if PathPart property is set internal bool IsSetPathPart() { return this._pathPart != null; } /// <summary> /// Gets and sets the property ResourceMethods. /// <para> /// Gets an API resource's method of a given HTTP verb. /// </para> /// </summary> public Dictionary<string, Method> ResourceMethods { get { return this._resourceMethods; } set { this._resourceMethods = value; } } // Check to see if ResourceMethods property is set internal bool IsSetResourceMethods() { return this._resourceMethods != null && this._resourceMethods.Count > 0; } } }
133
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateRestApi operation. /// Changes information about the specified API. /// </summary> public partial class UpdateRestApiRequest : AmazonAPIGatewayRequest { private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private string _restApiId; /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property RestApiId. /// <para> /// The string identifier of the associated RestApi. /// </para> /// </summary> [AWSProperty(Required=true)] public string RestApiId { get { return this._restApiId; } set { this._restApiId = value; } } // Check to see if RestApiId property is set internal bool IsSetRestApiId() { return this._restApiId != null; } } }
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents a REST API. /// </summary> public partial class UpdateRestApiResponse : AmazonWebServiceResponse { private ApiKeySourceType _apiKeySource; private List<string> _binaryMediaTypes = new List<string>(); private DateTime? _createdDate; private string _description; private bool? _disableExecuteApiEndpoint; private EndpointConfiguration _endpointConfiguration; private string _id; private int? _minimumCompressionSize; private string _name; private string _policy; private Dictionary<string, string> _tags = new Dictionary<string, string>(); private string _version; private List<string> _warnings = new List<string>(); /// <summary> /// Gets and sets the property ApiKeySource. /// <para> /// The source of the API key for metering requests according to a usage plan. Valid values /// are: &gt;<code>HEADER</code> to read the API key from the <code>X-API-Key</code> header /// of a request. <code>AUTHORIZER</code> to read the API key from the <code>UsageIdentifierKey</code> /// from a custom authorizer. /// </para> /// </summary> public ApiKeySourceType ApiKeySource { get { return this._apiKeySource; } set { this._apiKeySource = value; } } // Check to see if ApiKeySource property is set internal bool IsSetApiKeySource() { return this._apiKeySource != null; } /// <summary> /// Gets and sets the property BinaryMediaTypes. /// <para> /// The list of binary media types supported by the RestApi. By default, the RestApi supports /// only UTF-8-encoded text payloads. /// </para> /// </summary> public List<string> BinaryMediaTypes { get { return this._binaryMediaTypes; } set { this._binaryMediaTypes = value; } } // Check to see if BinaryMediaTypes property is set internal bool IsSetBinaryMediaTypes() { return this._binaryMediaTypes != null && this._binaryMediaTypes.Count > 0; } /// <summary> /// Gets and sets the property CreatedDate. /// <para> /// The timestamp when the API was created. /// </para> /// </summary> public DateTime CreatedDate { get { return this._createdDate.GetValueOrDefault(); } set { this._createdDate = value; } } // Check to see if CreatedDate property is set internal bool IsSetCreatedDate() { return this._createdDate.HasValue; } /// <summary> /// Gets and sets the property Description. /// <para> /// The API's description. /// </para> /// </summary> public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property DisableExecuteApiEndpoint. /// <para> /// Specifies whether clients can invoke your API by using the default <code>execute-api</code> /// endpoint. By default, clients can invoke your API with the default <code>https://{api_id}.execute-api.{region}.amazonaws.com</code> /// endpoint. To require that clients use a custom domain name to invoke your API, disable /// the default endpoint. /// </para> /// </summary> public bool DisableExecuteApiEndpoint { get { return this._disableExecuteApiEndpoint.GetValueOrDefault(); } set { this._disableExecuteApiEndpoint = value; } } // Check to see if DisableExecuteApiEndpoint property is set internal bool IsSetDisableExecuteApiEndpoint() { return this._disableExecuteApiEndpoint.HasValue; } /// <summary> /// Gets and sets the property EndpointConfiguration. /// <para> /// The endpoint configuration of this RestApi showing the endpoint types of the API. /// /// </para> /// </summary> public EndpointConfiguration EndpointConfiguration { get { return this._endpointConfiguration; } set { this._endpointConfiguration = value; } } // Check to see if EndpointConfiguration property is set internal bool IsSetEndpointConfiguration() { return this._endpointConfiguration != null; } /// <summary> /// Gets and sets the property Id. /// <para> /// The API's identifier. This identifier is unique across all of your APIs in API Gateway. /// </para> /// </summary> public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } /// <summary> /// Gets and sets the property MinimumCompressionSize. /// <para> /// A nullable integer that is used to enable compression (with non-negative between 0 /// and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on /// an API. When compression is enabled, compression or decompression is not applied on /// the payload if the payload size is smaller than this value. Setting it to zero allows /// compression for any payload size. /// </para> /// </summary> public int MinimumCompressionSize { get { return this._minimumCompressionSize.GetValueOrDefault(); } set { this._minimumCompressionSize = value; } } // Check to see if MinimumCompressionSize property is set internal bool IsSetMinimumCompressionSize() { return this._minimumCompressionSize.HasValue; } /// <summary> /// Gets and sets the property Name. /// <para> /// The API's name. /// </para> /// </summary> public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property Policy. /// <para> /// A stringified JSON policy document that applies to this RestApi regardless of the /// caller and Method configuration. /// </para> /// </summary> public string Policy { get { return this._policy; } set { this._policy = value; } } // Check to see if Policy property is set internal bool IsSetPolicy() { return this._policy != null; } /// <summary> /// Gets and sets the property Tags. /// <para> /// The collection of tags. Each tag element is associated with a given resource. /// </para> /// </summary> public Dictionary<string, string> Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } /// <summary> /// Gets and sets the property Version. /// <para> /// A version identifier for the API. /// </para> /// </summary> public string Version { get { return this._version; } set { this._version = value; } } // Check to see if Version property is set internal bool IsSetVersion() { return this._version != null; } /// <summary> /// Gets and sets the property Warnings. /// <para> /// The warning messages reported when <code>failonwarnings</code> is turned on during /// API import. /// </para> /// </summary> public List<string> Warnings { get { return this._warnings; } set { this._warnings = value; } } // Check to see if Warnings property is set internal bool IsSetWarnings() { return this._warnings != null && this._warnings.Count > 0; } } }
299
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateStage operation. /// Changes information about a Stage resource. /// </summary> public partial class UpdateStageRequest : AmazonAPIGatewayRequest { private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private string _restApiId; private string _stageName; /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property RestApiId. /// <para> /// The string identifier of the associated RestApi. /// </para> /// </summary> [AWSProperty(Required=true)] public string RestApiId { get { return this._restApiId; } set { this._restApiId = value; } } // Check to see if RestApiId property is set internal bool IsSetRestApiId() { return this._restApiId != null; } /// <summary> /// Gets and sets the property StageName. /// <para> /// The name of the Stage resource to change information about. /// </para> /// </summary> [AWSProperty(Required=true)] public string StageName { get { return this._stageName; } set { this._stageName = value; } } // Check to see if StageName property is set internal bool IsSetStageName() { return this._stageName != null; } } }
99
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents a unique identifier for a version of a deployed RestApi that is callable /// by users. /// </summary> public partial class UpdateStageResponse : AmazonWebServiceResponse { private AccessLogSettings _accessLogSettings; private bool? _cacheClusterEnabled; private CacheClusterSize _cacheClusterSize; private CacheClusterStatus _cacheClusterStatus; private CanarySettings _canarySettings; private string _clientCertificateId; private DateTime? _createdDate; private string _deploymentId; private string _description; private string _documentationVersion; private DateTime? _lastUpdatedDate; private Dictionary<string, MethodSetting> _methodSettings = new Dictionary<string, MethodSetting>(); private string _stageName; private Dictionary<string, string> _tags = new Dictionary<string, string>(); private bool? _tracingEnabled; private Dictionary<string, string> _variables = new Dictionary<string, string>(); private string _webAclArn; /// <summary> /// Gets and sets the property AccessLogSettings. /// <para> /// Settings for logging access in this stage. /// </para> /// </summary> public AccessLogSettings AccessLogSettings { get { return this._accessLogSettings; } set { this._accessLogSettings = value; } } // Check to see if AccessLogSettings property is set internal bool IsSetAccessLogSettings() { return this._accessLogSettings != null; } /// <summary> /// Gets and sets the property CacheClusterEnabled. /// <para> /// Specifies whether a cache cluster is enabled for the stage. /// </para> /// </summary> public bool CacheClusterEnabled { get { return this._cacheClusterEnabled.GetValueOrDefault(); } set { this._cacheClusterEnabled = value; } } // Check to see if CacheClusterEnabled property is set internal bool IsSetCacheClusterEnabled() { return this._cacheClusterEnabled.HasValue; } /// <summary> /// Gets and sets the property CacheClusterSize. /// <para> /// The stage's cache capacity in GB. For more information about choosing a cache size, /// see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html">Enabling /// API caching to enhance responsiveness</a>. /// </para> /// </summary> public CacheClusterSize CacheClusterSize { get { return this._cacheClusterSize; } set { this._cacheClusterSize = value; } } // Check to see if CacheClusterSize property is set internal bool IsSetCacheClusterSize() { return this._cacheClusterSize != null; } /// <summary> /// Gets and sets the property CacheClusterStatus. /// <para> /// The status of the cache cluster for the stage, if enabled. /// </para> /// </summary> public CacheClusterStatus CacheClusterStatus { get { return this._cacheClusterStatus; } set { this._cacheClusterStatus = value; } } // Check to see if CacheClusterStatus property is set internal bool IsSetCacheClusterStatus() { return this._cacheClusterStatus != null; } /// <summary> /// Gets and sets the property CanarySettings. /// <para> /// Settings for the canary deployment in this stage. /// </para> /// </summary> public CanarySettings CanarySettings { get { return this._canarySettings; } set { this._canarySettings = value; } } // Check to see if CanarySettings property is set internal bool IsSetCanarySettings() { return this._canarySettings != null; } /// <summary> /// Gets and sets the property ClientCertificateId. /// <para> /// The identifier of a client certificate for an API stage. /// </para> /// </summary> public string ClientCertificateId { get { return this._clientCertificateId; } set { this._clientCertificateId = value; } } // Check to see if ClientCertificateId property is set internal bool IsSetClientCertificateId() { return this._clientCertificateId != null; } /// <summary> /// Gets and sets the property CreatedDate. /// <para> /// The timestamp when the stage was created. /// </para> /// </summary> public DateTime CreatedDate { get { return this._createdDate.GetValueOrDefault(); } set { this._createdDate = value; } } // Check to see if CreatedDate property is set internal bool IsSetCreatedDate() { return this._createdDate.HasValue; } /// <summary> /// Gets and sets the property DeploymentId. /// <para> /// The identifier of the Deployment that the stage points to. /// </para> /// </summary> public string DeploymentId { get { return this._deploymentId; } set { this._deploymentId = value; } } // Check to see if DeploymentId property is set internal bool IsSetDeploymentId() { return this._deploymentId != null; } /// <summary> /// Gets and sets the property Description. /// <para> /// The stage's description. /// </para> /// </summary> public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property DocumentationVersion. /// <para> /// The version of the associated API documentation. /// </para> /// </summary> public string DocumentationVersion { get { return this._documentationVersion; } set { this._documentationVersion = value; } } // Check to see if DocumentationVersion property is set internal bool IsSetDocumentationVersion() { return this._documentationVersion != null; } /// <summary> /// Gets and sets the property LastUpdatedDate. /// <para> /// The timestamp when the stage last updated. /// </para> /// </summary> public DateTime LastUpdatedDate { get { return this._lastUpdatedDate.GetValueOrDefault(); } set { this._lastUpdatedDate = value; } } // Check to see if LastUpdatedDate property is set internal bool IsSetLastUpdatedDate() { return this._lastUpdatedDate.HasValue; } /// <summary> /// Gets and sets the property MethodSettings. /// <para> /// A map that defines the method settings for a Stage resource. Keys (designated as <code>/{method_setting_key</code> /// below) are method paths defined as <code>{resource_path}/{http_method}</code> for /// an individual method override, or <code>/\*/\*</code> for overriding all methods in /// the stage. /// </para> /// </summary> public Dictionary<string, MethodSetting> MethodSettings { get { return this._methodSettings; } set { this._methodSettings = value; } } // Check to see if MethodSettings property is set internal bool IsSetMethodSettings() { return this._methodSettings != null && this._methodSettings.Count > 0; } /// <summary> /// Gets and sets the property StageName. /// <para> /// The name of the stage is the first path segment in the Uniform Resource Identifier /// (URI) of a call to API Gateway. Stage names can only contain alphanumeric characters, /// hyphens, and underscores. Maximum length is 128 characters. /// </para> /// </summary> public string StageName { get { return this._stageName; } set { this._stageName = value; } } // Check to see if StageName property is set internal bool IsSetStageName() { return this._stageName != null; } /// <summary> /// Gets and sets the property Tags. /// <para> /// The collection of tags. Each tag element is associated with a given resource. /// </para> /// </summary> public Dictionary<string, string> Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } /// <summary> /// Gets and sets the property TracingEnabled. /// <para> /// Specifies whether active tracing with X-ray is enabled for the Stage. /// </para> /// </summary> public bool TracingEnabled { get { return this._tracingEnabled.GetValueOrDefault(); } set { this._tracingEnabled = value; } } // Check to see if TracingEnabled property is set internal bool IsSetTracingEnabled() { return this._tracingEnabled.HasValue; } /// <summary> /// Gets and sets the property Variables. /// <para> /// A map that defines the stage variables for a Stage resource. Variable names can have /// alphanumeric and underscore characters, and the values must match <code>[A-Za-z0-9-._~:/?#&amp;=,]+</code>. /// </para> /// </summary> public Dictionary<string, string> Variables { get { return this._variables; } set { this._variables = value; } } // Check to see if Variables property is set internal bool IsSetVariables() { return this._variables != null && this._variables.Count > 0; } /// <summary> /// Gets and sets the property WebAclArn. /// <para> /// The ARN of the WebAcl associated with the Stage. /// </para> /// </summary> public string WebAclArn { get { return this._webAclArn; } set { this._webAclArn = value; } } // Check to see if WebAclArn property is set internal bool IsSetWebAclArn() { return this._webAclArn != null; } } }
370
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateUsagePlan operation. /// Updates a usage plan of a given plan Id. /// </summary> public partial class UpdateUsagePlanRequest : AmazonAPIGatewayRequest { private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private string _usagePlanId; /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property UsagePlanId. /// <para> /// The Id of the to-be-updated usage plan. /// </para> /// </summary> [AWSProperty(Required=true)] public string UsagePlanId { get { return this._usagePlanId; } set { this._usagePlanId = value; } } // Check to see if UsagePlanId property is set internal bool IsSetUsagePlanId() { return this._usagePlanId != null; } } }
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents a usage plan used to specify who can assess associated API stages. Optionally, /// target request rate and quota limits can be set. In some cases clients can exceed /// the targets that you set. Don’t rely on usage plans to control costs. Consider using /// <a href="https://docs.aws.amazon.com/cost-management/latest/userguide/budgets-managing-costs.html">Amazon /// Web Services Budgets</a> to monitor costs and <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">WAF</a> /// to manage API requests. /// </summary> public partial class UpdateUsagePlanResponse : AmazonWebServiceResponse { private List<ApiStage> _apiStages = new List<ApiStage>(); private string _description; private string _id; private string _name; private string _productCode; private QuotaSettings _quota; private Dictionary<string, string> _tags = new Dictionary<string, string>(); private ThrottleSettings _throttle; /// <summary> /// Gets and sets the property ApiStages. /// <para> /// The associated API stages of a usage plan. /// </para> /// </summary> public List<ApiStage> ApiStages { get { return this._apiStages; } set { this._apiStages = value; } } // Check to see if ApiStages property is set internal bool IsSetApiStages() { return this._apiStages != null && this._apiStages.Count > 0; } /// <summary> /// Gets and sets the property Description. /// <para> /// The description of a usage plan. /// </para> /// </summary> public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property Id. /// <para> /// The identifier of a UsagePlan resource. /// </para> /// </summary> public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of a usage plan. /// </para> /// </summary> public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property ProductCode. /// <para> /// The AWS Markeplace product identifier to associate with the usage plan as a SaaS product /// on AWS Marketplace. /// </para> /// </summary> public string ProductCode { get { return this._productCode; } set { this._productCode = value; } } // Check to see if ProductCode property is set internal bool IsSetProductCode() { return this._productCode != null; } /// <summary> /// Gets and sets the property Quota. /// <para> /// The target maximum number of permitted requests per a given unit time interval. /// </para> /// </summary> public QuotaSettings Quota { get { return this._quota; } set { this._quota = value; } } // Check to see if Quota property is set internal bool IsSetQuota() { return this._quota != null; } /// <summary> /// Gets and sets the property Tags. /// <para> /// The collection of tags. Each tag element is associated with a given resource. /// </para> /// </summary> public Dictionary<string, string> Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } /// <summary> /// Gets and sets the property Throttle. /// <para> /// A map containing method level throttling information for API stage in a usage plan. /// </para> /// </summary> public ThrottleSettings Throttle { get { return this._throttle; } set { this._throttle = value; } } // Check to see if Throttle property is set internal bool IsSetThrottle() { return this._throttle != null; } } }
196
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateUsage operation. /// Grants a temporary extension to the remaining quota of a usage plan associated with /// a specified API key. /// </summary> public partial class UpdateUsageRequest : AmazonAPIGatewayRequest { private string _keyId; private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private string _usagePlanId; /// <summary> /// Gets and sets the property KeyId. /// <para> /// The identifier of the API key associated with the usage plan in which a temporary /// extension is granted to the remaining quota. /// </para> /// </summary> [AWSProperty(Required=true)] public string KeyId { get { return this._keyId; } set { this._keyId = value; } } // Check to see if KeyId property is set internal bool IsSetKeyId() { return this._keyId != null; } /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property UsagePlanId. /// <para> /// The Id of the usage plan associated with the usage data. /// </para> /// </summary> [AWSProperty(Required=true)] public string UsagePlanId { get { return this._usagePlanId; } set { this._usagePlanId = value; } } // Check to see if UsagePlanId property is set internal bool IsSetUsagePlanId() { return this._usagePlanId != null; } } }
101
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents the usage data of a usage plan. /// </summary> public partial class UpdateUsageResponse : AmazonWebServiceResponse { private string _endDate; private Dictionary<string, List<List<long>>> _items = new Dictionary<string, List<List<long>>>(); private string _position; private string _startDate; private string _usagePlanId; /// <summary> /// Gets and sets the property EndDate. /// <para> /// The ending date of the usage data. /// </para> /// </summary> public string EndDate { get { return this._endDate; } set { this._endDate = value; } } // Check to see if EndDate property is set internal bool IsSetEndDate() { return this._endDate != null; } /// <summary> /// Gets and sets the property Items. /// <para> /// The usage data, as daily logs of used and remaining quotas, over the specified time /// interval indexed over the API keys in a usage plan. For example, <code>{..., "values" /// : { "{api_key}" : [ [0, 100], [10, 90], [100, 10]]}</code>, where <code>{api_key}</code> /// stands for an API key value and the daily log entry is of the format <code>[used quota, /// remaining quota]</code>. /// </para> /// </summary> public Dictionary<string, List<List<long>>> Items { get { return this._items; } set { this._items = value; } } // Check to see if Items property is set internal bool IsSetItems() { return this._items != null && this._items.Count > 0; } /// <summary> /// Gets and sets the property Position. /// </summary> public string Position { get { return this._position; } set { this._position = value; } } // Check to see if Position property is set internal bool IsSetPosition() { return this._position != null; } /// <summary> /// Gets and sets the property StartDate. /// <para> /// The starting date of the usage data. /// </para> /// </summary> public string StartDate { get { return this._startDate; } set { this._startDate = value; } } // Check to see if StartDate property is set internal bool IsSetStartDate() { return this._startDate != null; } /// <summary> /// Gets and sets the property UsagePlanId. /// <para> /// The plan Id associated with this usage data. /// </para> /// </summary> public string UsagePlanId { get { return this._usagePlanId; } set { this._usagePlanId = value; } } // Check to see if UsagePlanId property is set internal bool IsSetUsagePlanId() { return this._usagePlanId != null; } } }
134
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Container for the parameters to the UpdateVpcLink operation. /// Updates an existing VpcLink of a specified identifier. /// </summary> public partial class UpdateVpcLinkRequest : AmazonAPIGatewayRequest { private List<PatchOperation> _patchOperations = new List<PatchOperation>(); private string _vpcLinkId; /// <summary> /// Gets and sets the property PatchOperations. /// <para> /// For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch /// Operations</a>. /// </para> /// </summary> public List<PatchOperation> PatchOperations { get { return this._patchOperations; } set { this._patchOperations = value; } } // Check to see if PatchOperations property is set internal bool IsSetPatchOperations() { return this._patchOperations != null && this._patchOperations.Count > 0; } /// <summary> /// Gets and sets the property VpcLinkId. /// <para> /// The identifier of the VpcLink. It is used in an Integration to reference this VpcLink. /// </para> /// </summary> [AWSProperty(Required=true)] public string VpcLinkId { get { return this._vpcLinkId; } set { this._vpcLinkId = value; } } // Check to see if VpcLinkId property is set internal bool IsSetVpcLinkId() { return this._vpcLinkId != null; } } }
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// An API Gateway VPC link for a RestApi to access resources in an Amazon Virtual Private /// Cloud (VPC). /// </summary> public partial class UpdateVpcLinkResponse : AmazonWebServiceResponse { private string _description; private string _id; private string _name; private VpcLinkStatus _status; private string _statusMessage; private Dictionary<string, string> _tags = new Dictionary<string, string>(); private List<string> _targetArns = new List<string>(); /// <summary> /// Gets and sets the property Description. /// <para> /// The description of the VPC link. /// </para> /// </summary> public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property Id. /// <para> /// The identifier of the VpcLink. It is used in an Integration to reference this VpcLink. /// </para> /// </summary> public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name used to label and identify the VPC link. /// </para> /// </summary> public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property Status. /// <para> /// The status of the VPC link. The valid values are <code>AVAILABLE</code>, <code>PENDING</code>, /// <code>DELETING</code>, or <code>FAILED</code>. Deploying an API will wait if the status /// is <code>PENDING</code> and will fail if the status is <code>DELETING</code>. /// </para> /// </summary> public VpcLinkStatus Status { get { return this._status; } set { this._status = value; } } // Check to see if Status property is set internal bool IsSetStatus() { return this._status != null; } /// <summary> /// Gets and sets the property StatusMessage. /// <para> /// A description about the VPC link status. /// </para> /// </summary> public string StatusMessage { get { return this._statusMessage; } set { this._statusMessage = value; } } // Check to see if StatusMessage property is set internal bool IsSetStatusMessage() { return this._statusMessage != null; } /// <summary> /// Gets and sets the property Tags. /// <para> /// The collection of tags. Each tag element is associated with a given resource. /// </para> /// </summary> public Dictionary<string, string> Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } /// <summary> /// Gets and sets the property TargetArns. /// <para> /// The ARN of the network load balancer of the VPC targeted by the VPC link. The network /// load balancer must be owned by the same AWS account of the API owner. /// </para> /// </summary> public List<string> TargetArns { get { return this._targetArns; } set { this._targetArns = value; } } // Check to see if TargetArns property is set internal bool IsSetTargetArns() { return this._targetArns != null && this._targetArns.Count > 0; } } }
175
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents a usage plan used to specify who can assess associated API stages. Optionally, /// target request rate and quota limits can be set. In some cases clients can exceed /// the targets that you set. Don’t rely on usage plans to control costs. Consider using /// <a href="https://docs.aws.amazon.com/cost-management/latest/userguide/budgets-managing-costs.html">Amazon /// Web Services Budgets</a> to monitor costs and <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">WAF</a> /// to manage API requests. /// </summary> public partial class UsagePlan { private List<ApiStage> _apiStages = new List<ApiStage>(); private string _description; private string _id; private string _name; private string _productCode; private QuotaSettings _quota; private Dictionary<string, string> _tags = new Dictionary<string, string>(); private ThrottleSettings _throttle; /// <summary> /// Gets and sets the property ApiStages. /// <para> /// The associated API stages of a usage plan. /// </para> /// </summary> public List<ApiStage> ApiStages { get { return this._apiStages; } set { this._apiStages = value; } } // Check to see if ApiStages property is set internal bool IsSetApiStages() { return this._apiStages != null && this._apiStages.Count > 0; } /// <summary> /// Gets and sets the property Description. /// <para> /// The description of a usage plan. /// </para> /// </summary> public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property Id. /// <para> /// The identifier of a UsagePlan resource. /// </para> /// </summary> public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of a usage plan. /// </para> /// </summary> public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property ProductCode. /// <para> /// The AWS Markeplace product identifier to associate with the usage plan as a SaaS product /// on AWS Marketplace. /// </para> /// </summary> public string ProductCode { get { return this._productCode; } set { this._productCode = value; } } // Check to see if ProductCode property is set internal bool IsSetProductCode() { return this._productCode != null; } /// <summary> /// Gets and sets the property Quota. /// <para> /// The target maximum number of permitted requests per a given unit time interval. /// </para> /// </summary> public QuotaSettings Quota { get { return this._quota; } set { this._quota = value; } } // Check to see if Quota property is set internal bool IsSetQuota() { return this._quota != null; } /// <summary> /// Gets and sets the property Tags. /// <para> /// The collection of tags. Each tag element is associated with a given resource. /// </para> /// </summary> public Dictionary<string, string> Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } /// <summary> /// Gets and sets the property Throttle. /// <para> /// A map containing method level throttling information for API stage in a usage plan. /// </para> /// </summary> public ThrottleSettings Throttle { get { return this._throttle; } set { this._throttle = value; } } // Check to see if Throttle property is set internal bool IsSetThrottle() { return this._throttle != null; } } }
196
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// Represents a usage plan key to identify a plan customer. /// </summary> public partial class UsagePlanKey { private string _id; private string _name; private string _type; private string _value; /// <summary> /// Gets and sets the property Id. /// <para> /// The Id of a usage plan key. /// </para> /// </summary> public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of a usage plan key. /// </para> /// </summary> public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property Type. /// <para> /// The type of a usage plan key. Currently, the valid key type is <code>API_KEY</code>. /// </para> /// </summary> public string Type { get { return this._type; } set { this._type = value; } } // Check to see if Type property is set internal bool IsSetType() { return this._type != null; } /// <summary> /// Gets and sets the property Value. /// <para> /// The value of a usage plan key. /// </para> /// </summary> public string Value { get { return this._value; } set { this._value = value; } } // Check to see if Value property is set internal bool IsSetValue() { return this._value != null; } } }
114
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.APIGateway.Model { /// <summary> /// An API Gateway VPC link for a RestApi to access resources in an Amazon Virtual Private /// Cloud (VPC). /// </summary> public partial class VpcLink { private string _description; private string _id; private string _name; private VpcLinkStatus _status; private string _statusMessage; private Dictionary<string, string> _tags = new Dictionary<string, string>(); private List<string> _targetArns = new List<string>(); /// <summary> /// Gets and sets the property Description. /// <para> /// The description of the VPC link. /// </para> /// </summary> public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property Id. /// <para> /// The identifier of the VpcLink. It is used in an Integration to reference this VpcLink. /// </para> /// </summary> public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name used to label and identify the VPC link. /// </para> /// </summary> public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property Status. /// <para> /// The status of the VPC link. The valid values are <code>AVAILABLE</code>, <code>PENDING</code>, /// <code>DELETING</code>, or <code>FAILED</code>. Deploying an API will wait if the status /// is <code>PENDING</code> and will fail if the status is <code>DELETING</code>. /// </para> /// </summary> public VpcLinkStatus Status { get { return this._status; } set { this._status = value; } } // Check to see if Status property is set internal bool IsSetStatus() { return this._status != null; } /// <summary> /// Gets and sets the property StatusMessage. /// <para> /// A description about the VPC link status. /// </para> /// </summary> public string StatusMessage { get { return this._statusMessage; } set { this._statusMessage = value; } } // Check to see if StatusMessage property is set internal bool IsSetStatusMessage() { return this._statusMessage != null; } /// <summary> /// Gets and sets the property Tags. /// <para> /// The collection of tags. Each tag element is associated with a given resource. /// </para> /// </summary> public Dictionary<string, string> Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } /// <summary> /// Gets and sets the property TargetArns. /// <para> /// The ARN of the network load balancer of the VPC targeted by the VPC link. The network /// load balancer must be owned by the same AWS account of the API owner. /// </para> /// </summary> public List<string> TargetArns { get { return this._targetArns; } set { this._targetArns = value; } } // Check to see if TargetArns property is set internal bool IsSetTargetArns() { return this._targetArns != null && this._targetArns.Count > 0; } } }
175
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AccessLogSettings Object /// </summary> public class AccessLogSettingsUnmarshaller : IUnmarshaller<AccessLogSettings, XmlUnmarshallerContext>, IUnmarshaller<AccessLogSettings, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AccessLogSettings IUnmarshaller<AccessLogSettings, 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 AccessLogSettings Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AccessLogSettings unmarshalledObject = new AccessLogSettings(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("destinationArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DestinationArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("format", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Format = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AccessLogSettingsUnmarshaller _instance = new AccessLogSettingsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AccessLogSettingsUnmarshaller 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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ApiKey Object /// </summary> public class ApiKeyUnmarshaller : IUnmarshaller<ApiKey, XmlUnmarshallerContext>, IUnmarshaller<ApiKey, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ApiKey IUnmarshaller<ApiKey, 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 ApiKey Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ApiKey unmarshalledObject = new ApiKey(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("createdDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("customerId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.CustomerId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("enabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.Enabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lastUpdatedDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastUpdatedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("stageKeys", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.StageKeys = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tags", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.Tags = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("value", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Value = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ApiKeyUnmarshaller _instance = new ApiKeyUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ApiKeyUnmarshaller Instance { get { return _instance; } } } }
146
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// ApiStage Marshaller /// </summary> public class ApiStageMarshaller : IRequestMarshaller<ApiStage, 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(ApiStage requestObject, JsonMarshallerContext context) { if(requestObject.IsSetApiId()) { context.Writer.WritePropertyName("apiId"); context.Writer.Write(requestObject.ApiId); } if(requestObject.IsSetStage()) { context.Writer.WritePropertyName("stage"); context.Writer.Write(requestObject.Stage); } if(requestObject.IsSetThrottle()) { context.Writer.WritePropertyName("throttle"); context.Writer.WriteObjectStart(); foreach (var requestObjectThrottleKvp in requestObject.Throttle) { context.Writer.WritePropertyName(requestObjectThrottleKvp.Key); var requestObjectThrottleValue = requestObjectThrottleKvp.Value; context.Writer.WriteObjectStart(); var marshaller = ThrottleSettingsMarshaller.Instance; marshaller.Marshall(requestObjectThrottleValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static ApiStageMarshaller Instance = new ApiStageMarshaller(); } }
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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ApiStage Object /// </summary> public class ApiStageUnmarshaller : IUnmarshaller<ApiStage, XmlUnmarshallerContext>, IUnmarshaller<ApiStage, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ApiStage IUnmarshaller<ApiStage, 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 ApiStage Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ApiStage unmarshalledObject = new ApiStage(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("apiId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ApiId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("stage", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Stage = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("throttle", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, ThrottleSettings, StringUnmarshaller, ThrottleSettingsUnmarshaller>(StringUnmarshaller.Instance, ThrottleSettingsUnmarshaller.Instance); unmarshalledObject.Throttle = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ApiStageUnmarshaller _instance = new ApiStageUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ApiStageUnmarshaller 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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Authorizer Object /// </summary> public class AuthorizerUnmarshaller : IUnmarshaller<Authorizer, XmlUnmarshallerContext>, IUnmarshaller<Authorizer, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Authorizer IUnmarshaller<Authorizer, 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 Authorizer Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Authorizer unmarshalledObject = new Authorizer(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("authorizerCredentials", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AuthorizerCredentials = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("authorizerResultTtlInSeconds", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.AuthorizerResultTtlInSeconds = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("authorizerUri", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AuthorizerUri = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("authType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AuthType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("identitySource", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.IdentitySource = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("identityValidationExpression", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.IdentityValidationExpression = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("providerARNs", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.ProviderARNs = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Type = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AuthorizerUnmarshaller _instance = new AuthorizerUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AuthorizerUnmarshaller Instance { get { return _instance; } } } }
146
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BadRequestException Object /// </summary> public class BadRequestExceptionUnmarshaller : IErrorResponseUnmarshaller<BadRequestException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BadRequestException 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 BadRequestException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); BadRequestException unmarshalledObject = new BadRequestException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static BadRequestExceptionUnmarshaller _instance = new BadRequestExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BadRequestExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BasePathMapping Object /// </summary> public class BasePathMappingUnmarshaller : IUnmarshaller<BasePathMapping, XmlUnmarshallerContext>, IUnmarshaller<BasePathMapping, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BasePathMapping IUnmarshaller<BasePathMapping, 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 BasePathMapping Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BasePathMapping unmarshalledObject = new BasePathMapping(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("basePath", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.BasePath = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("restApiId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.RestApiId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("stage", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Stage = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BasePathMappingUnmarshaller _instance = new BasePathMappingUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BasePathMappingUnmarshaller 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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// CanarySettings Marshaller /// </summary> public class CanarySettingsMarshaller : IRequestMarshaller<CanarySettings, 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(CanarySettings requestObject, JsonMarshallerContext context) { if(requestObject.IsSetDeploymentId()) { context.Writer.WritePropertyName("deploymentId"); context.Writer.Write(requestObject.DeploymentId); } if(requestObject.IsSetPercentTraffic()) { context.Writer.WritePropertyName("percentTraffic"); context.Writer.Write(requestObject.PercentTraffic); } if(requestObject.IsSetStageVariableOverrides()) { context.Writer.WritePropertyName("stageVariableOverrides"); context.Writer.WriteObjectStart(); foreach (var requestObjectStageVariableOverridesKvp in requestObject.StageVariableOverrides) { context.Writer.WritePropertyName(requestObjectStageVariableOverridesKvp.Key); var requestObjectStageVariableOverridesValue = requestObjectStageVariableOverridesKvp.Value; context.Writer.Write(requestObjectStageVariableOverridesValue); } context.Writer.WriteObjectEnd(); } if(requestObject.IsSetUseStageCache()) { context.Writer.WritePropertyName("useStageCache"); context.Writer.Write(requestObject.UseStageCache); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static CanarySettingsMarshaller Instance = new CanarySettingsMarshaller(); } }
88
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CanarySettings Object /// </summary> public class CanarySettingsUnmarshaller : IUnmarshaller<CanarySettings, XmlUnmarshallerContext>, IUnmarshaller<CanarySettings, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> CanarySettings IUnmarshaller<CanarySettings, 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 CanarySettings Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; CanarySettings unmarshalledObject = new CanarySettings(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("deploymentId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DeploymentId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("percentTraffic", targetDepth)) { var unmarshaller = DoubleUnmarshaller.Instance; unmarshalledObject.PercentTraffic = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("stageVariableOverrides", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.StageVariableOverrides = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("useStageCache", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.UseStageCache = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static CanarySettingsUnmarshaller _instance = new CanarySettingsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static CanarySettingsUnmarshaller 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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ClientCertificate Object /// </summary> public class ClientCertificateUnmarshaller : IUnmarshaller<ClientCertificate, XmlUnmarshallerContext>, IUnmarshaller<ClientCertificate, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ClientCertificate IUnmarshaller<ClientCertificate, 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 ClientCertificate Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ClientCertificate unmarshalledObject = new ClientCertificate(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("clientCertificateId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ClientCertificateId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("expirationDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.ExpirationDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("pemEncodedCertificate", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.PemEncodedCertificate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tags", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.Tags = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ClientCertificateUnmarshaller _instance = new ClientCertificateUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ClientCertificateUnmarshaller Instance { get { return _instance; } } } }
122
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ConflictException Object /// </summary> public class ConflictExceptionUnmarshaller : IErrorResponseUnmarshaller<ConflictException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ConflictException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public ConflictException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); ConflictException unmarshalledObject = new ConflictException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static ConflictExceptionUnmarshaller _instance = new ConflictExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ConflictExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// CreateApiKey Request Marshaller /// </summary> public class CreateApiKeyRequestMarshaller : IMarshaller<IRequest, CreateApiKeyRequest> , 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((CreateApiKeyRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateApiKeyRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "POST"; request.ResourcePath = "/apikeys"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetCustomerId()) { context.Writer.WritePropertyName("customerId"); context.Writer.Write(publicRequest.CustomerId); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetEnabled()) { context.Writer.WritePropertyName("enabled"); context.Writer.Write(publicRequest.Enabled); } if(publicRequest.IsSetGenerateDistinctId()) { context.Writer.WritePropertyName("generateDistinctId"); context.Writer.Write(publicRequest.GenerateDistinctId); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetStageKeys()) { context.Writer.WritePropertyName("stageKeys"); context.Writer.WriteArrayStart(); foreach(var publicRequestStageKeysListValue in publicRequest.StageKeys) { context.Writer.WriteObjectStart(); var marshaller = StageKeyMarshaller.Instance; marshaller.Marshall(publicRequestStageKeysListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } 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(); } if(publicRequest.IsSetValue()) { context.Writer.WritePropertyName("value"); context.Writer.Write(publicRequest.Value); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateApiKeyRequestMarshaller _instance = new CreateApiKeyRequestMarshaller(); internal static CreateApiKeyRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateApiKeyRequestMarshaller Instance { get { return _instance; } } } }
161
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateApiKey operation /// </summary> public class CreateApiKeyResponseUnmarshaller : 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) { CreateApiKeyResponse response = new CreateApiKeyResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("createdDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreatedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("customerId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CustomerId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("enabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.Enabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lastUpdatedDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LastUpdatedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("stageKeys", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); response.StageKeys = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tags", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.Tags = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("value", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Value = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateApiKeyResponseUnmarshaller _instance = new CreateApiKeyResponseUnmarshaller(); internal static CreateApiKeyResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateApiKeyResponseUnmarshaller Instance { get { return _instance; } } } }
184
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// CreateAuthorizer Request Marshaller /// </summary> public class CreateAuthorizerRequestMarshaller : IMarshaller<IRequest, CreateAuthorizerRequest> , 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((CreateAuthorizerRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateAuthorizerRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "POST"; if (!publicRequest.IsSetRestApiId()) throw new AmazonAPIGatewayException("Request object does not have required field RestApiId set"); request.AddPathResource("{restapi_id}", StringUtils.FromString(publicRequest.RestApiId)); request.ResourcePath = "/restapis/{restapi_id}/authorizers"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAuthorizerCredentials()) { context.Writer.WritePropertyName("authorizerCredentials"); context.Writer.Write(publicRequest.AuthorizerCredentials); } if(publicRequest.IsSetAuthorizerResultTtlInSeconds()) { context.Writer.WritePropertyName("authorizerResultTtlInSeconds"); context.Writer.Write(publicRequest.AuthorizerResultTtlInSeconds); } if(publicRequest.IsSetAuthorizerUri()) { context.Writer.WritePropertyName("authorizerUri"); context.Writer.Write(publicRequest.AuthorizerUri); } if(publicRequest.IsSetAuthType()) { context.Writer.WritePropertyName("authType"); context.Writer.Write(publicRequest.AuthType); } if(publicRequest.IsSetIdentitySource()) { context.Writer.WritePropertyName("identitySource"); context.Writer.Write(publicRequest.IdentitySource); } if(publicRequest.IsSetIdentityValidationExpression()) { context.Writer.WritePropertyName("identityValidationExpression"); context.Writer.Write(publicRequest.IdentityValidationExpression); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetProviderARNs()) { context.Writer.WritePropertyName("providerARNs"); context.Writer.WriteArrayStart(); foreach(var publicRequestProviderARNsListValue in publicRequest.ProviderARNs) { context.Writer.Write(publicRequestProviderARNsListValue); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetType()) { context.Writer.WritePropertyName("type"); context.Writer.Write(publicRequest.Type); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateAuthorizerRequestMarshaller _instance = new CreateAuthorizerRequestMarshaller(); internal static CreateAuthorizerRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateAuthorizerRequestMarshaller Instance { get { return _instance; } } } }
157
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateAuthorizer operation /// </summary> public class CreateAuthorizerResponseUnmarshaller : 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) { CreateAuthorizerResponse response = new CreateAuthorizerResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("authorizerCredentials", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AuthorizerCredentials = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("authorizerResultTtlInSeconds", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.AuthorizerResultTtlInSeconds = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("authorizerUri", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AuthorizerUri = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("authType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AuthType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("identitySource", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.IdentitySource = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("identityValidationExpression", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.IdentityValidationExpression = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("providerARNs", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); response.ProviderARNs = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Type = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateAuthorizerResponseUnmarshaller _instance = new CreateAuthorizerResponseUnmarshaller(); internal static CreateAuthorizerResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateAuthorizerResponseUnmarshaller Instance { get { return _instance; } } } }
184
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// CreateBasePathMapping Request Marshaller /// </summary> public class CreateBasePathMappingRequestMarshaller : IMarshaller<IRequest, CreateBasePathMappingRequest> , 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((CreateBasePathMappingRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateBasePathMappingRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "POST"; if (!publicRequest.IsSetDomainName()) throw new AmazonAPIGatewayException("Request object does not have required field DomainName set"); request.AddPathResource("{domain_name}", StringUtils.FromString(publicRequest.DomainName)); request.ResourcePath = "/domainnames/{domain_name}/basepathmappings"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetBasePath()) { context.Writer.WritePropertyName("basePath"); context.Writer.Write(publicRequest.BasePath); } if(publicRequest.IsSetRestApiId()) { context.Writer.WritePropertyName("restApiId"); context.Writer.Write(publicRequest.RestApiId); } if(publicRequest.IsSetStage()) { context.Writer.WritePropertyName("stage"); context.Writer.Write(publicRequest.Stage); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateBasePathMappingRequestMarshaller _instance = new CreateBasePathMappingRequestMarshaller(); internal static CreateBasePathMappingRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateBasePathMappingRequestMarshaller 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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateBasePathMapping operation /// </summary> public class CreateBasePathMappingResponseUnmarshaller : 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) { CreateBasePathMappingResponse response = new CreateBasePathMappingResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("basePath", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.BasePath = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("restApiId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RestApiId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("stage", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Stage = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateBasePathMappingResponseUnmarshaller _instance = new CreateBasePathMappingResponseUnmarshaller(); internal static CreateBasePathMappingResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateBasePathMappingResponseUnmarshaller Instance { get { return _instance; } } } }
142
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// CreateDeployment Request Marshaller /// </summary> public class CreateDeploymentRequestMarshaller : IMarshaller<IRequest, CreateDeploymentRequest> , 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((CreateDeploymentRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateDeploymentRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "POST"; if (!publicRequest.IsSetRestApiId()) throw new AmazonAPIGatewayException("Request object does not have required field RestApiId set"); request.AddPathResource("{restapi_id}", StringUtils.FromString(publicRequest.RestApiId)); request.ResourcePath = "/restapis/{restapi_id}/deployments"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetCacheClusterEnabled()) { context.Writer.WritePropertyName("cacheClusterEnabled"); context.Writer.Write(publicRequest.CacheClusterEnabled); } if(publicRequest.IsSetCacheClusterSize()) { context.Writer.WritePropertyName("cacheClusterSize"); context.Writer.Write(publicRequest.CacheClusterSize); } if(publicRequest.IsSetCanarySettings()) { context.Writer.WritePropertyName("canarySettings"); context.Writer.WriteObjectStart(); var marshaller = DeploymentCanarySettingsMarshaller.Instance; marshaller.Marshall(publicRequest.CanarySettings, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetStageDescription()) { context.Writer.WritePropertyName("stageDescription"); context.Writer.Write(publicRequest.StageDescription); } if(publicRequest.IsSetStageName()) { context.Writer.WritePropertyName("stageName"); context.Writer.Write(publicRequest.StageName); } if(publicRequest.IsSetTracingEnabled()) { context.Writer.WritePropertyName("tracingEnabled"); context.Writer.Write(publicRequest.TracingEnabled); } if(publicRequest.IsSetVariables()) { context.Writer.WritePropertyName("variables"); context.Writer.WriteObjectStart(); foreach (var publicRequestVariablesKvp in publicRequest.Variables) { context.Writer.WritePropertyName(publicRequestVariablesKvp.Key); var publicRequestVariablesValue = publicRequestVariablesKvp.Value; context.Writer.Write(publicRequestVariablesValue); } context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateDeploymentRequestMarshaller _instance = new CreateDeploymentRequestMarshaller(); internal static CreateDeploymentRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateDeploymentRequestMarshaller Instance { get { return _instance; } } } }
159
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateDeployment operation /// </summary> public class CreateDeploymentResponseUnmarshaller : 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) { CreateDeploymentResponse response = new CreateDeploymentResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("apiSummary", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, Dictionary<string, MethodSnapshot>, StringUnmarshaller, DictionaryUnmarshaller<string, MethodSnapshot, StringUnmarshaller, MethodSnapshotUnmarshaller>>(StringUnmarshaller.Instance, new DictionaryUnmarshaller<string, MethodSnapshot, StringUnmarshaller, MethodSnapshotUnmarshaller>(StringUnmarshaller.Instance, MethodSnapshotUnmarshaller.Instance)); response.ApiSummary = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreatedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateDeploymentResponseUnmarshaller _instance = new CreateDeploymentResponseUnmarshaller(); internal static CreateDeploymentResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateDeploymentResponseUnmarshaller Instance { get { return _instance; } } } }
152
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// CreateDocumentationPart Request Marshaller /// </summary> public class CreateDocumentationPartRequestMarshaller : IMarshaller<IRequest, CreateDocumentationPartRequest> , 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((CreateDocumentationPartRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateDocumentationPartRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "POST"; if (!publicRequest.IsSetRestApiId()) throw new AmazonAPIGatewayException("Request object does not have required field RestApiId set"); request.AddPathResource("{restapi_id}", StringUtils.FromString(publicRequest.RestApiId)); request.ResourcePath = "/restapis/{restapi_id}/documentation/parts"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetLocation()) { context.Writer.WritePropertyName("location"); context.Writer.WriteObjectStart(); var marshaller = DocumentationPartLocationMarshaller.Instance; marshaller.Marshall(publicRequest.Location, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetProperties()) { context.Writer.WritePropertyName("properties"); context.Writer.Write(publicRequest.Properties); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateDocumentationPartRequestMarshaller _instance = new CreateDocumentationPartRequestMarshaller(); internal static CreateDocumentationPartRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateDocumentationPartRequestMarshaller 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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateDocumentationPart operation /// </summary> public class CreateDocumentationPartResponseUnmarshaller : 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) { CreateDocumentationPartResponse response = new CreateDocumentationPartResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("location", targetDepth)) { var unmarshaller = DocumentationPartLocationUnmarshaller.Instance; response.Location = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("properties", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Properties = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateDocumentationPartResponseUnmarshaller _instance = new CreateDocumentationPartResponseUnmarshaller(); internal static CreateDocumentationPartResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateDocumentationPartResponseUnmarshaller Instance { get { return _instance; } } } }
142
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// CreateDocumentationVersion Request Marshaller /// </summary> public class CreateDocumentationVersionRequestMarshaller : IMarshaller<IRequest, CreateDocumentationVersionRequest> , 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((CreateDocumentationVersionRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateDocumentationVersionRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "POST"; if (!publicRequest.IsSetRestApiId()) throw new AmazonAPIGatewayException("Request object does not have required field RestApiId set"); request.AddPathResource("{restapi_id}", StringUtils.FromString(publicRequest.RestApiId)); request.ResourcePath = "/restapis/{restapi_id}/documentation/versions"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetDocumentationVersion()) { context.Writer.WritePropertyName("documentationVersion"); context.Writer.Write(publicRequest.DocumentationVersion); } if(publicRequest.IsSetStageName()) { context.Writer.WritePropertyName("stageName"); context.Writer.Write(publicRequest.StageName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateDocumentationVersionRequestMarshaller _instance = new CreateDocumentationVersionRequestMarshaller(); internal static CreateDocumentationVersionRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateDocumentationVersionRequestMarshaller 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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateDocumentationVersion operation /// </summary> public class CreateDocumentationVersionResponseUnmarshaller : 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) { CreateDocumentationVersionResponse response = new CreateDocumentationVersionResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("createdDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreatedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("version", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Version = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateDocumentationVersionResponseUnmarshaller _instance = new CreateDocumentationVersionResponseUnmarshaller(); internal static CreateDocumentationVersionResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateDocumentationVersionResponseUnmarshaller Instance { get { return _instance; } } } }
142
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// CreateDomainName Request Marshaller /// </summary> public class CreateDomainNameRequestMarshaller : IMarshaller<IRequest, CreateDomainNameRequest> , 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((CreateDomainNameRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateDomainNameRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "POST"; request.ResourcePath = "/domainnames"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetCertificateArn()) { context.Writer.WritePropertyName("certificateArn"); context.Writer.Write(publicRequest.CertificateArn); } if(publicRequest.IsSetCertificateBody()) { context.Writer.WritePropertyName("certificateBody"); context.Writer.Write(publicRequest.CertificateBody); } if(publicRequest.IsSetCertificateChain()) { context.Writer.WritePropertyName("certificateChain"); context.Writer.Write(publicRequest.CertificateChain); } if(publicRequest.IsSetCertificateName()) { context.Writer.WritePropertyName("certificateName"); context.Writer.Write(publicRequest.CertificateName); } if(publicRequest.IsSetCertificatePrivateKey()) { context.Writer.WritePropertyName("certificatePrivateKey"); context.Writer.Write(publicRequest.CertificatePrivateKey); } if(publicRequest.IsSetDomainName()) { context.Writer.WritePropertyName("domainName"); context.Writer.Write(publicRequest.DomainName); } if(publicRequest.IsSetEndpointConfiguration()) { context.Writer.WritePropertyName("endpointConfiguration"); context.Writer.WriteObjectStart(); var marshaller = EndpointConfigurationMarshaller.Instance; marshaller.Marshall(publicRequest.EndpointConfiguration, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetMutualTlsAuthentication()) { context.Writer.WritePropertyName("mutualTlsAuthentication"); context.Writer.WriteObjectStart(); var marshaller = MutualTlsAuthenticationInputMarshaller.Instance; marshaller.Marshall(publicRequest.MutualTlsAuthentication, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetOwnershipVerificationCertificateArn()) { context.Writer.WritePropertyName("ownershipVerificationCertificateArn"); context.Writer.Write(publicRequest.OwnershipVerificationCertificateArn); } if(publicRequest.IsSetRegionalCertificateArn()) { context.Writer.WritePropertyName("regionalCertificateArn"); context.Writer.Write(publicRequest.RegionalCertificateArn); } if(publicRequest.IsSetRegionalCertificateName()) { context.Writer.WritePropertyName("regionalCertificateName"); context.Writer.Write(publicRequest.RegionalCertificateName); } if(publicRequest.IsSetSecurityPolicy()) { context.Writer.WritePropertyName("securityPolicy"); context.Writer.Write(publicRequest.SecurityPolicy); } 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 CreateDomainNameRequestMarshaller _instance = new CreateDomainNameRequestMarshaller(); internal static CreateDomainNameRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateDomainNameRequestMarshaller Instance { get { return _instance; } } } }
191
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateDomainName operation /// </summary> public class CreateDomainNameResponseUnmarshaller : 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) { CreateDomainNameResponse response = new CreateDomainNameResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("certificateArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CertificateArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("certificateName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CertificateName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("certificateUploadDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CertificateUploadDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("distributionDomainName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DistributionDomainName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("distributionHostedZoneId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DistributionHostedZoneId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("domainNameStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DomainNameStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("domainNameStatusMessage", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DomainNameStatusMessage = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("endpointConfiguration", targetDepth)) { var unmarshaller = EndpointConfigurationUnmarshaller.Instance; response.EndpointConfiguration = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("mutualTlsAuthentication", targetDepth)) { var unmarshaller = MutualTlsAuthenticationUnmarshaller.Instance; response.MutualTlsAuthentication = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("domainName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ownershipVerificationCertificateArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.OwnershipVerificationCertificateArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("regionalCertificateArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RegionalCertificateArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("regionalCertificateName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RegionalCertificateName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("regionalDomainName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RegionalDomainName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("regionalHostedZoneId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RegionalHostedZoneId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("securityPolicy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SecurityPolicy = unmarshaller.Unmarshall(context); continue; } 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("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateDomainNameResponseUnmarshaller _instance = new CreateDomainNameResponseUnmarshaller(); internal static CreateDomainNameResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateDomainNameResponseUnmarshaller Instance { get { return _instance; } } } }
222
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// CreateModel Request Marshaller /// </summary> public class CreateModelRequestMarshaller : IMarshaller<IRequest, CreateModelRequest> , 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((CreateModelRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateModelRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "POST"; if (!publicRequest.IsSetRestApiId()) throw new AmazonAPIGatewayException("Request object does not have required field RestApiId set"); request.AddPathResource("{restapi_id}", StringUtils.FromString(publicRequest.RestApiId)); request.ResourcePath = "/restapis/{restapi_id}/models"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetContentType()) { context.Writer.WritePropertyName("contentType"); context.Writer.Write(publicRequest.ContentType); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetSchema()) { context.Writer.WritePropertyName("schema"); context.Writer.Write(publicRequest.Schema); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateModelRequestMarshaller _instance = new CreateModelRequestMarshaller(); internal static CreateModelRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateModelRequestMarshaller Instance { get { return _instance; } } } }
122
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateModel operation /// </summary> public class CreateModelResponseUnmarshaller : 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) { CreateModelResponse response = new CreateModelResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("contentType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ContentType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("schema", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Schema = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateModelResponseUnmarshaller _instance = new CreateModelResponseUnmarshaller(); internal static CreateModelResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateModelResponseUnmarshaller Instance { get { return _instance; } } } }
154
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// CreateRequestValidator Request Marshaller /// </summary> public class CreateRequestValidatorRequestMarshaller : IMarshaller<IRequest, CreateRequestValidatorRequest> , 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((CreateRequestValidatorRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateRequestValidatorRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "POST"; if (!publicRequest.IsSetRestApiId()) throw new AmazonAPIGatewayException("Request object does not have required field RestApiId set"); request.AddPathResource("{restapi_id}", StringUtils.FromString(publicRequest.RestApiId)); request.ResourcePath = "/restapis/{restapi_id}/requestvalidators"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetValidateRequestBody()) { context.Writer.WritePropertyName("validateRequestBody"); context.Writer.Write(publicRequest.ValidateRequestBody); } if(publicRequest.IsSetValidateRequestParameters()) { context.Writer.WritePropertyName("validateRequestParameters"); context.Writer.Write(publicRequest.ValidateRequestParameters); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateRequestValidatorRequestMarshaller _instance = new CreateRequestValidatorRequestMarshaller(); internal static CreateRequestValidatorRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateRequestValidatorRequestMarshaller 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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateRequestValidator operation /// </summary> public class CreateRequestValidatorResponseUnmarshaller : 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) { CreateRequestValidatorResponse response = new CreateRequestValidatorResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("validateRequestBody", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.ValidateRequestBody = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("validateRequestParameters", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.ValidateRequestParameters = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateRequestValidatorResponseUnmarshaller _instance = new CreateRequestValidatorResponseUnmarshaller(); internal static CreateRequestValidatorResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateRequestValidatorResponseUnmarshaller Instance { get { return _instance; } } } }
148
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// CreateResource Request Marshaller /// </summary> public class CreateResourceRequestMarshaller : IMarshaller<IRequest, CreateResourceRequest> , 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((CreateResourceRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateResourceRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "POST"; if (!publicRequest.IsSetParentId()) throw new AmazonAPIGatewayException("Request object does not have required field ParentId set"); request.AddPathResource("{parent_id}", StringUtils.FromString(publicRequest.ParentId)); if (!publicRequest.IsSetRestApiId()) throw new AmazonAPIGatewayException("Request object does not have required field RestApiId set"); request.AddPathResource("{restapi_id}", StringUtils.FromString(publicRequest.RestApiId)); request.ResourcePath = "/restapis/{restapi_id}/resources/{parent_id}"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetPathPart()) { context.Writer.WritePropertyName("pathPart"); context.Writer.Write(publicRequest.PathPart); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateResourceRequestMarshaller _instance = new CreateResourceRequestMarshaller(); internal static CreateResourceRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateResourceRequestMarshaller Instance { get { return _instance; } } } }
107
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateResource operation /// </summary> public class CreateResourceResponseUnmarshaller : 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) { CreateResourceResponse response = new CreateResourceResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("parentId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ParentId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("path", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Path = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("pathPart", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.PathPart = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceMethods", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, Method, StringUnmarshaller, MethodUnmarshaller>(StringUnmarshaller.Instance, MethodUnmarshaller.Instance); response.ResourceMethods = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateResourceResponseUnmarshaller _instance = new CreateResourceResponseUnmarshaller(); internal static CreateResourceResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateResourceResponseUnmarshaller Instance { get { return _instance; } } } }
154
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// CreateRestApi Request Marshaller /// </summary> public class CreateRestApiRequestMarshaller : IMarshaller<IRequest, CreateRestApiRequest> , 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((CreateRestApiRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateRestApiRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "POST"; request.ResourcePath = "/restapis"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetApiKeySource()) { context.Writer.WritePropertyName("apiKeySource"); context.Writer.Write(publicRequest.ApiKeySource); } if(publicRequest.IsSetBinaryMediaTypes()) { context.Writer.WritePropertyName("binaryMediaTypes"); context.Writer.WriteArrayStart(); foreach(var publicRequestBinaryMediaTypesListValue in publicRequest.BinaryMediaTypes) { context.Writer.Write(publicRequestBinaryMediaTypesListValue); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetCloneFrom()) { context.Writer.WritePropertyName("cloneFrom"); context.Writer.Write(publicRequest.CloneFrom); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetDisableExecuteApiEndpoint()) { context.Writer.WritePropertyName("disableExecuteApiEndpoint"); context.Writer.Write(publicRequest.DisableExecuteApiEndpoint); } if(publicRequest.IsSetEndpointConfiguration()) { context.Writer.WritePropertyName("endpointConfiguration"); context.Writer.WriteObjectStart(); var marshaller = EndpointConfigurationMarshaller.Instance; marshaller.Marshall(publicRequest.EndpointConfiguration, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetMinimumCompressionSize()) { context.Writer.WritePropertyName("minimumCompressionSize"); context.Writer.Write(publicRequest.MinimumCompressionSize); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetPolicy()) { context.Writer.WritePropertyName("policy"); context.Writer.Write(publicRequest.Policy); } 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(); } if(publicRequest.IsSetVersion()) { context.Writer.WritePropertyName("version"); context.Writer.Write(publicRequest.Version); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateRestApiRequestMarshaller _instance = new CreateRestApiRequestMarshaller(); internal static CreateRestApiRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateRestApiRequestMarshaller Instance { get { return _instance; } } } }
179
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateRestApi operation /// </summary> public class CreateRestApiResponseUnmarshaller : 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) { CreateRestApiResponse response = new CreateRestApiResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("apiKeySource", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ApiKeySource = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("binaryMediaTypes", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); response.BinaryMediaTypes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreatedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("disableExecuteApiEndpoint", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.DisableExecuteApiEndpoint = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("endpointConfiguration", targetDepth)) { var unmarshaller = EndpointConfigurationUnmarshaller.Instance; response.EndpointConfiguration = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("minimumCompressionSize", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.MinimumCompressionSize = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("policy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Policy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tags", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.Tags = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("version", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Version = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("warnings", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); response.Warnings = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateRestApiResponseUnmarshaller _instance = new CreateRestApiResponseUnmarshaller(); internal static CreateRestApiResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateRestApiResponseUnmarshaller Instance { get { return _instance; } } } }
198
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// CreateStage Request Marshaller /// </summary> public class CreateStageRequestMarshaller : IMarshaller<IRequest, CreateStageRequest> , 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((CreateStageRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateStageRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "POST"; if (!publicRequest.IsSetRestApiId()) throw new AmazonAPIGatewayException("Request object does not have required field RestApiId set"); request.AddPathResource("{restapi_id}", StringUtils.FromString(publicRequest.RestApiId)); request.ResourcePath = "/restapis/{restapi_id}/stages"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetCacheClusterEnabled()) { context.Writer.WritePropertyName("cacheClusterEnabled"); context.Writer.Write(publicRequest.CacheClusterEnabled); } if(publicRequest.IsSetCacheClusterSize()) { context.Writer.WritePropertyName("cacheClusterSize"); context.Writer.Write(publicRequest.CacheClusterSize); } if(publicRequest.IsSetCanarySettings()) { context.Writer.WritePropertyName("canarySettings"); context.Writer.WriteObjectStart(); var marshaller = CanarySettingsMarshaller.Instance; marshaller.Marshall(publicRequest.CanarySettings, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetDeploymentId()) { context.Writer.WritePropertyName("deploymentId"); context.Writer.Write(publicRequest.DeploymentId); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetDocumentationVersion()) { context.Writer.WritePropertyName("documentationVersion"); context.Writer.Write(publicRequest.DocumentationVersion); } if(publicRequest.IsSetStageName()) { context.Writer.WritePropertyName("stageName"); context.Writer.Write(publicRequest.StageName); } 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(); } if(publicRequest.IsSetTracingEnabled()) { context.Writer.WritePropertyName("tracingEnabled"); context.Writer.Write(publicRequest.TracingEnabled); } if(publicRequest.IsSetVariables()) { context.Writer.WritePropertyName("variables"); context.Writer.WriteObjectStart(); foreach (var publicRequestVariablesKvp in publicRequest.Variables) { context.Writer.WritePropertyName(publicRequestVariablesKvp.Key); var publicRequestVariablesValue = publicRequestVariablesKvp.Value; context.Writer.Write(publicRequestVariablesValue); } context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateStageRequestMarshaller _instance = new CreateStageRequestMarshaller(); internal static CreateStageRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateStageRequestMarshaller Instance { get { return _instance; } } } }
179
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateStage operation /// </summary> public class CreateStageResponseUnmarshaller : 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) { CreateStageResponse response = new CreateStageResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("accessLogSettings", targetDepth)) { var unmarshaller = AccessLogSettingsUnmarshaller.Instance; response.AccessLogSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("cacheClusterEnabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.CacheClusterEnabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("cacheClusterSize", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CacheClusterSize = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("cacheClusterStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CacheClusterStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("canarySettings", targetDepth)) { var unmarshaller = CanarySettingsUnmarshaller.Instance; response.CanarySettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("clientCertificateId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ClientCertificateId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreatedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("deploymentId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DeploymentId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("documentationVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DocumentationVersion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lastUpdatedDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LastUpdatedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("methodSettings", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, MethodSetting, StringUnmarshaller, MethodSettingUnmarshaller>(StringUnmarshaller.Instance, MethodSettingUnmarshaller.Instance); response.MethodSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("stageName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StageName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tags", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.Tags = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tracingEnabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.TracingEnabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("variables", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.Variables = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("webAclArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.WebAclArn = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateStageResponseUnmarshaller _instance = new CreateStageResponseUnmarshaller(); internal static CreateStageResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateStageResponseUnmarshaller Instance { get { return _instance; } } } }
226
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// CreateUsagePlanKey Request Marshaller /// </summary> public class CreateUsagePlanKeyRequestMarshaller : IMarshaller<IRequest, CreateUsagePlanKeyRequest> , 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((CreateUsagePlanKeyRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateUsagePlanKeyRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "POST"; if (!publicRequest.IsSetUsagePlanId()) throw new AmazonAPIGatewayException("Request object does not have required field UsagePlanId set"); request.AddPathResource("{usageplanId}", StringUtils.FromString(publicRequest.UsagePlanId)); request.ResourcePath = "/usageplans/{usageplanId}/keys"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetKeyId()) { context.Writer.WritePropertyName("keyId"); context.Writer.Write(publicRequest.KeyId); } if(publicRequest.IsSetKeyType()) { context.Writer.WritePropertyName("keyType"); context.Writer.Write(publicRequest.KeyType); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateUsagePlanKeyRequestMarshaller _instance = new CreateUsagePlanKeyRequestMarshaller(); internal static CreateUsagePlanKeyRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateUsagePlanKeyRequestMarshaller 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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateUsagePlanKey operation /// </summary> public class CreateUsagePlanKeyResponseUnmarshaller : 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) { CreateUsagePlanKeyResponse response = new CreateUsagePlanKeyResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Type = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("value", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Value = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateUsagePlanKeyResponseUnmarshaller _instance = new CreateUsagePlanKeyResponseUnmarshaller(); internal static CreateUsagePlanKeyResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateUsagePlanKeyResponseUnmarshaller Instance { get { return _instance; } } } }
148
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// CreateUsagePlan Request Marshaller /// </summary> public class CreateUsagePlanRequestMarshaller : IMarshaller<IRequest, CreateUsagePlanRequest> , 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((CreateUsagePlanRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateUsagePlanRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "POST"; request.ResourcePath = "/usageplans"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetApiStages()) { context.Writer.WritePropertyName("apiStages"); context.Writer.WriteArrayStart(); foreach(var publicRequestApiStagesListValue in publicRequest.ApiStages) { context.Writer.WriteObjectStart(); var marshaller = ApiStageMarshaller.Instance; marshaller.Marshall(publicRequestApiStagesListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetQuota()) { context.Writer.WritePropertyName("quota"); context.Writer.WriteObjectStart(); var marshaller = QuotaSettingsMarshaller.Instance; marshaller.Marshall(publicRequest.Quota, context); context.Writer.WriteObjectEnd(); } 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(); } if(publicRequest.IsSetThrottle()) { context.Writer.WritePropertyName("throttle"); context.Writer.WriteObjectStart(); var marshaller = ThrottleSettingsMarshaller.Instance; marshaller.Marshall(publicRequest.Throttle, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateUsagePlanRequestMarshaller _instance = new CreateUsagePlanRequestMarshaller(); internal static CreateUsagePlanRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateUsagePlanRequestMarshaller Instance { get { return _instance; } } } }
159
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateUsagePlan operation /// </summary> public class CreateUsagePlanResponseUnmarshaller : 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) { CreateUsagePlanResponse response = new CreateUsagePlanResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("apiStages", targetDepth)) { var unmarshaller = new ListUnmarshaller<ApiStage, ApiStageUnmarshaller>(ApiStageUnmarshaller.Instance); response.ApiStages = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("productCode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ProductCode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("quota", targetDepth)) { var unmarshaller = QuotaSettingsUnmarshaller.Instance; response.Quota = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tags", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.Tags = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("throttle", targetDepth)) { var unmarshaller = ThrottleSettingsUnmarshaller.Instance; response.Throttle = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateUsagePlanResponseUnmarshaller _instance = new CreateUsagePlanResponseUnmarshaller(); internal static CreateUsagePlanResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateUsagePlanResponseUnmarshaller Instance { get { return _instance; } } } }
172
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// CreateVpcLink Request Marshaller /// </summary> public class CreateVpcLinkRequestMarshaller : IMarshaller<IRequest, CreateVpcLinkRequest> , 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((CreateVpcLinkRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateVpcLinkRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "POST"; request.ResourcePath = "/vpclinks"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("tags"); context.Writer.WriteObjectStart(); foreach (var publicRequestTagsKvp in publicRequest.Tags) { context.Writer.WritePropertyName(publicRequestTagsKvp.Key); var publicRequestTagsValue = publicRequestTagsKvp.Value; context.Writer.Write(publicRequestTagsValue); } context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetTargetArns()) { context.Writer.WritePropertyName("targetArns"); context.Writer.WriteArrayStart(); foreach(var publicRequestTargetArnsListValue in publicRequest.TargetArns) { context.Writer.Write(publicRequestTargetArnsListValue); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateVpcLinkRequestMarshaller _instance = new CreateVpcLinkRequestMarshaller(); internal static CreateVpcLinkRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateVpcLinkRequestMarshaller 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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateVpcLink operation /// </summary> public class CreateVpcLinkResponseUnmarshaller : 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) { CreateVpcLinkResponse response = new CreateVpcLinkResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("statusMessage", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StatusMessage = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tags", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.Tags = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("targetArns", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); response.TargetArns = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateVpcLinkResponseUnmarshaller _instance = new CreateVpcLinkResponseUnmarshaller(); internal static CreateVpcLinkResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateVpcLinkResponseUnmarshaller Instance { get { return _instance; } } } }
162
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// DeleteApiKey Request Marshaller /// </summary> public class DeleteApiKeyRequestMarshaller : IMarshaller<IRequest, DeleteApiKeyRequest> , 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((DeleteApiKeyRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteApiKeyRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetApiKey()) throw new AmazonAPIGatewayException("Request object does not have required field ApiKey set"); request.AddPathResource("{api_Key}", StringUtils.FromString(publicRequest.ApiKey)); request.ResourcePath = "/apikeys/{api_Key}"; return request; } private static DeleteApiKeyRequestMarshaller _instance = new DeleteApiKeyRequestMarshaller(); internal static DeleteApiKeyRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteApiKeyRequestMarshaller 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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteApiKey operation /// </summary> public class DeleteApiKeyResponseUnmarshaller : 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) { DeleteApiKeyResponse response = new DeleteApiKeyResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteApiKeyResponseUnmarshaller _instance = new DeleteApiKeyResponseUnmarshaller(); internal static DeleteApiKeyResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteApiKeyResponseUnmarshaller 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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// DeleteAuthorizer Request Marshaller /// </summary> public class DeleteAuthorizerRequestMarshaller : IMarshaller<IRequest, DeleteAuthorizerRequest> , 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((DeleteAuthorizerRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteAuthorizerRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetAuthorizerId()) throw new AmazonAPIGatewayException("Request object does not have required field AuthorizerId set"); request.AddPathResource("{authorizer_id}", StringUtils.FromString(publicRequest.AuthorizerId)); if (!publicRequest.IsSetRestApiId()) throw new AmazonAPIGatewayException("Request object does not have required field RestApiId set"); request.AddPathResource("{restapi_id}", StringUtils.FromString(publicRequest.RestApiId)); request.ResourcePath = "/restapis/{restapi_id}/authorizers/{authorizer_id}"; return request; } private static DeleteAuthorizerRequestMarshaller _instance = new DeleteAuthorizerRequestMarshaller(); internal static DeleteAuthorizerRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteAuthorizerRequestMarshaller Instance { get { return _instance; } } } }
90
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteAuthorizer operation /// </summary> public class DeleteAuthorizerResponseUnmarshaller : 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) { DeleteAuthorizerResponse response = new DeleteAuthorizerResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteAuthorizerResponseUnmarshaller _instance = new DeleteAuthorizerResponseUnmarshaller(); internal static DeleteAuthorizerResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteAuthorizerResponseUnmarshaller 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 apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// DeleteBasePathMapping Request Marshaller /// </summary> public class DeleteBasePathMappingRequestMarshaller : IMarshaller<IRequest, DeleteBasePathMappingRequest> , 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((DeleteBasePathMappingRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteBasePathMappingRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.APIGateway"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-07-09"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetBasePath()) throw new AmazonAPIGatewayException("Request object does not have required field BasePath set"); request.AddPathResource("{base_path}", StringUtils.FromString(publicRequest.BasePath)); if (!publicRequest.IsSetDomainName()) throw new AmazonAPIGatewayException("Request object does not have required field DomainName set"); request.AddPathResource("{domain_name}", StringUtils.FromString(publicRequest.DomainName)); request.ResourcePath = "/domainnames/{domain_name}/basepathmappings/{base_path}"; return request; } private static DeleteBasePathMappingRequestMarshaller _instance = new DeleteBasePathMappingRequestMarshaller(); internal static DeleteBasePathMappingRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteBasePathMappingRequestMarshaller Instance { get { return _instance; } } } }
90
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.APIGateway.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.APIGateway.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteBasePathMapping operation /// </summary> public class DeleteBasePathMappingResponseUnmarshaller : 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) { DeleteBasePathMappingResponse response = new DeleteBasePathMappingResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedException")) { return UnauthorizedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAPIGatewayException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteBasePathMappingResponseUnmarshaller _instance = new DeleteBasePathMappingResponseUnmarshaller(); internal static DeleteBasePathMappingResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteBasePathMappingResponseUnmarshaller Instance { get { return _instance; } } } }
115