ListProjectsRequest.cc 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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/oceanbasepro/model/ListProjectsRequest.h>
  17. using AlibabaCloud::OceanBasePro::Model::ListProjectsRequest;
  18. ListProjectsRequest::ListProjectsRequest()
  19. : RpcServiceRequest("oceanbasepro", "2019-09-01", "ListProjects") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. ListProjectsRequest::~ListProjectsRequest() {}
  23. std::string ListProjectsRequest::getSearchKey() const {
  24. return searchKey_;
  25. }
  26. void ListProjectsRequest::setSearchKey(const std::string &searchKey) {
  27. searchKey_ = searchKey;
  28. setBodyParameter(std::string("SearchKey"), searchKey);
  29. }
  30. std::string ListProjectsRequest::getType() const {
  31. return type_;
  32. }
  33. void ListProjectsRequest::setType(const std::string &type) {
  34. type_ = type;
  35. setBodyParameter(std::string("Type"), type);
  36. }
  37. bool ListProjectsRequest::getVisibleSubProject() const {
  38. return visibleSubProject_;
  39. }
  40. void ListProjectsRequest::setVisibleSubProject(bool visibleSubProject) {
  41. visibleSubProject_ = visibleSubProject;
  42. setBodyParameter(std::string("VisibleSubProject"), visibleSubProject ? "true" : "false");
  43. }
  44. int ListProjectsRequest::getPageNumber() const {
  45. return pageNumber_;
  46. }
  47. void ListProjectsRequest::setPageNumber(int pageNumber) {
  48. pageNumber_ = pageNumber;
  49. setBodyParameter(std::string("PageNumber"), std::to_string(pageNumber));
  50. }
  51. std::vector<ListProjectsRequest::std::string> ListProjectsRequest::getSinkEndpointTypes() const {
  52. return sinkEndpointTypes_;
  53. }
  54. void ListProjectsRequest::setSinkEndpointTypes(const std::vector<ListProjectsRequest::std::string> &sinkEndpointTypes) {
  55. sinkEndpointTypes_ = sinkEndpointTypes;
  56. for(int dep1 = 0; dep1 != sinkEndpointTypes.size(); dep1++) {
  57. setBodyParameter(std::string("SinkEndpointTypes") + "." + std::to_string(dep1 + 1), sinkEndpointTypes[dep1]);
  58. }
  59. }
  60. int ListProjectsRequest::getPageSize() const {
  61. return pageSize_;
  62. }
  63. void ListProjectsRequest::setPageSize(int pageSize) {
  64. pageSize_ = pageSize;
  65. setBodyParameter(std::string("PageSize"), std::to_string(pageSize));
  66. }
  67. std::string ListProjectsRequest::getOrder() const {
  68. return order_;
  69. }
  70. void ListProjectsRequest::setOrder(const std::string &order) {
  71. order_ = order;
  72. setBodyParameter(std::string("Order"), order);
  73. }
  74. std::vector<ListProjectsRequest::std::string> ListProjectsRequest::getSourceEndpointTypes() const {
  75. return sourceEndpointTypes_;
  76. }
  77. void ListProjectsRequest::setSourceEndpointTypes(const std::vector<ListProjectsRequest::std::string> &sourceEndpointTypes) {
  78. sourceEndpointTypes_ = sourceEndpointTypes;
  79. for(int dep1 = 0; dep1 != sourceEndpointTypes.size(); dep1++) {
  80. setBodyParameter(std::string("SourceEndpointTypes") + "." + std::to_string(dep1 + 1), sourceEndpointTypes[dep1]);
  81. }
  82. }
  83. std::string ListProjectsRequest::getSortField() const {
  84. return sortField_;
  85. }
  86. void ListProjectsRequest::setSortField(const std::string &sortField) {
  87. sortField_ = sortField;
  88. setBodyParameter(std::string("SortField"), sortField);
  89. }
  90. bool ListProjectsRequest::getNeedRelatedInfo() const {
  91. return needRelatedInfo_;
  92. }
  93. void ListProjectsRequest::setNeedRelatedInfo(bool needRelatedInfo) {
  94. needRelatedInfo_ = needRelatedInfo;
  95. setBodyParameter(std::string("NeedRelatedInfo"), needRelatedInfo ? "true" : "false");
  96. }
  97. std::vector<ListProjectsRequest::std::string> ListProjectsRequest::getLabelIds() const {
  98. return labelIds_;
  99. }
  100. void ListProjectsRequest::setLabelIds(const std::vector<ListProjectsRequest::std::string> &labelIds) {
  101. labelIds_ = labelIds;
  102. for(int dep1 = 0; dep1 != labelIds.size(); dep1++) {
  103. setBodyParameter(std::string("LabelIds") + "." + std::to_string(dep1 + 1), labelIds[dep1]);
  104. }
  105. }
  106. std::vector<ListProjectsRequest::std::string> ListProjectsRequest::getStatus() const {
  107. return status_;
  108. }
  109. void ListProjectsRequest::setStatus(const std::vector<ListProjectsRequest::std::string> &status) {
  110. status_ = status;
  111. for(int dep1 = 0; dep1 != status.size(); dep1++) {
  112. setBodyParameter(std::string("Status") + "." + std::to_string(dep1 + 1), status[dep1]);
  113. }
  114. }