DescribeApiDocResult.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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_DESCRIBEAPIDOCRESULT_H_
  17. #define ALIBABACLOUD_CLOUDAPI_MODEL_DESCRIBEAPIDOCRESULT_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 DescribeApiDocResult : public ServiceResult
  30. {
  31. public:
  32. struct RequestConfig
  33. {
  34. std::string requestPath;
  35. std::string requestMode;
  36. std::string requestProtocol;
  37. std::string requestHttpMethod;
  38. std::string postBodyDescription;
  39. std::string bodyFormat;
  40. };
  41. struct ErrorCodeSample
  42. {
  43. std::string description;
  44. std::string message;
  45. std::string code;
  46. };
  47. struct ResultDescription
  48. {
  49. std::string type;
  50. std::string description;
  51. std::string pid;
  52. std::string id;
  53. bool hasChild;
  54. std::string key;
  55. std::string name;
  56. bool mandatory;
  57. };
  58. struct RequestParameter
  59. {
  60. std::string regularExpression;
  61. std::string parameterType;
  62. std::string jsonScheme;
  63. std::string description;
  64. std::string apiParameterName;
  65. std::string enumValue;
  66. long minLength;
  67. long maxValue;
  68. long maxLength;
  69. std::string demoValue;
  70. std::string defaultValue;
  71. std::string required;
  72. int docOrder;
  73. long minValue;
  74. std::string docShow;
  75. std::string location;
  76. };
  77. DescribeApiDocResult();
  78. explicit DescribeApiDocResult(const std::string &payload);
  79. ~DescribeApiDocResult();
  80. std::string getGroupName()const;
  81. RequestConfig getRequestConfig()const;
  82. std::string getDescription()const;
  83. std::string getResultSample()const;
  84. bool getDisableInternet()const;
  85. std::string getStageName()const;
  86. std::string getApiName()const;
  87. bool getForceNonceCheck()const;
  88. std::string getResultType()const;
  89. std::string getFailResultSample()const;
  90. std::vector<ErrorCodeSample> getErrorCodeSamples()const;
  91. std::vector<RequestParameter> getRequestParameters()const;
  92. std::string getGroupId()const;
  93. std::string getDeployedTime()const;
  94. std::vector<ResultDescription> getResultDescriptions()const;
  95. std::string getVisibility()const;
  96. std::string getRegionId()const;
  97. std::string getAuthType()const;
  98. std::string getApiId()const;
  99. protected:
  100. void parse(const std::string &payload);
  101. private:
  102. std::string groupName_;
  103. RequestConfig requestConfig_;
  104. std::string description_;
  105. std::string resultSample_;
  106. bool disableInternet_;
  107. std::string stageName_;
  108. std::string apiName_;
  109. bool forceNonceCheck_;
  110. std::string resultType_;
  111. std::string failResultSample_;
  112. std::vector<ErrorCodeSample> errorCodeSamples_;
  113. std::vector<RequestParameter> requestParameters_;
  114. std::string groupId_;
  115. std::string deployedTime_;
  116. std::vector<ResultDescription> resultDescriptions_;
  117. std::string visibility_;
  118. std::string regionId_;
  119. std::string authType_;
  120. std::string apiId_;
  121. };
  122. }
  123. }
  124. }
  125. #endif // !ALIBABACLOUD_CLOUDAPI_MODEL_DESCRIBEAPIDOCRESULT_H_