StopNodesRequest.cc 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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/ehpc/model/StopNodesRequest.h>
  17. using AlibabaCloud::EHPC::Model::StopNodesRequest;
  18. StopNodesRequest::StopNodesRequest()
  19. : RpcServiceRequest("ehpc", "2018-04-12", "StopNodes") {
  20. setMethod(HttpRequest::Method::Get);
  21. }
  22. StopNodesRequest::~StopNodesRequest() {}
  23. std::string StopNodesRequest::getRole() const {
  24. return role_;
  25. }
  26. void StopNodesRequest::setRole(const std::string &role) {
  27. role_ = role;
  28. setParameter(std::string("Role"), role);
  29. }
  30. std::vector<StopNodesRequest::Instance> StopNodesRequest::getInstance() const {
  31. return instance_;
  32. }
  33. void StopNodesRequest::setInstance(const std::vector<StopNodesRequest::Instance> &instance) {
  34. instance_ = instance;
  35. for(int dep1 = 0; dep1 != instance.size(); dep1++) {
  36. auto instanceObj = instance.at(dep1);
  37. std::string instanceObjStr = std::string("Instance") + "." + std::to_string(dep1 + 1);
  38. setParameter(instanceObjStr + ".Id", instanceObj.id);
  39. }
  40. }
  41. std::string StopNodesRequest::getClusterId() const {
  42. return clusterId_;
  43. }
  44. void StopNodesRequest::setClusterId(const std::string &clusterId) {
  45. clusterId_ = clusterId;
  46. setParameter(std::string("ClusterId"), clusterId);
  47. }
  48. std::string StopNodesRequest::getAccessKeyId() const {
  49. return accessKeyId_;
  50. }
  51. void StopNodesRequest::setAccessKeyId(const std::string &accessKeyId) {
  52. accessKeyId_ = accessKeyId;
  53. setParameter(std::string("AccessKeyId"), accessKeyId);
  54. }