RecolorHDImageRequest.cc 2.8 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/imageenhan/model/RecolorHDImageRequest.h>
  17. using AlibabaCloud::Imageenhan::Model::RecolorHDImageRequest;
  18. RecolorHDImageRequest::RecolorHDImageRequest()
  19. : RpcServiceRequest("imageenhan", "2019-09-30", "RecolorHDImage") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. RecolorHDImageRequest::~RecolorHDImageRequest() {}
  23. std::string RecolorHDImageRequest::getMode() const {
  24. return mode_;
  25. }
  26. void RecolorHDImageRequest::setMode(const std::string &mode) {
  27. mode_ = mode;
  28. setBodyParameter(std::string("Mode"), mode);
  29. }
  30. int RecolorHDImageRequest::getColorCount() const {
  31. return colorCount_;
  32. }
  33. void RecolorHDImageRequest::setColorCount(int colorCount) {
  34. colorCount_ = colorCount;
  35. setBodyParameter(std::string("ColorCount"), std::to_string(colorCount));
  36. }
  37. std::vector<RecolorHDImageRequest::ColorTemplate> RecolorHDImageRequest::getColorTemplate() const {
  38. return colorTemplate_;
  39. }
  40. void RecolorHDImageRequest::setColorTemplate(const std::vector<RecolorHDImageRequest::ColorTemplate> &colorTemplate) {
  41. colorTemplate_ = colorTemplate;
  42. for(int dep1 = 0; dep1 != colorTemplate.size(); dep1++) {
  43. auto colorTemplateObj = colorTemplate.at(dep1);
  44. std::string colorTemplateObjStr = std::string("ColorTemplate") + "." + std::to_string(dep1 + 1);
  45. setBodyParameter(colorTemplateObjStr + ".Color", colorTemplateObj.color);
  46. }
  47. }
  48. std::string RecolorHDImageRequest::getDegree() const {
  49. return degree_;
  50. }
  51. void RecolorHDImageRequest::setDegree(const std::string &degree) {
  52. degree_ = degree;
  53. setBodyParameter(std::string("Degree"), degree);
  54. }
  55. std::string RecolorHDImageRequest::getUrl() const {
  56. return url_;
  57. }
  58. void RecolorHDImageRequest::setUrl(const std::string &url) {
  59. url_ = url;
  60. setBodyParameter(std::string("Url"), url);
  61. }
  62. bool RecolorHDImageRequest::getAsync() const {
  63. return async_;
  64. }
  65. void RecolorHDImageRequest::setAsync(bool async) {
  66. async_ = async;
  67. setBodyParameter(std::string("Async"), async ? "true" : "false");
  68. }
  69. std::string RecolorHDImageRequest::getRefUrl() const {
  70. return refUrl_;
  71. }
  72. void RecolorHDImageRequest::setRefUrl(const std::string &refUrl) {
  73. refUrl_ = refUrl;
  74. setBodyParameter(std::string("RefUrl"), refUrl);
  75. }