ListServerGroupsRequest.cc 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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/gwlb/model/ListServerGroupsRequest.h>
  17. using AlibabaCloud::Gwlb::Model::ListServerGroupsRequest;
  18. ListServerGroupsRequest::ListServerGroupsRequest()
  19. : RpcServiceRequest("gwlb", "2024-04-15", "ListServerGroups") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. ListServerGroupsRequest::~ListServerGroupsRequest() {}
  23. std::vector<ListServerGroupsRequest::std::string> ListServerGroupsRequest::getServerGroupNames() const {
  24. return serverGroupNames_;
  25. }
  26. void ListServerGroupsRequest::setServerGroupNames(const std::vector<ListServerGroupsRequest::std::string> &serverGroupNames) {
  27. serverGroupNames_ = serverGroupNames;
  28. for(int dep1 = 0; dep1 != serverGroupNames.size(); dep1++) {
  29. setBodyParameter(std::string("ServerGroupNames") + "." + std::to_string(dep1 + 1), serverGroupNames[dep1]);
  30. }
  31. }
  32. int ListServerGroupsRequest::getSkip() const {
  33. return skip_;
  34. }
  35. void ListServerGroupsRequest::setSkip(int skip) {
  36. skip_ = skip;
  37. setBodyParameter(std::string("Skip"), std::to_string(skip));
  38. }
  39. std::string ListServerGroupsRequest::getResourceGroupId() const {
  40. return resourceGroupId_;
  41. }
  42. void ListServerGroupsRequest::setResourceGroupId(const std::string &resourceGroupId) {
  43. resourceGroupId_ = resourceGroupId;
  44. setBodyParameter(std::string("ResourceGroupId"), resourceGroupId);
  45. }
  46. std::string ListServerGroupsRequest::getNextToken() const {
  47. return nextToken_;
  48. }
  49. void ListServerGroupsRequest::setNextToken(const std::string &nextToken) {
  50. nextToken_ = nextToken;
  51. setBodyParameter(std::string("NextToken"), nextToken);
  52. }
  53. std::vector<ListServerGroupsRequest::Tag> ListServerGroupsRequest::getTag() const {
  54. return tag_;
  55. }
  56. void ListServerGroupsRequest::setTag(const std::vector<ListServerGroupsRequest::Tag> &tag) {
  57. tag_ = tag;
  58. for(int dep1 = 0; dep1 != tag.size(); dep1++) {
  59. setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
  60. setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
  61. }
  62. }
  63. std::vector<ListServerGroupsRequest::std::string> ListServerGroupsRequest::getServerGroupIds() const {
  64. return serverGroupIds_;
  65. }
  66. void ListServerGroupsRequest::setServerGroupIds(const std::vector<ListServerGroupsRequest::std::string> &serverGroupIds) {
  67. serverGroupIds_ = serverGroupIds;
  68. for(int dep1 = 0; dep1 != serverGroupIds.size(); dep1++) {
  69. setBodyParameter(std::string("ServerGroupIds") + "." + std::to_string(dep1 + 1), serverGroupIds[dep1]);
  70. }
  71. }
  72. std::string ListServerGroupsRequest::getServerGroupType() const {
  73. return serverGroupType_;
  74. }
  75. void ListServerGroupsRequest::setServerGroupType(const std::string &serverGroupType) {
  76. serverGroupType_ = serverGroupType;
  77. setBodyParameter(std::string("ServerGroupType"), serverGroupType);
  78. }
  79. std::string ListServerGroupsRequest::getVpcId() const {
  80. return vpcId_;
  81. }
  82. void ListServerGroupsRequest::setVpcId(const std::string &vpcId) {
  83. vpcId_ = vpcId;
  84. setBodyParameter(std::string("VpcId"), vpcId);
  85. }
  86. int ListServerGroupsRequest::getMaxResults() const {
  87. return maxResults_;
  88. }
  89. void ListServerGroupsRequest::setMaxResults(int maxResults) {
  90. maxResults_ = maxResults;
  91. setBodyParameter(std::string("MaxResults"), std::to_string(maxResults));
  92. }