DescribeApiResult.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. /*
  2. * Copyright 2009-2017 Alibaba Cloud 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. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef ALIBABACLOUD_CLOUDAPI_MODEL_DESCRIBEAPIRESULT_H_
  17. #define ALIBABACLOUD_CLOUDAPI_MODEL_DESCRIBEAPIRESULT_H_
  18. #include <string>
  19. #include <vector>
  20. #include <utility>
  21. #include <alibabacloud/core/ServiceResult.h>
  22. #include <alibabacloud/cloudapi/CloudAPIExport.h>
  23. namespace AlibabaCloud
  24. {
  25. namespace CloudAPI
  26. {
  27. namespace Model
  28. {
  29. class ALIBABACLOUD_CLOUDAPI_EXPORT DescribeApiResult : public ServiceResult
  30. {
  31. public:
  32. struct RequestConfig
  33. {
  34. std::string requestPath;
  35. std::string requestMode;
  36. std::string bodyModel;
  37. std::string requestProtocol;
  38. std::string requestHttpMethod;
  39. std::string postBodyDescription;
  40. std::string bodyFormat;
  41. };
  42. struct ServiceConfig
  43. {
  44. struct VpcConfig
  45. {
  46. std::string vpcId;
  47. std::string instanceId;
  48. int port;
  49. std::string name;
  50. };
  51. struct FunctionComputeConfig
  52. {
  53. std::string functionName;
  54. std::string serviceName;
  55. std::string regionId;
  56. std::string roleArn;
  57. };
  58. struct MockHeader
  59. {
  60. std::string headerValue;
  61. std::string headerName;
  62. };
  63. std::string serviceAddress;
  64. FunctionComputeConfig functionComputeConfig;
  65. std::string contentTypeValue;
  66. std::string mockResult;
  67. VpcConfig vpcConfig;
  68. std::string serviceVpcEnable;
  69. int mockStatusCode;
  70. std::vector<MockHeader> mockHeaders;
  71. std::string serviceHttpMethod;
  72. std::string servicePath;
  73. std::string aoneAppName;
  74. std::string mock;
  75. int serviceTimeout;
  76. std::string serviceProtocol;
  77. std::string contentTypeCatagory;
  78. };
  79. struct OpenIdConnectConfig
  80. {
  81. std::string openIdApiType;
  82. std::string publicKey;
  83. std::string idTokenParamName;
  84. std::string publicKeyId;
  85. };
  86. struct ErrorCodeSample
  87. {
  88. std::string description;
  89. std::string message;
  90. std::string model;
  91. std::string code;
  92. };
  93. struct ResultDescription
  94. {
  95. std::string type;
  96. std::string description;
  97. std::string pid;
  98. std::string id;
  99. bool hasChild;
  100. std::string key;
  101. std::string name;
  102. bool mandatory;
  103. };
  104. struct SystemParameter
  105. {
  106. std::string demoValue;
  107. std::string description;
  108. std::string parameterName;
  109. std::string serviceParameterName;
  110. std::string location;
  111. };
  112. struct CustomSystemParameter
  113. {
  114. std::string demoValue;
  115. std::string description;
  116. std::string parameterName;
  117. std::string serviceParameterName;
  118. std::string location;
  119. };
  120. struct ConstantParameter
  121. {
  122. std::string description;
  123. std::string constantValue;
  124. std::string serviceParameterName;
  125. std::string location;
  126. };
  127. struct RequestParameter
  128. {
  129. std::string arrayItemsType;
  130. std::string regularExpression;
  131. std::string parameterType;
  132. std::string jsonScheme;
  133. std::string description;
  134. std::string apiParameterName;
  135. std::string enumValue;
  136. long minLength;
  137. long maxValue;
  138. long maxLength;
  139. std::string demoValue;
  140. std::string defaultValue;
  141. std::string required;
  142. int docOrder;
  143. long minValue;
  144. std::string docShow;
  145. std::string location;
  146. };
  147. struct ServiceParameter
  148. {
  149. std::string parameterType;
  150. std::string serviceParameterName;
  151. std::string location;
  152. };
  153. struct ServiceParameterMap
  154. {
  155. std::string requestParameterName;
  156. std::string serviceParameterName;
  157. };
  158. struct DeployedInfo
  159. {
  160. std::string stageName;
  161. std::string effectiveVersion;
  162. std::string deployedStatus;
  163. };
  164. DescribeApiResult();
  165. explicit DescribeApiResult(const std::string &payload);
  166. ~DescribeApiResult();
  167. std::string getGroupName()const;
  168. std::string getCreatedTime()const;
  169. std::string getDescription()const;
  170. std::vector<DeployedInfo> getDeployedInfos()const;
  171. bool getForceNonceCheck()const;
  172. std::string getAllowSignatureMethod()const;
  173. std::vector<ErrorCodeSample> getErrorCodeSamples()const;
  174. std::string getMock()const;
  175. std::vector<RequestParameter> getRequestParameters()const;
  176. std::vector<ServiceParameterMap> getServiceParametersMap()const;
  177. std::string getAppCodeAuthType()const;
  178. std::string getResultBodyModel()const;
  179. std::string getModifiedTime()const;
  180. ServiceConfig getServiceConfig()const;
  181. std::vector<ConstantParameter> getConstantParameters()const;
  182. std::string getWebSocketApiType()const;
  183. std::vector<ResultDescription> getResultDescriptions()const;
  184. OpenIdConnectConfig getOpenIdConnectConfig()const;
  185. std::string getAuthType()const;
  186. RequestConfig getRequestConfig()const;
  187. std::string getResultSample()const;
  188. std::string getMockResult()const;
  189. bool getDisableInternet()const;
  190. std::string getApiName()const;
  191. std::string getResultType()const;
  192. std::string getFailResultSample()const;
  193. std::vector<CustomSystemParameter> getCustomSystemParameters()const;
  194. std::string getGroupId()const;
  195. std::vector<SystemParameter> getSystemParameters()const;
  196. std::string getVisibility()const;
  197. std::vector<ServiceParameter> getServiceParameters()const;
  198. std::string getRegionId()const;
  199. std::string getApiId()const;
  200. protected:
  201. void parse(const std::string &payload);
  202. private:
  203. std::string groupName_;
  204. std::string createdTime_;
  205. std::string description_;
  206. std::vector<DeployedInfo> deployedInfos_;
  207. bool forceNonceCheck_;
  208. std::string allowSignatureMethod_;
  209. std::vector<ErrorCodeSample> errorCodeSamples_;
  210. std::string mock_;
  211. std::vector<RequestParameter> requestParameters_;
  212. std::vector<ServiceParameterMap> serviceParametersMap_;
  213. std::string appCodeAuthType_;
  214. std::string resultBodyModel_;
  215. std::string modifiedTime_;
  216. ServiceConfig serviceConfig_;
  217. std::vector<ConstantParameter> constantParameters_;
  218. std::string webSocketApiType_;
  219. std::vector<ResultDescription> resultDescriptions_;
  220. OpenIdConnectConfig openIdConnectConfig_;
  221. std::string authType_;
  222. RequestConfig requestConfig_;
  223. std::string resultSample_;
  224. std::string mockResult_;
  225. bool disableInternet_;
  226. std::string apiName_;
  227. std::string resultType_;
  228. std::string failResultSample_;
  229. std::vector<CustomSystemParameter> customSystemParameters_;
  230. std::string groupId_;
  231. std::vector<SystemParameter> systemParameters_;
  232. std::string visibility_;
  233. std::vector<ServiceParameter> serviceParameters_;
  234. std::string regionId_;
  235. std::string apiId_;
  236. };
  237. }
  238. }
  239. }
  240. #endif // !ALIBABACLOUD_CLOUDAPI_MODEL_DESCRIBEAPIRESULT_H_