TagResourcesRequest.cc 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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/gpdb/model/TagResourcesRequest.h>
  17. using AlibabaCloud::Gpdb::Model::TagResourcesRequest;
  18. TagResourcesRequest::TagResourcesRequest() :
  19. RpcServiceRequest("gpdb", "2016-05-03", "TagResources")
  20. {}
  21. TagResourcesRequest::~TagResourcesRequest()
  22. {}
  23. long TagResourcesRequest::getResourceOwnerId()const
  24. {
  25. return resourceOwnerId_;
  26. }
  27. void TagResourcesRequest::setResourceOwnerId(long resourceOwnerId)
  28. {
  29. resourceOwnerId_ = resourceOwnerId;
  30. setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
  31. }
  32. std::vector<std::string> TagResourcesRequest::getResourceId()const
  33. {
  34. return resourceId_;
  35. }
  36. void TagResourcesRequest::setResourceId(const std::vector<std::string>& resourceId)
  37. {
  38. resourceId_ = resourceId;
  39. for(int i = 0; i!= resourceId.size(); i++)
  40. setParameter("ResourceId."+ std::to_string(i), resourceId.at(i));
  41. }
  42. std::string TagResourcesRequest::getResourceOwnerAccount()const
  43. {
  44. return resourceOwnerAccount_;
  45. }
  46. void TagResourcesRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
  47. {
  48. resourceOwnerAccount_ = resourceOwnerAccount;
  49. setParameter("ResourceOwnerAccount", resourceOwnerAccount);
  50. }
  51. std::string TagResourcesRequest::getRegionId()const
  52. {
  53. return regionId_;
  54. }
  55. void TagResourcesRequest::setRegionId(const std::string& regionId)
  56. {
  57. regionId_ = regionId;
  58. setParameter("RegionId", regionId);
  59. }
  60. std::string TagResourcesRequest::getOwnerAccount()const
  61. {
  62. return ownerAccount_;
  63. }
  64. void TagResourcesRequest::setOwnerAccount(const std::string& ownerAccount)
  65. {
  66. ownerAccount_ = ownerAccount;
  67. setParameter("OwnerAccount", ownerAccount);
  68. }
  69. std::vector<TagResourcesRequest::Tag> TagResourcesRequest::getTag()const
  70. {
  71. return tag_;
  72. }
  73. void TagResourcesRequest::setTag(const std::vector<Tag>& tag)
  74. {
  75. tag_ = tag;
  76. int i = 0;
  77. for(int i = 0; i!= tag.size(); i++) {
  78. auto obj = tag.at(i);
  79. std::string str ="Tag."+ std::to_string(i);
  80. setParameter(str + ".Value", obj.value);
  81. setParameter(str + ".Key", obj.key);
  82. }
  83. }
  84. long TagResourcesRequest::getOwnerId()const
  85. {
  86. return ownerId_;
  87. }
  88. void TagResourcesRequest::setOwnerId(long ownerId)
  89. {
  90. ownerId_ = ownerId;
  91. setParameter("OwnerId", std::to_string(ownerId));
  92. }
  93. std::string TagResourcesRequest::getResourceType()const
  94. {
  95. return resourceType_;
  96. }
  97. void TagResourcesRequest::setResourceType(const std::string& resourceType)
  98. {
  99. resourceType_ = resourceType;
  100. setParameter("ResourceType", resourceType);
  101. }
  102. std::string TagResourcesRequest::getAccessKeyId()const
  103. {
  104. return accessKeyId_;
  105. }
  106. void TagResourcesRequest::setAccessKeyId(const std::string& accessKeyId)
  107. {
  108. accessKeyId_ = accessKeyId;
  109. setParameter("AccessKeyId", accessKeyId);
  110. }