CreateLifecycleHookRequest.cc 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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/ess/model/CreateLifecycleHookRequest.h>
  17. using AlibabaCloud::Ess::Model::CreateLifecycleHookRequest;
  18. CreateLifecycleHookRequest::CreateLifecycleHookRequest() :
  19. RpcServiceRequest("ess", "2014-08-28", "CreateLifecycleHook")
  20. {}
  21. CreateLifecycleHookRequest::~CreateLifecycleHookRequest()
  22. {}
  23. std::string CreateLifecycleHookRequest::getDefaultResult()const
  24. {
  25. return defaultResult_;
  26. }
  27. void CreateLifecycleHookRequest::setDefaultResult(const std::string& defaultResult)
  28. {
  29. defaultResult_ = defaultResult;
  30. setParameter("DefaultResult", defaultResult);
  31. }
  32. std::string CreateLifecycleHookRequest::getResourceOwnerAccount()const
  33. {
  34. return resourceOwnerAccount_;
  35. }
  36. void CreateLifecycleHookRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
  37. {
  38. resourceOwnerAccount_ = resourceOwnerAccount;
  39. setParameter("ResourceOwnerAccount", resourceOwnerAccount);
  40. }
  41. int CreateLifecycleHookRequest::getHeartbeatTimeout()const
  42. {
  43. return heartbeatTimeout_;
  44. }
  45. void CreateLifecycleHookRequest::setHeartbeatTimeout(int heartbeatTimeout)
  46. {
  47. heartbeatTimeout_ = heartbeatTimeout;
  48. setParameter("HeartbeatTimeout", std::to_string(heartbeatTimeout));
  49. }
  50. std::string CreateLifecycleHookRequest::getScalingGroupId()const
  51. {
  52. return scalingGroupId_;
  53. }
  54. void CreateLifecycleHookRequest::setScalingGroupId(const std::string& scalingGroupId)
  55. {
  56. scalingGroupId_ = scalingGroupId;
  57. setParameter("ScalingGroupId", scalingGroupId);
  58. }
  59. std::string CreateLifecycleHookRequest::getOwnerAccount()const
  60. {
  61. return ownerAccount_;
  62. }
  63. void CreateLifecycleHookRequest::setOwnerAccount(const std::string& ownerAccount)
  64. {
  65. ownerAccount_ = ownerAccount;
  66. setParameter("OwnerAccount", ownerAccount);
  67. }
  68. std::string CreateLifecycleHookRequest::getNotificationMetadata()const
  69. {
  70. return notificationMetadata_;
  71. }
  72. void CreateLifecycleHookRequest::setNotificationMetadata(const std::string& notificationMetadata)
  73. {
  74. notificationMetadata_ = notificationMetadata;
  75. setParameter("NotificationMetadata", notificationMetadata);
  76. }
  77. long CreateLifecycleHookRequest::getOwnerId()const
  78. {
  79. return ownerId_;
  80. }
  81. void CreateLifecycleHookRequest::setOwnerId(long ownerId)
  82. {
  83. ownerId_ = ownerId;
  84. setParameter("OwnerId", std::to_string(ownerId));
  85. }
  86. std::string CreateLifecycleHookRequest::getLifecycleTransition()const
  87. {
  88. return lifecycleTransition_;
  89. }
  90. void CreateLifecycleHookRequest::setLifecycleTransition(const std::string& lifecycleTransition)
  91. {
  92. lifecycleTransition_ = lifecycleTransition;
  93. setParameter("LifecycleTransition", lifecycleTransition);
  94. }
  95. std::string CreateLifecycleHookRequest::getAccessKeyId()const
  96. {
  97. return accessKeyId_;
  98. }
  99. void CreateLifecycleHookRequest::setAccessKeyId(const std::string& accessKeyId)
  100. {
  101. accessKeyId_ = accessKeyId;
  102. setParameter("AccessKeyId", accessKeyId);
  103. }
  104. std::string CreateLifecycleHookRequest::getLifecycleHookName()const
  105. {
  106. return lifecycleHookName_;
  107. }
  108. void CreateLifecycleHookRequest::setLifecycleHookName(const std::string& lifecycleHookName)
  109. {
  110. lifecycleHookName_ = lifecycleHookName;
  111. setParameter("LifecycleHookName", lifecycleHookName);
  112. }
  113. std::string CreateLifecycleHookRequest::getNotificationArn()const
  114. {
  115. return notificationArn_;
  116. }
  117. void CreateLifecycleHookRequest::setNotificationArn(const std::string& notificationArn)
  118. {
  119. notificationArn_ = notificationArn;
  120. setParameter("NotificationArn", notificationArn);
  121. }
  122. std::vector<CreateLifecycleHookRequest::LifecycleHook> CreateLifecycleHookRequest::getLifecycleHook()const
  123. {
  124. return lifecycleHook_;
  125. }
  126. void CreateLifecycleHookRequest::setLifecycleHook(const std::vector<LifecycleHook>& lifecycleHook)
  127. {
  128. lifecycleHook_ = lifecycleHook;
  129. int i = 0;
  130. for(int i = 0; i!= lifecycleHook.size(); i++) {
  131. auto obj = lifecycleHook.at(i);
  132. std::string str ="LifecycleHook."+ std::to_string(i);
  133. setParameter(str + ".DefaultResult", obj.defaultResult);
  134. setParameter(str + ".LifecycleHookName", obj.lifecycleHookName);
  135. setParameter(str + ".HeartbeatTimeout", std::to_string(obj.heartbeatTimeout));
  136. setParameter(str + ".NotificationArn", obj.notificationArn);
  137. setParameter(str + ".NotificationMetadata", obj.notificationMetadata);
  138. setParameter(str + ".LifecycleTransition", obj.lifecycleTransition);
  139. }
  140. }