DescribeApiGroupsRequest.cc 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. #include <alibabacloud/cloudapi/model/DescribeApiGroupsRequest.h>
  17. using AlibabaCloud::CloudAPI::Model::DescribeApiGroupsRequest;
  18. DescribeApiGroupsRequest::DescribeApiGroupsRequest() :
  19. RpcServiceRequest("cloudapi", "2016-07-14", "DescribeApiGroups")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. DescribeApiGroupsRequest::~DescribeApiGroupsRequest()
  24. {}
  25. std::string DescribeApiGroupsRequest::getGroupId()const
  26. {
  27. return groupId_;
  28. }
  29. void DescribeApiGroupsRequest::setGroupId(const std::string& groupId)
  30. {
  31. groupId_ = groupId;
  32. setParameter("GroupId", groupId);
  33. }
  34. bool DescribeApiGroupsRequest::getEnableTagAuth()const
  35. {
  36. return enableTagAuth_;
  37. }
  38. void DescribeApiGroupsRequest::setEnableTagAuth(bool enableTagAuth)
  39. {
  40. enableTagAuth_ = enableTagAuth;
  41. setParameter("EnableTagAuth", enableTagAuth ? "true" : "false");
  42. }
  43. std::string DescribeApiGroupsRequest::getGroupName()const
  44. {
  45. return groupName_;
  46. }
  47. void DescribeApiGroupsRequest::setGroupName(const std::string& groupName)
  48. {
  49. groupName_ = groupName;
  50. setParameter("GroupName", groupName);
  51. }
  52. int DescribeApiGroupsRequest::getPageNumber()const
  53. {
  54. return pageNumber_;
  55. }
  56. void DescribeApiGroupsRequest::setPageNumber(int pageNumber)
  57. {
  58. pageNumber_ = pageNumber;
  59. setParameter("PageNumber", std::to_string(pageNumber));
  60. }
  61. std::string DescribeApiGroupsRequest::getAccessKeyId()const
  62. {
  63. return accessKeyId_;
  64. }
  65. void DescribeApiGroupsRequest::setAccessKeyId(const std::string& accessKeyId)
  66. {
  67. accessKeyId_ = accessKeyId;
  68. setParameter("AccessKeyId", accessKeyId);
  69. }
  70. std::string DescribeApiGroupsRequest::getInstanceId()const
  71. {
  72. return instanceId_;
  73. }
  74. void DescribeApiGroupsRequest::setInstanceId(const std::string& instanceId)
  75. {
  76. instanceId_ = instanceId;
  77. setParameter("InstanceId", instanceId);
  78. }
  79. std::string DescribeApiGroupsRequest::getSecurityToken()const
  80. {
  81. return securityToken_;
  82. }
  83. void DescribeApiGroupsRequest::setSecurityToken(const std::string& securityToken)
  84. {
  85. securityToken_ = securityToken;
  86. setParameter("SecurityToken", securityToken);
  87. }
  88. int DescribeApiGroupsRequest::getPageSize()const
  89. {
  90. return pageSize_;
  91. }
  92. void DescribeApiGroupsRequest::setPageSize(int pageSize)
  93. {
  94. pageSize_ = pageSize;
  95. setParameter("PageSize", std::to_string(pageSize));
  96. }
  97. std::vector<DescribeApiGroupsRequest::Tag> DescribeApiGroupsRequest::getTag()const
  98. {
  99. return tag_;
  100. }
  101. void DescribeApiGroupsRequest::setTag(const std::vector<Tag>& tag)
  102. {
  103. tag_ = tag;
  104. for(int dep1 = 0; dep1!= tag.size(); dep1++) {
  105. auto tagObj = tag.at(dep1);
  106. std::string tagObjStr = "Tag." + std::to_string(dep1 + 1);
  107. setParameter(tagObjStr + ".Value", tagObj.value);
  108. setParameter(tagObjStr + ".Key", tagObj.key);
  109. }
  110. }