CreateCenBandwidthPackageRequest.cc 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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/cbn/model/CreateCenBandwidthPackageRequest.h>
  17. using AlibabaCloud::Cbn::Model::CreateCenBandwidthPackageRequest;
  18. CreateCenBandwidthPackageRequest::CreateCenBandwidthPackageRequest()
  19. : RpcServiceRequest("cbn", "2017-09-12", "CreateCenBandwidthPackage") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. CreateCenBandwidthPackageRequest::~CreateCenBandwidthPackageRequest() {}
  23. long CreateCenBandwidthPackageRequest::getResourceOwnerId() const {
  24. return resourceOwnerId_;
  25. }
  26. void CreateCenBandwidthPackageRequest::setResourceOwnerId(long resourceOwnerId) {
  27. resourceOwnerId_ = resourceOwnerId;
  28. setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
  29. }
  30. std::string CreateCenBandwidthPackageRequest::getClientToken() const {
  31. return clientToken_;
  32. }
  33. void CreateCenBandwidthPackageRequest::setClientToken(const std::string &clientToken) {
  34. clientToken_ = clientToken;
  35. setParameter(std::string("ClientToken"), clientToken);
  36. }
  37. std::string CreateCenBandwidthPackageRequest::getDescription() const {
  38. return description_;
  39. }
  40. void CreateCenBandwidthPackageRequest::setDescription(const std::string &description) {
  41. description_ = description;
  42. setParameter(std::string("Description"), description);
  43. }
  44. int CreateCenBandwidthPackageRequest::getAutoRenewDuration() const {
  45. return autoRenewDuration_;
  46. }
  47. void CreateCenBandwidthPackageRequest::setAutoRenewDuration(int autoRenewDuration) {
  48. autoRenewDuration_ = autoRenewDuration;
  49. setParameter(std::string("AutoRenewDuration"), std::to_string(autoRenewDuration));
  50. }
  51. std::string CreateCenBandwidthPackageRequest::getBandwidthPackageChargeType() const {
  52. return bandwidthPackageChargeType_;
  53. }
  54. void CreateCenBandwidthPackageRequest::setBandwidthPackageChargeType(const std::string &bandwidthPackageChargeType) {
  55. bandwidthPackageChargeType_ = bandwidthPackageChargeType;
  56. setParameter(std::string("BandwidthPackageChargeType"), bandwidthPackageChargeType);
  57. }
  58. std::string CreateCenBandwidthPackageRequest::getResourceGroupId() const {
  59. return resourceGroupId_;
  60. }
  61. void CreateCenBandwidthPackageRequest::setResourceGroupId(const std::string &resourceGroupId) {
  62. resourceGroupId_ = resourceGroupId;
  63. setParameter(std::string("ResourceGroupId"), resourceGroupId);
  64. }
  65. std::vector<CreateCenBandwidthPackageRequest::Tag> CreateCenBandwidthPackageRequest::getTag() const {
  66. return tag_;
  67. }
  68. void CreateCenBandwidthPackageRequest::setTag(const std::vector<CreateCenBandwidthPackageRequest::Tag> &tag) {
  69. tag_ = tag;
  70. for(int dep1 = 0; dep1 != tag.size(); dep1++) {
  71. auto tagObj = tag.at(dep1);
  72. std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
  73. setParameter(tagObjStr + ".Value", tagObj.value);
  74. setParameter(tagObjStr + ".Key", tagObj.key);
  75. }
  76. }
  77. std::string CreateCenBandwidthPackageRequest::getGeographicRegionBId() const {
  78. return geographicRegionBId_;
  79. }
  80. void CreateCenBandwidthPackageRequest::setGeographicRegionBId(const std::string &geographicRegionBId) {
  81. geographicRegionBId_ = geographicRegionBId;
  82. setParameter(std::string("GeographicRegionBId"), geographicRegionBId);
  83. }
  84. int CreateCenBandwidthPackageRequest::getPeriod() const {
  85. return period_;
  86. }
  87. void CreateCenBandwidthPackageRequest::setPeriod(int period) {
  88. period_ = period;
  89. setParameter(std::string("Period"), std::to_string(period));
  90. }
  91. std::string CreateCenBandwidthPackageRequest::getGeographicRegionAId() const {
  92. return geographicRegionAId_;
  93. }
  94. void CreateCenBandwidthPackageRequest::setGeographicRegionAId(const std::string &geographicRegionAId) {
  95. geographicRegionAId_ = geographicRegionAId;
  96. setParameter(std::string("GeographicRegionAId"), geographicRegionAId);
  97. }
  98. bool CreateCenBandwidthPackageRequest::getAutoPay() const {
  99. return autoPay_;
  100. }
  101. void CreateCenBandwidthPackageRequest::setAutoPay(bool autoPay) {
  102. autoPay_ = autoPay;
  103. setParameter(std::string("AutoPay"), autoPay ? "true" : "false");
  104. }
  105. std::string CreateCenBandwidthPackageRequest::getResourceOwnerAccount() const {
  106. return resourceOwnerAccount_;
  107. }
  108. void CreateCenBandwidthPackageRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
  109. resourceOwnerAccount_ = resourceOwnerAccount;
  110. setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
  111. }
  112. int CreateCenBandwidthPackageRequest::getBandwidth() const {
  113. return bandwidth_;
  114. }
  115. void CreateCenBandwidthPackageRequest::setBandwidth(int bandwidth) {
  116. bandwidth_ = bandwidth;
  117. setParameter(std::string("Bandwidth"), std::to_string(bandwidth));
  118. }
  119. std::string CreateCenBandwidthPackageRequest::getOwnerAccount() const {
  120. return ownerAccount_;
  121. }
  122. void CreateCenBandwidthPackageRequest::setOwnerAccount(const std::string &ownerAccount) {
  123. ownerAccount_ = ownerAccount;
  124. setParameter(std::string("OwnerAccount"), ownerAccount);
  125. }
  126. long CreateCenBandwidthPackageRequest::getOwnerId() const {
  127. return ownerId_;
  128. }
  129. void CreateCenBandwidthPackageRequest::setOwnerId(long ownerId) {
  130. ownerId_ = ownerId;
  131. setParameter(std::string("OwnerId"), std::to_string(ownerId));
  132. }
  133. std::string CreateCenBandwidthPackageRequest::getServiceType() const {
  134. return serviceType_;
  135. }
  136. void CreateCenBandwidthPackageRequest::setServiceType(const std::string &serviceType) {
  137. serviceType_ = serviceType;
  138. setParameter(std::string("ServiceType"), serviceType);
  139. }
  140. bool CreateCenBandwidthPackageRequest::getAutoRenew() const {
  141. return autoRenew_;
  142. }
  143. void CreateCenBandwidthPackageRequest::setAutoRenew(bool autoRenew) {
  144. autoRenew_ = autoRenew;
  145. setParameter(std::string("AutoRenew"), autoRenew ? "true" : "false");
  146. }
  147. std::string CreateCenBandwidthPackageRequest::getName() const {
  148. return name_;
  149. }
  150. void CreateCenBandwidthPackageRequest::setName(const std::string &name) {
  151. name_ = name;
  152. setParameter(std::string("Name"), name);
  153. }
  154. std::string CreateCenBandwidthPackageRequest::getPricingCycle() const {
  155. return pricingCycle_;
  156. }
  157. void CreateCenBandwidthPackageRequest::setPricingCycle(const std::string &pricingCycle) {
  158. pricingCycle_ = pricingCycle;
  159. setParameter(std::string("PricingCycle"), pricingCycle);
  160. }