ListSnapshotsRequest.cc 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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/ListSnapshotsRequest.h>
  17. using AlibabaCloud::SWAS_OPEN::Model::ListSnapshotsRequest;
  18. ListSnapshotsRequest::ListSnapshotsRequest()
  19. : RpcServiceRequest("swas-open", "2020-06-01", "ListSnapshots") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. ListSnapshotsRequest::~ListSnapshotsRequest() {}
  23. std::string ListSnapshotsRequest::getSnapshotIds() const {
  24. return snapshotIds_;
  25. }
  26. void ListSnapshotsRequest::setSnapshotIds(const std::string &snapshotIds) {
  27. snapshotIds_ = snapshotIds;
  28. setParameter(std::string("SnapshotIds"), snapshotIds);
  29. }
  30. int ListSnapshotsRequest::getPageNumber() const {
  31. return pageNumber_;
  32. }
  33. void ListSnapshotsRequest::setPageNumber(int pageNumber) {
  34. pageNumber_ = pageNumber;
  35. setParameter(std::string("PageNumber"), std::to_string(pageNumber));
  36. }
  37. std::string ListSnapshotsRequest::getResourceGroupId() const {
  38. return resourceGroupId_;
  39. }
  40. void ListSnapshotsRequest::setResourceGroupId(const std::string &resourceGroupId) {
  41. resourceGroupId_ = resourceGroupId;
  42. setParameter(std::string("ResourceGroupId"), resourceGroupId);
  43. }
  44. std::string ListSnapshotsRequest::getRegionId() const {
  45. return regionId_;
  46. }
  47. void ListSnapshotsRequest::setRegionId(const std::string &regionId) {
  48. regionId_ = regionId;
  49. setParameter(std::string("RegionId"), regionId);
  50. }
  51. int ListSnapshotsRequest::getPageSize() const {
  52. return pageSize_;
  53. }
  54. void ListSnapshotsRequest::setPageSize(int pageSize) {
  55. pageSize_ = pageSize;
  56. setParameter(std::string("PageSize"), std::to_string(pageSize));
  57. }
  58. std::string ListSnapshotsRequest::getDiskId() const {
  59. return diskId_;
  60. }
  61. void ListSnapshotsRequest::setDiskId(const std::string &diskId) {
  62. diskId_ = diskId;
  63. setParameter(std::string("DiskId"), diskId);
  64. }
  65. std::vector<ListSnapshotsRequest::Tag> ListSnapshotsRequest::getTag() const {
  66. return tag_;
  67. }
  68. void ListSnapshotsRequest::setTag(const std::vector<ListSnapshotsRequest::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. }
  77. std::string ListSnapshotsRequest::getSourceDiskType() const {
  78. return sourceDiskType_;
  79. }
  80. void ListSnapshotsRequest::setSourceDiskType(const std::string &sourceDiskType) {
  81. sourceDiskType_ = sourceDiskType;
  82. setParameter(std::string("SourceDiskType"), sourceDiskType);
  83. }
  84. std::string ListSnapshotsRequest::getInstanceId() const {
  85. return instanceId_;
  86. }
  87. void ListSnapshotsRequest::setInstanceId(const std::string &instanceId) {
  88. instanceId_ = instanceId;
  89. setParameter(std::string("InstanceId"), instanceId);
  90. }