GenerateImageWithTextAndImageRequest.cc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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/GenerateImageWithTextAndImageRequest.h>
  17. using AlibabaCloud::Imageenhan::Model::GenerateImageWithTextAndImageRequest;
  18. GenerateImageWithTextAndImageRequest::GenerateImageWithTextAndImageRequest()
  19. : RpcServiceRequest("imageenhan", "2019-09-30", "GenerateImageWithTextAndImage") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. GenerateImageWithTextAndImageRequest::~GenerateImageWithTextAndImageRequest() {}
  23. std::string GenerateImageWithTextAndImageRequest::getResolution() const {
  24. return resolution_;
  25. }
  26. void GenerateImageWithTextAndImageRequest::setResolution(const std::string &resolution) {
  27. resolution_ = resolution;
  28. setBodyParameter(std::string("Resolution"), resolution);
  29. }
  30. int GenerateImageWithTextAndImageRequest::getNumber() const {
  31. return number_;
  32. }
  33. void GenerateImageWithTextAndImageRequest::setNumber(int number) {
  34. number_ = number;
  35. setBodyParameter(std::string("Number"), std::to_string(number));
  36. }
  37. float GenerateImageWithTextAndImageRequest::getSimilarity() const {
  38. return similarity_;
  39. }
  40. void GenerateImageWithTextAndImageRequest::setSimilarity(float similarity) {
  41. similarity_ = similarity;
  42. setBodyParameter(std::string("Similarity"), std::to_string(similarity));
  43. }
  44. std::string GenerateImageWithTextAndImageRequest::getAspectRatioMode() const {
  45. return aspectRatioMode_;
  46. }
  47. void GenerateImageWithTextAndImageRequest::setAspectRatioMode(const std::string &aspectRatioMode) {
  48. aspectRatioMode_ = aspectRatioMode;
  49. setBodyParameter(std::string("AspectRatioMode"), aspectRatioMode);
  50. }
  51. std::string GenerateImageWithTextAndImageRequest::getText() const {
  52. return text_;
  53. }
  54. void GenerateImageWithTextAndImageRequest::setText(const std::string &text) {
  55. text_ = text;
  56. setBodyParameter(std::string("Text"), text);
  57. }
  58. std::string GenerateImageWithTextAndImageRequest::getRefImageUrl() const {
  59. return refImageUrl_;
  60. }
  61. void GenerateImageWithTextAndImageRequest::setRefImageUrl(const std::string &refImageUrl) {
  62. refImageUrl_ = refImageUrl;
  63. setBodyParameter(std::string("RefImageUrl"), refImageUrl);
  64. }
  65. bool GenerateImageWithTextAndImageRequest::getAsync() const {
  66. return async_;
  67. }
  68. void GenerateImageWithTextAndImageRequest::setAsync(bool async) {
  69. async_ = async;
  70. setBodyParameter(std::string("Async"), async ? "true" : "false");
  71. }