DescribeActivationsRequest.cc 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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/ecs/model/DescribeActivationsRequest.h>
  17. using AlibabaCloud::Ecs::Model::DescribeActivationsRequest;
  18. DescribeActivationsRequest::DescribeActivationsRequest()
  19. : RpcServiceRequest("ecs", "2014-05-26", "DescribeActivations") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. DescribeActivationsRequest::~DescribeActivationsRequest() {}
  23. long DescribeActivationsRequest::getResourceOwnerId() const {
  24. return resourceOwnerId_;
  25. }
  26. void DescribeActivationsRequest::setResourceOwnerId(long resourceOwnerId) {
  27. resourceOwnerId_ = resourceOwnerId;
  28. setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
  29. }
  30. long DescribeActivationsRequest::getPageNumber() const {
  31. return pageNumber_;
  32. }
  33. void DescribeActivationsRequest::setPageNumber(long pageNumber) {
  34. pageNumber_ = pageNumber;
  35. setParameter(std::string("PageNumber"), std::to_string(pageNumber));
  36. }
  37. std::string DescribeActivationsRequest::getRegionId() const {
  38. return regionId_;
  39. }
  40. void DescribeActivationsRequest::setRegionId(const std::string &regionId) {
  41. regionId_ = regionId;
  42. setParameter(std::string("RegionId"), regionId);
  43. }
  44. long DescribeActivationsRequest::getPageSize() const {
  45. return pageSize_;
  46. }
  47. void DescribeActivationsRequest::setPageSize(long pageSize) {
  48. pageSize_ = pageSize;
  49. setParameter(std::string("PageSize"), std::to_string(pageSize));
  50. }
  51. std::vector<DescribeActivationsRequest::Tag> DescribeActivationsRequest::getTag() const {
  52. return tag_;
  53. }
  54. void DescribeActivationsRequest::setTag(const std::vector<DescribeActivationsRequest::Tag> &tag) {
  55. tag_ = tag;
  56. for(int dep1 = 0; dep1 != tag.size(); dep1++) {
  57. auto tagObj = tag.at(dep1);
  58. std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
  59. setParameter(tagObjStr + ".Key", tagObj.key);
  60. setParameter(tagObjStr + ".Value", tagObj.value);
  61. }
  62. }
  63. std::string DescribeActivationsRequest::getResourceOwnerAccount() const {
  64. return resourceOwnerAccount_;
  65. }
  66. void DescribeActivationsRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
  67. resourceOwnerAccount_ = resourceOwnerAccount;
  68. setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
  69. }
  70. std::string DescribeActivationsRequest::getOwnerAccount() const {
  71. return ownerAccount_;
  72. }
  73. void DescribeActivationsRequest::setOwnerAccount(const std::string &ownerAccount) {
  74. ownerAccount_ = ownerAccount;
  75. setParameter(std::string("OwnerAccount"), ownerAccount);
  76. }
  77. long DescribeActivationsRequest::getOwnerId() const {
  78. return ownerId_;
  79. }
  80. void DescribeActivationsRequest::setOwnerId(long ownerId) {
  81. ownerId_ = ownerId;
  82. setParameter(std::string("OwnerId"), std::to_string(ownerId));
  83. }
  84. std::string DescribeActivationsRequest::getInstanceName() const {
  85. return instanceName_;
  86. }
  87. void DescribeActivationsRequest::setInstanceName(const std::string &instanceName) {
  88. instanceName_ = instanceName;
  89. setParameter(std::string("InstanceName"), instanceName);
  90. }
  91. std::string DescribeActivationsRequest::getActivationId() const {
  92. return activationId_;
  93. }
  94. void DescribeActivationsRequest::setActivationId(const std::string &activationId) {
  95. activationId_ = activationId;
  96. setParameter(std::string("ActivationId"), activationId);
  97. }