PageRenderTime 51ms CodeModel.GetById 26ms RepoModel.GetById 1ms app.codeStats 0ms

/sdk/src/Services/APIGateway/Generated/Model/Method.cs

https://gitlab.com/CORP-RESELLER/aws-sdk-net
C# | 201 lines | 93 code | 20 blank | 88 comment | 10 complexity | 4c9f8cef2298230d586344d34301b93b MD5 | raw file
  1. /*
  2. * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License").
  5. * You may not use this file except in compliance with the License.
  6. * A copy of the License is located at
  7. *
  8. * http://aws.amazon.com/apache2.0
  9. *
  10. * or in the "license" file accompanying this file. This file is distributed
  11. * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  12. * express or implied. See the License for the specific language governing
  13. * permissions and limitations under the License.
  14. */
  15. /*
  16. * Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model.
  17. */
  18. using System;
  19. using System.Collections.Generic;
  20. using System.Xml.Serialization;
  21. using System.Text;
  22. using System.IO;
  23. using Amazon.Runtime;
  24. using Amazon.Runtime.Internal;
  25. namespace Amazon.APIGateway.Model
  26. {
  27. /// <summary>
  28. /// Represents a method.
  29. /// </summary>
  30. public partial class Method
  31. {
  32. private bool? _apiKeyRequired;
  33. private string _authorizationType;
  34. private string _authorizerId;
  35. private string _httpMethod;
  36. private Integration _methodIntegration;
  37. private Dictionary<string, MethodResponse> _methodResponses = new Dictionary<string, MethodResponse>();
  38. private Dictionary<string, string> _requestModels = new Dictionary<string, string>();
  39. private Dictionary<string, bool> _requestParameters = new Dictionary<string, bool>();
  40. /// <summary>
  41. /// Gets and sets the property ApiKeyRequired.
  42. /// <para>
  43. /// Specifies whether the method requires a valid <a>ApiKey</a>.
  44. /// </para>
  45. /// </summary>
  46. public bool ApiKeyRequired
  47. {
  48. get { return this._apiKeyRequired.GetValueOrDefault(); }
  49. set { this._apiKeyRequired = value; }
  50. }
  51. // Check to see if ApiKeyRequired property is set
  52. internal bool IsSetApiKeyRequired()
  53. {
  54. return this._apiKeyRequired.HasValue;
  55. }
  56. /// <summary>
  57. /// Gets and sets the property AuthorizationType.
  58. /// <para>
  59. /// The method's authorization type.
  60. /// </para>
  61. /// </summary>
  62. public string AuthorizationType
  63. {
  64. get { return this._authorizationType; }
  65. set { this._authorizationType = value; }
  66. }
  67. // Check to see if AuthorizationType property is set
  68. internal bool IsSetAuthorizationType()
  69. {
  70. return this._authorizationType != null;
  71. }
  72. /// <summary>
  73. /// Gets and sets the property AuthorizerId.
  74. /// <para>
  75. /// Specifies the identifier of an <a>Authorizer</a> to use on this Method. The authorizationType
  76. /// must be CUSTOM.
  77. /// </para>
  78. /// </summary>
  79. public string AuthorizerId
  80. {
  81. get { return this._authorizerId; }
  82. set { this._authorizerId = value; }
  83. }
  84. // Check to see if AuthorizerId property is set
  85. internal bool IsSetAuthorizerId()
  86. {
  87. return this._authorizerId != null;
  88. }
  89. /// <summary>
  90. /// Gets and sets the property HttpMethod.
  91. /// <para>
  92. /// The HTTP method.
  93. /// </para>
  94. /// </summary>
  95. public string HttpMethod
  96. {
  97. get { return this._httpMethod; }
  98. set { this._httpMethod = value; }
  99. }
  100. // Check to see if HttpMethod property is set
  101. internal bool IsSetHttpMethod()
  102. {
  103. return this._httpMethod != null;
  104. }
  105. /// <summary>
  106. /// Gets and sets the property MethodIntegration.
  107. /// <para>
  108. /// The method's integration.
  109. /// </para>
  110. /// </summary>
  111. public Integration MethodIntegration
  112. {
  113. get { return this._methodIntegration; }
  114. set { this._methodIntegration = value; }
  115. }
  116. // Check to see if MethodIntegration property is set
  117. internal bool IsSetMethodIntegration()
  118. {
  119. return this._methodIntegration != null;
  120. }
  121. /// <summary>
  122. /// Gets and sets the property MethodResponses.
  123. /// <para>
  124. /// Represents available responses that can be sent to the caller. Method responses are
  125. /// represented as a key/value map, with an HTTP status code as the key and a <a>MethodResponse</a>
  126. /// as the value. The status codes are available for the <a>Integration</a> responses
  127. /// to map to.
  128. /// </para>
  129. /// </summary>
  130. public Dictionary<string, MethodResponse> MethodResponses
  131. {
  132. get { return this._methodResponses; }
  133. set { this._methodResponses = value; }
  134. }
  135. // Check to see if MethodResponses property is set
  136. internal bool IsSetMethodResponses()
  137. {
  138. return this._methodResponses != null && this._methodResponses.Count > 0;
  139. }
  140. /// <summary>
  141. /// Gets and sets the property RequestModels.
  142. /// <para>
  143. /// Specifies the <a>Model</a> resources used for the request's content type. Request
  144. /// models are represented as a key/value map, with a content type as the key and a <a>Model</a>
  145. /// name as the value.
  146. /// </para>
  147. /// </summary>
  148. public Dictionary<string, string> RequestModels
  149. {
  150. get { return this._requestModels; }
  151. set { this._requestModels = value; }
  152. }
  153. // Check to see if RequestModels property is set
  154. internal bool IsSetRequestModels()
  155. {
  156. return this._requestModels != null && this._requestModels.Count > 0;
  157. }
  158. /// <summary>
  159. /// Gets and sets the property RequestParameters.
  160. /// <para>
  161. /// Represents request parameters that can be accepted by Amazon API Gateway. Request
  162. /// parameters are represented as a key/value map, with a source as the key and a Boolean
  163. /// flag as the value. The Boolean flag is used to specify whether the parameter is required.
  164. /// A source must match the pattern <code>method.request.{location}.{name}</code>, where
  165. /// <code>location</code> is either querystring, path, or header. <code>name</code> is
  166. /// a valid, unique parameter name. Sources specified here are available to the integration
  167. /// for mapping to integration request parameters or templates.
  168. /// </para>
  169. /// </summary>
  170. public Dictionary<string, bool> RequestParameters
  171. {
  172. get { return this._requestParameters; }
  173. set { this._requestParameters = value; }
  174. }
  175. // Check to see if RequestParameters property is set
  176. internal bool IsSetRequestParameters()
  177. {
  178. return this._requestParameters != null && this._requestParameters.Count > 0;
  179. }
  180. }
  181. }