CreateBaselineRequest.cc 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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/dataworks-public/model/CreateBaselineRequest.h>
  17. using AlibabaCloud::Dataworks_public::Model::CreateBaselineRequest;
  18. CreateBaselineRequest::CreateBaselineRequest()
  19. : RpcServiceRequest("dataworks-public", "2020-05-18", "CreateBaseline") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. CreateBaselineRequest::~CreateBaselineRequest() {}
  23. std::string CreateBaselineRequest::getOwner() const {
  24. return owner_;
  25. }
  26. void CreateBaselineRequest::setOwner(const std::string &owner) {
  27. owner_ = owner;
  28. setBodyParameter(std::string("Owner"), owner);
  29. }
  30. int CreateBaselineRequest::getAlertMarginThreshold() const {
  31. return alertMarginThreshold_;
  32. }
  33. void CreateBaselineRequest::setAlertMarginThreshold(int alertMarginThreshold) {
  34. alertMarginThreshold_ = alertMarginThreshold;
  35. setBodyParameter(std::string("AlertMarginThreshold"), std::to_string(alertMarginThreshold));
  36. }
  37. std::vector<CreateBaselineRequest::OvertimeSettings> CreateBaselineRequest::getOvertimeSettings() const {
  38. return overtimeSettings_;
  39. }
  40. void CreateBaselineRequest::setOvertimeSettings(const std::vector<CreateBaselineRequest::OvertimeSettings> &overtimeSettings) {
  41. overtimeSettings_ = overtimeSettings;
  42. for(int dep1 = 0; dep1 != overtimeSettings.size(); dep1++) {
  43. auto overtimeSettingsObj = overtimeSettings.at(dep1);
  44. std::string overtimeSettingsObjStr = std::string("OvertimeSettings") + "." + std::to_string(dep1 + 1);
  45. setBodyParameter(overtimeSettingsObjStr + ".Time", overtimeSettingsObj.time);
  46. setBodyParameter(overtimeSettingsObjStr + ".Cycle", std::to_string(overtimeSettingsObj.cycle));
  47. }
  48. }
  49. int CreateBaselineRequest::getPriority() const {
  50. return priority_;
  51. }
  52. void CreateBaselineRequest::setPriority(int priority) {
  53. priority_ = priority;
  54. setBodyParameter(std::string("Priority"), std::to_string(priority));
  55. }
  56. std::string CreateBaselineRequest::getTaskIds() const {
  57. return taskIds_;
  58. }
  59. void CreateBaselineRequest::setTaskIds(const std::string &taskIds) {
  60. taskIds_ = taskIds;
  61. setBodyParameter(std::string("TaskIds"), taskIds);
  62. }
  63. std::string CreateBaselineRequest::getBaselineType() const {
  64. return baselineType_;
  65. }
  66. void CreateBaselineRequest::setBaselineType(const std::string &baselineType) {
  67. baselineType_ = baselineType;
  68. setBodyParameter(std::string("BaselineType"), baselineType);
  69. }
  70. std::string CreateBaselineRequest::getBaselineName() const {
  71. return baselineName_;
  72. }
  73. void CreateBaselineRequest::setBaselineName(const std::string &baselineName) {
  74. baselineName_ = baselineName;
  75. setBodyParameter(std::string("BaselineName"), baselineName);
  76. }
  77. long CreateBaselineRequest::getProjectId() const {
  78. return projectId_;
  79. }
  80. void CreateBaselineRequest::setProjectId(long projectId) {
  81. projectId_ = projectId;
  82. setBodyParameter(std::string("ProjectId"), std::to_string(projectId));
  83. }