UpdateProjectConfigRequest.cc 5.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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/oceanbasepro/model/UpdateProjectConfigRequest.h>
  17. using AlibabaCloud::OceanBasePro::Model::UpdateProjectConfigRequest;
  18. UpdateProjectConfigRequest::UpdateProjectConfigRequest()
  19. : RpcServiceRequest("oceanbasepro", "2019-09-01", "UpdateProjectConfig") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. UpdateProjectConfigRequest::~UpdateProjectConfigRequest() {}
  23. UpdateProjectConfigRequest::CommonTransferConfig UpdateProjectConfigRequest::getCommonTransferConfig() const {
  24. return commonTransferConfig_;
  25. }
  26. void UpdateProjectConfigRequest::setCommonTransferConfig(const UpdateProjectConfigRequest::CommonTransferConfig &commonTransferConfig) {
  27. commonTransferConfig_ = commonTransferConfig;
  28. setBodyParameter(std::string("CommonTransferConfig") + ".SinkStoreFormat", commonTransferConfig.sinkStoreFormat);
  29. setBodyParameter(std::string("CommonTransferConfig") + ".SourceStoreFormat", commonTransferConfig.sourceStoreFormat);
  30. }
  31. UpdateProjectConfigRequest::ReverseIncrTransferConfig UpdateProjectConfigRequest::getReverseIncrTransferConfig() const {
  32. return reverseIncrTransferConfig_;
  33. }
  34. void UpdateProjectConfigRequest::setReverseIncrTransferConfig(const UpdateProjectConfigRequest::ReverseIncrTransferConfig &reverseIncrTransferConfig) {
  35. reverseIncrTransferConfig_ = reverseIncrTransferConfig;
  36. setBodyParameter(std::string("ReverseIncrTransferConfig") + ".ThrottleRps", std::to_string(reverseIncrTransferConfig.throttleRps));
  37. for(int dep1 = 0; dep1 != reverseIncrTransferConfig.supportDDLTypes.size(); dep1++) {
  38. setBodyParameter(std::string("ReverseIncrTransferConfig") + ".SupportDDLTypes." + std::to_string(dep1 + 1), reverseIncrTransferConfig.supportDDLTypes[dep1]);
  39. }
  40. setBodyParameter(std::string("ReverseIncrTransferConfig") + ".ThrottleIOPS", std::to_string(reverseIncrTransferConfig.throttleIOPS));
  41. for(int dep1 = 0; dep1 != reverseIncrTransferConfig.recordTypeWhiteList.size(); dep1++) {
  42. setBodyParameter(std::string("ReverseIncrTransferConfig") + ".RecordTypeWhiteList." + std::to_string(dep1 + 1), reverseIncrTransferConfig.recordTypeWhiteList[dep1]);
  43. }
  44. setBodyParameter(std::string("ReverseIncrTransferConfig") + ".IncrSyncThreadCount", std::to_string(reverseIncrTransferConfig.incrSyncThreadCount));
  45. }
  46. UpdateProjectConfigRequest::FullTransferConfig UpdateProjectConfigRequest::getFullTransferConfig() const {
  47. return fullTransferConfig_;
  48. }
  49. void UpdateProjectConfigRequest::setFullTransferConfig(const UpdateProjectConfigRequest::FullTransferConfig &fullTransferConfig) {
  50. fullTransferConfig_ = fullTransferConfig;
  51. setBodyParameter(std::string("FullTransferConfig") + ".IndexDDLConcurrencyLimit", std::to_string(fullTransferConfig.indexDDLConcurrencyLimit));
  52. setBodyParameter(std::string("FullTransferConfig") + ".ThrottleRps", std::to_string(fullTransferConfig.throttleRps));
  53. setBodyParameter(std::string("FullTransferConfig") + ".WriteWorkerNum", std::to_string(fullTransferConfig.writeWorkerNum));
  54. setBodyParameter(std::string("FullTransferConfig") + ".MaxConcurrentIndexDDLs", std::to_string(fullTransferConfig.maxConcurrentIndexDDLs));
  55. setBodyParameter(std::string("FullTransferConfig") + ".ReadWorkerNum", std::to_string(fullTransferConfig.readWorkerNum));
  56. setBodyParameter(std::string("FullTransferConfig") + ".ThrottleIOPS", std::to_string(fullTransferConfig.throttleIOPS));
  57. }
  58. std::string UpdateProjectConfigRequest::getId() const {
  59. return id_;
  60. }
  61. void UpdateProjectConfigRequest::setId(const std::string &id) {
  62. id_ = id;
  63. setBodyParameter(std::string("Id"), id);
  64. }
  65. UpdateProjectConfigRequest::IncrTransferConfig UpdateProjectConfigRequest::getIncrTransferConfig() const {
  66. return incrTransferConfig_;
  67. }
  68. void UpdateProjectConfigRequest::setIncrTransferConfig(const UpdateProjectConfigRequest::IncrTransferConfig &incrTransferConfig) {
  69. incrTransferConfig_ = incrTransferConfig;
  70. setBodyParameter(std::string("IncrTransferConfig") + ".ThrottleRps", std::to_string(incrTransferConfig.throttleRps));
  71. for(int dep1 = 0; dep1 != incrTransferConfig.supportDDLTypes.size(); dep1++) {
  72. setBodyParameter(std::string("IncrTransferConfig") + ".SupportDDLTypes." + std::to_string(dep1 + 1), incrTransferConfig.supportDDLTypes[dep1]);
  73. }
  74. setBodyParameter(std::string("IncrTransferConfig") + ".ThrottleIOPS", std::to_string(incrTransferConfig.throttleIOPS));
  75. for(int dep1 = 0; dep1 != incrTransferConfig.recordTypeWhiteList.size(); dep1++) {
  76. setBodyParameter(std::string("IncrTransferConfig") + ".RecordTypeWhiteList." + std::to_string(dep1 + 1), incrTransferConfig.recordTypeWhiteList[dep1]);
  77. }
  78. setBodyParameter(std::string("IncrTransferConfig") + ".IncrSyncThreadCount", std::to_string(incrTransferConfig.incrSyncThreadCount));
  79. }