CreateDemandRequest.cc 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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/CreateDemandRequest.h>
  17. using AlibabaCloud::Ecs::Model::CreateDemandRequest;
  18. CreateDemandRequest::CreateDemandRequest() :
  19. RpcServiceRequest("ecs", "2014-05-26", "CreateDemand")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. CreateDemandRequest::~CreateDemandRequest()
  24. {}
  25. long CreateDemandRequest::getResourceOwnerId()const
  26. {
  27. return resourceOwnerId_;
  28. }
  29. void CreateDemandRequest::setResourceOwnerId(long resourceOwnerId)
  30. {
  31. resourceOwnerId_ = resourceOwnerId;
  32. setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
  33. }
  34. std::string CreateDemandRequest::getClientToken()const
  35. {
  36. return clientToken_;
  37. }
  38. void CreateDemandRequest::setClientToken(const std::string& clientToken)
  39. {
  40. clientToken_ = clientToken;
  41. setCoreParameter("ClientToken", clientToken);
  42. }
  43. std::string CreateDemandRequest::getStartTime()const
  44. {
  45. return startTime_;
  46. }
  47. void CreateDemandRequest::setStartTime(const std::string& startTime)
  48. {
  49. startTime_ = startTime;
  50. setCoreParameter("StartTime", startTime);
  51. }
  52. std::string CreateDemandRequest::getDemandDescription()const
  53. {
  54. return demandDescription_;
  55. }
  56. void CreateDemandRequest::setDemandDescription(const std::string& demandDescription)
  57. {
  58. demandDescription_ = demandDescription;
  59. setCoreParameter("DemandDescription", demandDescription);
  60. }
  61. std::string CreateDemandRequest::getRegionId()const
  62. {
  63. return regionId_;
  64. }
  65. void CreateDemandRequest::setRegionId(const std::string& regionId)
  66. {
  67. regionId_ = regionId;
  68. setCoreParameter("RegionId", regionId);
  69. }
  70. std::string CreateDemandRequest::getInstanceType()const
  71. {
  72. return instanceType_;
  73. }
  74. void CreateDemandRequest::setInstanceType(const std::string& instanceType)
  75. {
  76. instanceType_ = instanceType;
  77. setCoreParameter("InstanceType", instanceType);
  78. }
  79. std::string CreateDemandRequest::getInstanceChargeType()const
  80. {
  81. return instanceChargeType_;
  82. }
  83. void CreateDemandRequest::setInstanceChargeType(const std::string& instanceChargeType)
  84. {
  85. instanceChargeType_ = instanceChargeType;
  86. setCoreParameter("InstanceChargeType", instanceChargeType);
  87. }
  88. std::string CreateDemandRequest::getDemandName()const
  89. {
  90. return demandName_;
  91. }
  92. void CreateDemandRequest::setDemandName(const std::string& demandName)
  93. {
  94. demandName_ = demandName;
  95. setCoreParameter("DemandName", demandName);
  96. }
  97. int CreateDemandRequest::getAmount()const
  98. {
  99. return amount_;
  100. }
  101. void CreateDemandRequest::setAmount(int amount)
  102. {
  103. amount_ = amount;
  104. setCoreParameter("Amount", std::to_string(amount));
  105. }
  106. int CreateDemandRequest::getPeriod()const
  107. {
  108. return period_;
  109. }
  110. void CreateDemandRequest::setPeriod(int period)
  111. {
  112. period_ = period;
  113. setCoreParameter("Period", std::to_string(period));
  114. }
  115. std::string CreateDemandRequest::getResourceOwnerAccount()const
  116. {
  117. return resourceOwnerAccount_;
  118. }
  119. void CreateDemandRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
  120. {
  121. resourceOwnerAccount_ = resourceOwnerAccount;
  122. setCoreParameter("ResourceOwnerAccount", resourceOwnerAccount);
  123. }
  124. std::string CreateDemandRequest::getOwnerAccount()const
  125. {
  126. return ownerAccount_;
  127. }
  128. void CreateDemandRequest::setOwnerAccount(const std::string& ownerAccount)
  129. {
  130. ownerAccount_ = ownerAccount;
  131. setCoreParameter("OwnerAccount", ownerAccount);
  132. }
  133. std::string CreateDemandRequest::getEndTime()const
  134. {
  135. return endTime_;
  136. }
  137. void CreateDemandRequest::setEndTime(const std::string& endTime)
  138. {
  139. endTime_ = endTime;
  140. setCoreParameter("EndTime", endTime);
  141. }
  142. long CreateDemandRequest::getOwnerId()const
  143. {
  144. return ownerId_;
  145. }
  146. void CreateDemandRequest::setOwnerId(long ownerId)
  147. {
  148. ownerId_ = ownerId;
  149. setCoreParameter("OwnerId", std::to_string(ownerId));
  150. }
  151. std::string CreateDemandRequest::getPeriodUnit()const
  152. {
  153. return periodUnit_;
  154. }
  155. void CreateDemandRequest::setPeriodUnit(const std::string& periodUnit)
  156. {
  157. periodUnit_ = periodUnit;
  158. setCoreParameter("PeriodUnit", periodUnit);
  159. }
  160. std::string CreateDemandRequest::getZoneId()const
  161. {
  162. return zoneId_;
  163. }
  164. void CreateDemandRequest::setZoneId(const std::string& zoneId)
  165. {
  166. zoneId_ = zoneId;
  167. setCoreParameter("ZoneId", zoneId);
  168. }