PutEventRuleRequest.cc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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/cms/model/PutEventRuleRequest.h>
  17. using AlibabaCloud::Cms::Model::PutEventRuleRequest;
  18. PutEventRuleRequest::PutEventRuleRequest() :
  19. RpcServiceRequest("cms", "2018-03-08", "PutEventRule")
  20. {}
  21. PutEventRuleRequest::~PutEventRuleRequest()
  22. {}
  23. std::string PutEventRuleRequest::getGroupId()const
  24. {
  25. return groupId_;
  26. }
  27. void PutEventRuleRequest::setGroupId(const std::string& groupId)
  28. {
  29. groupId_ = groupId;
  30. setCoreParameter("GroupId", groupId);
  31. }
  32. std::string PutEventRuleRequest::getDescription()const
  33. {
  34. return description_;
  35. }
  36. void PutEventRuleRequest::setDescription(const std::string& description)
  37. {
  38. description_ = description;
  39. setCoreParameter("Description", description);
  40. }
  41. std::vector<PutEventRuleRequest::EventPattern> PutEventRuleRequest::getEventPattern()const
  42. {
  43. return eventPattern_;
  44. }
  45. void PutEventRuleRequest::setEventPattern(const std::vector<EventPattern>& eventPattern)
  46. {
  47. eventPattern_ = eventPattern;
  48. int i = 0;
  49. for(int i = 0; i!= eventPattern.size(); i++) {
  50. auto obj = eventPattern.at(i);
  51. std::string str ="EventPattern."+ std::to_string(i);
  52. for(int i = 0; i!= obj.levelList.size(); i++) setCoreParameter(str + ".LevelList."+ std::to_string(i), obj.levelList.at(i));
  53. setCoreParameter(str + ".Product", obj.product);
  54. for(int i = 0; i!= obj.statusList.size(); i++) setCoreParameter(str + ".StatusList."+ std::to_string(i), obj.statusList.at(i));
  55. for(int i = 0; i!= obj.nameList.size(); i++) setCoreParameter(str + ".NameList."+ std::to_string(i), obj.nameList.at(i));
  56. for(int i = 0; i!= obj.eventTypeList.size(); i++) setCoreParameter(str + ".EventTypeList."+ std::to_string(i), obj.eventTypeList.at(i));
  57. }
  58. }
  59. std::string PutEventRuleRequest::getName()const
  60. {
  61. return name_;
  62. }
  63. void PutEventRuleRequest::setName(const std::string& name)
  64. {
  65. name_ = name;
  66. setCoreParameter("Name", name);
  67. }
  68. std::string PutEventRuleRequest::getEventType()const
  69. {
  70. return eventType_;
  71. }
  72. void PutEventRuleRequest::setEventType(const std::string& eventType)
  73. {
  74. eventType_ = eventType;
  75. setCoreParameter("EventType", eventType);
  76. }
  77. std::string PutEventRuleRequest::getState()const
  78. {
  79. return state_;
  80. }
  81. void PutEventRuleRequest::setState(const std::string& state)
  82. {
  83. state_ = state;
  84. setCoreParameter("State", state);
  85. }