CopyImageRequest.cc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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/CopyImageRequest.h>
  17. using AlibabaCloud::Ecs::Model::CopyImageRequest;
  18. CopyImageRequest::CopyImageRequest() :
  19. RpcServiceRequest("ecs", "2014-05-26", "CopyImage")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. CopyImageRequest::~CopyImageRequest()
  24. {}
  25. long CopyImageRequest::getResourceOwnerId()const
  26. {
  27. return resourceOwnerId_;
  28. }
  29. void CopyImageRequest::setResourceOwnerId(long resourceOwnerId)
  30. {
  31. resourceOwnerId_ = resourceOwnerId;
  32. setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
  33. }
  34. std::string CopyImageRequest::getImageId()const
  35. {
  36. return imageId_;
  37. }
  38. void CopyImageRequest::setImageId(const std::string& imageId)
  39. {
  40. imageId_ = imageId;
  41. setCoreParameter("ImageId", imageId);
  42. }
  43. std::string CopyImageRequest::getDestinationRegionId()const
  44. {
  45. return destinationRegionId_;
  46. }
  47. void CopyImageRequest::setDestinationRegionId(const std::string& destinationRegionId)
  48. {
  49. destinationRegionId_ = destinationRegionId;
  50. setCoreParameter("DestinationRegionId", destinationRegionId);
  51. }
  52. std::string CopyImageRequest::getRegionId()const
  53. {
  54. return regionId_;
  55. }
  56. void CopyImageRequest::setRegionId(const std::string& regionId)
  57. {
  58. regionId_ = regionId;
  59. setCoreParameter("RegionId", regionId);
  60. }
  61. std::vector<CopyImageRequest::Tag> CopyImageRequest::getTag()const
  62. {
  63. return tag_;
  64. }
  65. void CopyImageRequest::setTag(const std::vector<Tag>& tag)
  66. {
  67. tag_ = tag;
  68. for(int dep1 = 0; dep1!= tag.size(); dep1++) {
  69. auto tagObj = tag.at(dep1);
  70. std::string tagObjStr = "Tag." + std::to_string(dep1);
  71. setCoreParameter(tagObjStr + ".Value", tagObj.value);
  72. setCoreParameter(tagObjStr + ".Key", tagObj.key);
  73. }
  74. }
  75. std::string CopyImageRequest::getResourceOwnerAccount()const
  76. {
  77. return resourceOwnerAccount_;
  78. }
  79. void CopyImageRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
  80. {
  81. resourceOwnerAccount_ = resourceOwnerAccount;
  82. setCoreParameter("ResourceOwnerAccount", resourceOwnerAccount);
  83. }
  84. std::string CopyImageRequest::getDestinationImageName()const
  85. {
  86. return destinationImageName_;
  87. }
  88. void CopyImageRequest::setDestinationImageName(const std::string& destinationImageName)
  89. {
  90. destinationImageName_ = destinationImageName;
  91. setCoreParameter("DestinationImageName", destinationImageName);
  92. }
  93. std::string CopyImageRequest::getOwnerAccount()const
  94. {
  95. return ownerAccount_;
  96. }
  97. void CopyImageRequest::setOwnerAccount(const std::string& ownerAccount)
  98. {
  99. ownerAccount_ = ownerAccount;
  100. setCoreParameter("OwnerAccount", ownerAccount);
  101. }
  102. long CopyImageRequest::getOwnerId()const
  103. {
  104. return ownerId_;
  105. }
  106. void CopyImageRequest::setOwnerId(long ownerId)
  107. {
  108. ownerId_ = ownerId;
  109. setCoreParameter("OwnerId", std::to_string(ownerId));
  110. }
  111. bool CopyImageRequest::getEncrypted()const
  112. {
  113. return encrypted_;
  114. }
  115. void CopyImageRequest::setEncrypted(bool encrypted)
  116. {
  117. encrypted_ = encrypted;
  118. setCoreParameter("Encrypted", encrypted ? "true" : "false");
  119. }
  120. std::string CopyImageRequest::getKMSKeyId()const
  121. {
  122. return kMSKeyId_;
  123. }
  124. void CopyImageRequest::setKMSKeyId(const std::string& kMSKeyId)
  125. {
  126. kMSKeyId_ = kMSKeyId;
  127. setCoreParameter("KMSKeyId", kMSKeyId);
  128. }
  129. std::string CopyImageRequest::getDestinationDescription()const
  130. {
  131. return destinationDescription_;
  132. }
  133. void CopyImageRequest::setDestinationDescription(const std::string& destinationDescription)
  134. {
  135. destinationDescription_ = destinationDescription;
  136. setCoreParameter("DestinationDescription", destinationDescription);
  137. }