AttachInstancesRequest.cc 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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/cs/model/AttachInstancesRequest.h>
  17. using AlibabaCloud::CS::Model::AttachInstancesRequest;
  18. AttachInstancesRequest::AttachInstancesRequest() :
  19. RoaServiceRequest("cs", "2015-12-15")
  20. {
  21. setResourcePath("/clusters/[ClusterId]/attach");
  22. setMethod(HttpRequest::Method::Post);
  23. }
  24. AttachInstancesRequest::~AttachInstancesRequest()
  25. {}
  26. std::string AttachInstancesRequest::getPassword()const
  27. {
  28. return password_;
  29. }
  30. void AttachInstancesRequest::setPassword(const std::string& password)
  31. {
  32. password_ = password;
  33. setBodyParameter("Password", password);
  34. }
  35. bool AttachInstancesRequest::getKeep_instance_name()const
  36. {
  37. return keep_instance_name_;
  38. }
  39. void AttachInstancesRequest::setKeep_instance_name(bool keep_instance_name)
  40. {
  41. keep_instance_name_ = keep_instance_name;
  42. setBodyParameter("Keep_instance_name", keep_instance_name ? "true" : "false");
  43. }
  44. std::string AttachInstancesRequest::getKey_pair()const
  45. {
  46. return key_pair_;
  47. }
  48. void AttachInstancesRequest::setKey_pair(const std::string& key_pair)
  49. {
  50. key_pair_ = key_pair;
  51. setBodyParameter("Key_pair", key_pair);
  52. }
  53. std::string AttachInstancesRequest::getCpu_policy()const
  54. {
  55. return cpu_policy_;
  56. }
  57. void AttachInstancesRequest::setCpu_policy(const std::string& cpu_policy)
  58. {
  59. cpu_policy_ = cpu_policy;
  60. setBodyParameter("Cpu_policy", cpu_policy);
  61. }
  62. std::string AttachInstancesRequest::getClusterId()const
  63. {
  64. return clusterId_;
  65. }
  66. void AttachInstancesRequest::setClusterId(const std::string& clusterId)
  67. {
  68. clusterId_ = clusterId;
  69. setParameter("ClusterId", clusterId);
  70. }
  71. bool AttachInstancesRequest::getFormat_disk()const
  72. {
  73. return format_disk_;
  74. }
  75. void AttachInstancesRequest::setFormat_disk(bool format_disk)
  76. {
  77. format_disk_ = format_disk;
  78. setBodyParameter("Format_disk", format_disk ? "true" : "false");
  79. }