CopyImageRequest.cc 4.1 KB

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