UpgradeEngineVersionRequest.cc 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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/elasticsearch/model/UpgradeEngineVersionRequest.h>
  17. using AlibabaCloud::Elasticsearch::Model::UpgradeEngineVersionRequest;
  18. UpgradeEngineVersionRequest::UpgradeEngineVersionRequest() :
  19. RoaServiceRequest("elasticsearch", "2017-06-13")
  20. {
  21. setResourcePath("/openapi/instances/[InstanceId]/actions/upgrade-version");
  22. setMethod(HttpRequest::Method::Post);
  23. }
  24. UpgradeEngineVersionRequest::~UpgradeEngineVersionRequest()
  25. {}
  26. std::string UpgradeEngineVersionRequest::getInstanceId()const
  27. {
  28. return instanceId_;
  29. }
  30. void UpgradeEngineVersionRequest::setInstanceId(const std::string& instanceId)
  31. {
  32. instanceId_ = instanceId;
  33. setParameter("InstanceId", instanceId);
  34. }
  35. bool UpgradeEngineVersionRequest::getDryRun()const
  36. {
  37. return dryRun_;
  38. }
  39. void UpgradeEngineVersionRequest::setDryRun(bool dryRun)
  40. {
  41. dryRun_ = dryRun;
  42. setParameter("DryRun", dryRun ? "true" : "false");
  43. }
  44. std::string UpgradeEngineVersionRequest::getClientToken()const
  45. {
  46. return clientToken_;
  47. }
  48. void UpgradeEngineVersionRequest::setClientToken(const std::string& clientToken)
  49. {
  50. clientToken_ = clientToken;
  51. setParameter("ClientToken", clientToken);
  52. }
  53. std::string UpgradeEngineVersionRequest::getType()const
  54. {
  55. return type_;
  56. }
  57. void UpgradeEngineVersionRequest::setType(const std::string& type)
  58. {
  59. type_ = type;
  60. setBodyParameter("Type", type);
  61. }
  62. std::string UpgradeEngineVersionRequest::getVersion()const
  63. {
  64. return version_;
  65. }
  66. void UpgradeEngineVersionRequest::setVersion(const std::string& version)
  67. {
  68. version_ = version;
  69. setBodyParameter("Version", version);
  70. }