ListDisksRequest.cc 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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/swas-open/model/ListDisksRequest.h>
  17. using AlibabaCloud::SWAS_OPEN::Model::ListDisksRequest;
  18. ListDisksRequest::ListDisksRequest()
  19. : RpcServiceRequest("swas-open", "2020-06-01", "ListDisks") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. ListDisksRequest::~ListDisksRequest() {}
  23. std::string ListDisksRequest::getDiskType() const {
  24. return diskType_;
  25. }
  26. void ListDisksRequest::setDiskType(const std::string &diskType) {
  27. diskType_ = diskType;
  28. setParameter(std::string("DiskType"), diskType);
  29. }
  30. int ListDisksRequest::getPageNumber() const {
  31. return pageNumber_;
  32. }
  33. void ListDisksRequest::setPageNumber(int pageNumber) {
  34. pageNumber_ = pageNumber;
  35. setParameter(std::string("PageNumber"), std::to_string(pageNumber));
  36. }
  37. std::string ListDisksRequest::getInstanceId() const {
  38. return instanceId_;
  39. }
  40. void ListDisksRequest::setInstanceId(const std::string &instanceId) {
  41. instanceId_ = instanceId;
  42. setParameter(std::string("InstanceId"), instanceId);
  43. }
  44. std::string ListDisksRequest::getRegionId() const {
  45. return regionId_;
  46. }
  47. void ListDisksRequest::setRegionId(const std::string &regionId) {
  48. regionId_ = regionId;
  49. setParameter(std::string("RegionId"), regionId);
  50. }
  51. int ListDisksRequest::getPageSize() const {
  52. return pageSize_;
  53. }
  54. void ListDisksRequest::setPageSize(int pageSize) {
  55. pageSize_ = pageSize;
  56. setParameter(std::string("PageSize"), std::to_string(pageSize));
  57. }
  58. std::string ListDisksRequest::getDiskIds() const {
  59. return diskIds_;
  60. }
  61. void ListDisksRequest::setDiskIds(const std::string &diskIds) {
  62. diskIds_ = diskIds;
  63. setParameter(std::string("DiskIds"), diskIds);
  64. }
  65. std::vector<ListDisksRequest::Tag> ListDisksRequest::getTag() const {
  66. return tag_;
  67. }
  68. void ListDisksRequest::setTag(const std::vector<ListDisksRequest::Tag> &tag) {
  69. tag_ = tag;
  70. for(int dep1 = 0; dep1 != tag.size(); dep1++) {
  71. auto tagObj = tag.at(dep1);
  72. std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
  73. setParameter(tagObjStr + ".Key", tagObj.key);
  74. setParameter(tagObjStr + ".Value", tagObj.value);
  75. }
  76. }