UpdateQueueRequest.cc 2.2 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/foas/model/UpdateQueueRequest.h>
  17. using AlibabaCloud::Foas::Model::UpdateQueueRequest;
  18. UpdateQueueRequest::UpdateQueueRequest() :
  19. RoaServiceRequest("foas", "2018-11-11")
  20. {
  21. setResourcePath("/api/v2/clusters/[clusterId]/queue");
  22. setMethod(HttpRequest::Method::Put);
  23. }
  24. UpdateQueueRequest::~UpdateQueueRequest()
  25. {}
  26. std::string UpdateQueueRequest::getQueueName()const
  27. {
  28. return queueName_;
  29. }
  30. void UpdateQueueRequest::setQueueName(const std::string& queueName)
  31. {
  32. queueName_ = queueName;
  33. setBodyParameter("QueueName", queueName);
  34. }
  35. std::string UpdateQueueRequest::getRegionId()const
  36. {
  37. return regionId_;
  38. }
  39. void UpdateQueueRequest::setRegionId(const std::string& regionId)
  40. {
  41. regionId_ = regionId;
  42. setHeader("RegionId", regionId);
  43. }
  44. int UpdateQueueRequest::getMaxMemMB()const
  45. {
  46. return maxMemMB_;
  47. }
  48. void UpdateQueueRequest::setMaxMemMB(int maxMemMB)
  49. {
  50. maxMemMB_ = maxMemMB;
  51. setBodyParameter("MaxMemMB", std::to_string(maxMemMB));
  52. }
  53. std::string UpdateQueueRequest::getClusterId()const
  54. {
  55. return clusterId_;
  56. }
  57. void UpdateQueueRequest::setClusterId(const std::string& clusterId)
  58. {
  59. clusterId_ = clusterId;
  60. setParameter("ClusterId", clusterId);
  61. }
  62. int UpdateQueueRequest::getGpu()const
  63. {
  64. return gpu_;
  65. }
  66. void UpdateQueueRequest::setGpu(int gpu)
  67. {
  68. gpu_ = gpu;
  69. setBodyParameter("Gpu", std::to_string(gpu));
  70. }
  71. int UpdateQueueRequest::getMaxVcore()const
  72. {
  73. return maxVcore_;
  74. }
  75. void UpdateQueueRequest::setMaxVcore(int maxVcore)
  76. {
  77. maxVcore_ = maxVcore;
  78. setBodyParameter("MaxVcore", std::to_string(maxVcore));
  79. }