DetectFaceRequest.cc 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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/facebody/model/DetectFaceRequest.h>
  17. using AlibabaCloud::Facebody::Model::DetectFaceRequest;
  18. DetectFaceRequest::DetectFaceRequest()
  19. : RpcServiceRequest("facebody", "2019-12-30", "DetectFace") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. DetectFaceRequest::~DetectFaceRequest() {}
  23. long DetectFaceRequest::getMaxFaceNumber() const {
  24. return maxFaceNumber_;
  25. }
  26. void DetectFaceRequest::setMaxFaceNumber(long maxFaceNumber) {
  27. maxFaceNumber_ = maxFaceNumber;
  28. setBodyParameter(std::string("MaxFaceNumber"), std::to_string(maxFaceNumber));
  29. }
  30. bool DetectFaceRequest::getFormatResultToJson() const {
  31. return formatResultToJson_;
  32. }
  33. void DetectFaceRequest::setFormatResultToJson(bool formatResultToJson) {
  34. formatResultToJson_ = formatResultToJson;
  35. setParameter(std::string("FormatResultToJson"), formatResultToJson ? "true" : "false");
  36. }
  37. bool DetectFaceRequest::getLandmark() const {
  38. return landmark_;
  39. }
  40. void DetectFaceRequest::setLandmark(bool landmark) {
  41. landmark_ = landmark;
  42. setBodyParameter(std::string("Landmark"), landmark ? "true" : "false");
  43. }
  44. std::string DetectFaceRequest::getOssFile() const {
  45. return ossFile_;
  46. }
  47. void DetectFaceRequest::setOssFile(const std::string &ossFile) {
  48. ossFile_ = ossFile;
  49. setParameter(std::string("OssFile"), ossFile);
  50. }
  51. int DetectFaceRequest::getImageType() const {
  52. return imageType_;
  53. }
  54. void DetectFaceRequest::setImageType(int imageType) {
  55. imageType_ = imageType;
  56. setBodyParameter(std::string("ImageType"), std::to_string(imageType));
  57. }
  58. bool DetectFaceRequest::getPose() const {
  59. return pose_;
  60. }
  61. void DetectFaceRequest::setPose(bool pose) {
  62. pose_ = pose;
  63. setBodyParameter(std::string("Pose"), pose ? "true" : "false");
  64. }
  65. std::string DetectFaceRequest::getRequestProxyBy() const {
  66. return requestProxyBy_;
  67. }
  68. void DetectFaceRequest::setRequestProxyBy(const std::string &requestProxyBy) {
  69. requestProxyBy_ = requestProxyBy;
  70. setParameter(std::string("RequestProxyBy"), requestProxyBy);
  71. }
  72. bool DetectFaceRequest::getQuality() const {
  73. return quality_;
  74. }
  75. void DetectFaceRequest::setQuality(bool quality) {
  76. quality_ = quality;
  77. setBodyParameter(std::string("Quality"), quality ? "true" : "false");
  78. }
  79. std::string DetectFaceRequest::getImageURL() const {
  80. return imageURL_;
  81. }
  82. void DetectFaceRequest::setImageURL(const std::string &imageURL) {
  83. imageURL_ = imageURL;
  84. setBodyParameter(std::string("ImageURL"), imageURL);
  85. }