/aws-cpp-sdk-apigateway/include/aws/apigateway/model/ApiKey.h

https://gitlab.com/vectorci/aws-sdk-cpp · C Header · 296 lines · 86 code · 46 blank · 164 comment · 0 complexity · d317e10744672c984ee92fe87660c257 MD5 · raw file

  1. /*
  2. * Copyright 2010-2016 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. #pragma once
  16. #include <aws/apigateway/APIGateway_EXPORTS.h>
  17. #include <aws/core/utils/memory/stl/AWSString.h>
  18. #include <aws/core/utils/memory/stl/AWSVector.h>
  19. #include <aws/core/utils/DateTime.h>
  20. namespace Aws
  21. {
  22. namespace Utils
  23. {
  24. namespace Json
  25. {
  26. class JsonValue;
  27. } // namespace Json
  28. } // namespace Utils
  29. namespace APIGateway
  30. {
  31. namespace Model
  32. {
  33. /**
  34. * <p>A resource that can be distributed to callers for executing <a>Method</a>
  35. * resources that require an API key. API keys can be mapped to any <a>Stage</a> on
  36. * any <a>RestApi</a>, which indicates that the callers with the API key can make
  37. * requests to that stage.</p>
  38. */
  39. class AWS_APIGATEWAY_API ApiKey
  40. {
  41. public:
  42. ApiKey();
  43. ApiKey(const Aws::Utils::Json::JsonValue& jsonValue);
  44. ApiKey& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
  45. Aws::Utils::Json::JsonValue Jsonize() const;
  46. /**
  47. * <p>The identifier of the API Key.</p>
  48. */
  49. inline const Aws::String& GetId() const{ return m_id; }
  50. /**
  51. * <p>The identifier of the API Key.</p>
  52. */
  53. inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }
  54. /**
  55. * <p>The identifier of the API Key.</p>
  56. */
  57. inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = value; }
  58. /**
  59. * <p>The identifier of the API Key.</p>
  60. */
  61. inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }
  62. /**
  63. * <p>The identifier of the API Key.</p>
  64. */
  65. inline ApiKey& WithId(const Aws::String& value) { SetId(value); return *this;}
  66. /**
  67. * <p>The identifier of the API Key.</p>
  68. */
  69. inline ApiKey& WithId(Aws::String&& value) { SetId(value); return *this;}
  70. /**
  71. * <p>The identifier of the API Key.</p>
  72. */
  73. inline ApiKey& WithId(const char* value) { SetId(value); return *this;}
  74. /**
  75. * <p>The name of the API Key.</p>
  76. */
  77. inline const Aws::String& GetName() const{ return m_name; }
  78. /**
  79. * <p>The name of the API Key.</p>
  80. */
  81. inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
  82. /**
  83. * <p>The name of the API Key.</p>
  84. */
  85. inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = value; }
  86. /**
  87. * <p>The name of the API Key.</p>
  88. */
  89. inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
  90. /**
  91. * <p>The name of the API Key.</p>
  92. */
  93. inline ApiKey& WithName(const Aws::String& value) { SetName(value); return *this;}
  94. /**
  95. * <p>The name of the API Key.</p>
  96. */
  97. inline ApiKey& WithName(Aws::String&& value) { SetName(value); return *this;}
  98. /**
  99. * <p>The name of the API Key.</p>
  100. */
  101. inline ApiKey& WithName(const char* value) { SetName(value); return *this;}
  102. /**
  103. * <p>The description of the API Key.</p>
  104. */
  105. inline const Aws::String& GetDescription() const{ return m_description; }
  106. /**
  107. * <p>The description of the API Key.</p>
  108. */
  109. inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
  110. /**
  111. * <p>The description of the API Key.</p>
  112. */
  113. inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = value; }
  114. /**
  115. * <p>The description of the API Key.</p>
  116. */
  117. inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
  118. /**
  119. * <p>The description of the API Key.</p>
  120. */
  121. inline ApiKey& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
  122. /**
  123. * <p>The description of the API Key.</p>
  124. */
  125. inline ApiKey& WithDescription(Aws::String&& value) { SetDescription(value); return *this;}
  126. /**
  127. * <p>The description of the API Key.</p>
  128. */
  129. inline ApiKey& WithDescription(const char* value) { SetDescription(value); return *this;}
  130. /**
  131. * <p>Specifies whether the API Key can be used by callers.</p>
  132. */
  133. inline bool GetEnabled() const{ return m_enabled; }
  134. /**
  135. * <p>Specifies whether the API Key can be used by callers.</p>
  136. */
  137. inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; }
  138. /**
  139. * <p>Specifies whether the API Key can be used by callers.</p>
  140. */
  141. inline ApiKey& WithEnabled(bool value) { SetEnabled(value); return *this;}
  142. /**
  143. * <p>A list of <a>Stage</a> resources that are associated with the <a>ApiKey</a>
  144. * resource.</p>
  145. */
  146. inline const Aws::Vector<Aws::String>& GetStageKeys() const{ return m_stageKeys; }
  147. /**
  148. * <p>A list of <a>Stage</a> resources that are associated with the <a>ApiKey</a>
  149. * resource.</p>
  150. */
  151. inline void SetStageKeys(const Aws::Vector<Aws::String>& value) { m_stageKeysHasBeenSet = true; m_stageKeys = value; }
  152. /**
  153. * <p>A list of <a>Stage</a> resources that are associated with the <a>ApiKey</a>
  154. * resource.</p>
  155. */
  156. inline void SetStageKeys(Aws::Vector<Aws::String>&& value) { m_stageKeysHasBeenSet = true; m_stageKeys = value; }
  157. /**
  158. * <p>A list of <a>Stage</a> resources that are associated with the <a>ApiKey</a>
  159. * resource.</p>
  160. */
  161. inline ApiKey& WithStageKeys(const Aws::Vector<Aws::String>& value) { SetStageKeys(value); return *this;}
  162. /**
  163. * <p>A list of <a>Stage</a> resources that are associated with the <a>ApiKey</a>
  164. * resource.</p>
  165. */
  166. inline ApiKey& WithStageKeys(Aws::Vector<Aws::String>&& value) { SetStageKeys(value); return *this;}
  167. /**
  168. * <p>A list of <a>Stage</a> resources that are associated with the <a>ApiKey</a>
  169. * resource.</p>
  170. */
  171. inline ApiKey& AddStageKeys(const Aws::String& value) { m_stageKeysHasBeenSet = true; m_stageKeys.push_back(value); return *this; }
  172. /**
  173. * <p>A list of <a>Stage</a> resources that are associated with the <a>ApiKey</a>
  174. * resource.</p>
  175. */
  176. inline ApiKey& AddStageKeys(Aws::String&& value) { m_stageKeysHasBeenSet = true; m_stageKeys.push_back(value); return *this; }
  177. /**
  178. * <p>A list of <a>Stage</a> resources that are associated with the <a>ApiKey</a>
  179. * resource.</p>
  180. */
  181. inline ApiKey& AddStageKeys(const char* value) { m_stageKeysHasBeenSet = true; m_stageKeys.push_back(value); return *this; }
  182. /**
  183. * <p>The date when the API Key was created, in <a
  184. * href="http://www.iso.org/iso/home/standards/iso8601.htm" target="_blank">ISO
  185. * 8601 format</a>.</p>
  186. */
  187. inline const Aws::Utils::DateTime& GetCreatedDate() const{ return m_createdDate; }
  188. /**
  189. * <p>The date when the API Key was created, in <a
  190. * href="http://www.iso.org/iso/home/standards/iso8601.htm" target="_blank">ISO
  191. * 8601 format</a>.</p>
  192. */
  193. inline void SetCreatedDate(const Aws::Utils::DateTime& value) { m_createdDateHasBeenSet = true; m_createdDate = value; }
  194. /**
  195. * <p>The date when the API Key was created, in <a
  196. * href="http://www.iso.org/iso/home/standards/iso8601.htm" target="_blank">ISO
  197. * 8601 format</a>.</p>
  198. */
  199. inline void SetCreatedDate(Aws::Utils::DateTime&& value) { m_createdDateHasBeenSet = true; m_createdDate = value; }
  200. /**
  201. * <p>The date when the API Key was created, in <a
  202. * href="http://www.iso.org/iso/home/standards/iso8601.htm" target="_blank">ISO
  203. * 8601 format</a>.</p>
  204. */
  205. inline ApiKey& WithCreatedDate(const Aws::Utils::DateTime& value) { SetCreatedDate(value); return *this;}
  206. /**
  207. * <p>The date when the API Key was created, in <a
  208. * href="http://www.iso.org/iso/home/standards/iso8601.htm" target="_blank">ISO
  209. * 8601 format</a>.</p>
  210. */
  211. inline ApiKey& WithCreatedDate(Aws::Utils::DateTime&& value) { SetCreatedDate(value); return *this;}
  212. /**
  213. * <p>When the API Key was last updated, in ISO 8601 format.</p>
  214. */
  215. inline const Aws::Utils::DateTime& GetLastUpdatedDate() const{ return m_lastUpdatedDate; }
  216. /**
  217. * <p>When the API Key was last updated, in ISO 8601 format.</p>
  218. */
  219. inline void SetLastUpdatedDate(const Aws::Utils::DateTime& value) { m_lastUpdatedDateHasBeenSet = true; m_lastUpdatedDate = value; }
  220. /**
  221. * <p>When the API Key was last updated, in ISO 8601 format.</p>
  222. */
  223. inline void SetLastUpdatedDate(Aws::Utils::DateTime&& value) { m_lastUpdatedDateHasBeenSet = true; m_lastUpdatedDate = value; }
  224. /**
  225. * <p>When the API Key was last updated, in ISO 8601 format.</p>
  226. */
  227. inline ApiKey& WithLastUpdatedDate(const Aws::Utils::DateTime& value) { SetLastUpdatedDate(value); return *this;}
  228. /**
  229. * <p>When the API Key was last updated, in ISO 8601 format.</p>
  230. */
  231. inline ApiKey& WithLastUpdatedDate(Aws::Utils::DateTime&& value) { SetLastUpdatedDate(value); return *this;}
  232. private:
  233. Aws::String m_id;
  234. bool m_idHasBeenSet;
  235. Aws::String m_name;
  236. bool m_nameHasBeenSet;
  237. Aws::String m_description;
  238. bool m_descriptionHasBeenSet;
  239. bool m_enabled;
  240. bool m_enabledHasBeenSet;
  241. Aws::Vector<Aws::String> m_stageKeys;
  242. bool m_stageKeysHasBeenSet;
  243. Aws::Utils::DateTime m_createdDate;
  244. bool m_createdDateHasBeenSet;
  245. Aws::Utils::DateTime m_lastUpdatedDate;
  246. bool m_lastUpdatedDateHasBeenSet;
  247. };
  248. } // namespace Model
  249. } // namespace APIGateway
  250. } // namespace Aws