CreateAsyncPredictRequest.cc 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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/nlp-automl/model/CreateAsyncPredictRequest.h>
  17. using AlibabaCloud::Nlp_automl::Model::CreateAsyncPredictRequest;
  18. CreateAsyncPredictRequest::CreateAsyncPredictRequest() :
  19. RpcServiceRequest("nlp-automl", "2019-11-11", "CreateAsyncPredict")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. CreateAsyncPredictRequest::~CreateAsyncPredictRequest()
  24. {}
  25. int CreateAsyncPredictRequest::getTopK()const
  26. {
  27. return topK_;
  28. }
  29. void CreateAsyncPredictRequest::setTopK(int topK)
  30. {
  31. topK_ = topK;
  32. setBodyParameter("TopK", std::to_string(topK));
  33. }
  34. std::string CreateAsyncPredictRequest::getFileType()const
  35. {
  36. return fileType_;
  37. }
  38. void CreateAsyncPredictRequest::setFileType(const std::string& fileType)
  39. {
  40. fileType_ = fileType;
  41. setBodyParameter("FileType", fileType);
  42. }
  43. std::string CreateAsyncPredictRequest::getDetailTag()const
  44. {
  45. return detailTag_;
  46. }
  47. void CreateAsyncPredictRequest::setDetailTag(const std::string& detailTag)
  48. {
  49. detailTag_ = detailTag;
  50. setBodyParameter("DetailTag", detailTag);
  51. }
  52. std::string CreateAsyncPredictRequest::getFetchContent()const
  53. {
  54. return fetchContent_;
  55. }
  56. void CreateAsyncPredictRequest::setFetchContent(const std::string& fetchContent)
  57. {
  58. fetchContent_ = fetchContent;
  59. setBodyParameter("FetchContent", fetchContent);
  60. }
  61. std::string CreateAsyncPredictRequest::getContent()const
  62. {
  63. return content_;
  64. }
  65. void CreateAsyncPredictRequest::setContent(const std::string& content)
  66. {
  67. content_ = content;
  68. setBodyParameter("Content", content);
  69. }
  70. std::string CreateAsyncPredictRequest::getFileContent()const
  71. {
  72. return fileContent_;
  73. }
  74. void CreateAsyncPredictRequest::setFileContent(const std::string& fileContent)
  75. {
  76. fileContent_ = fileContent;
  77. setBodyParameter("FileContent", fileContent);
  78. }
  79. std::string CreateAsyncPredictRequest::getProduct()const
  80. {
  81. return product_;
  82. }
  83. void CreateAsyncPredictRequest::setProduct(const std::string& product)
  84. {
  85. product_ = product;
  86. setBodyParameter("Product", product);
  87. }
  88. int CreateAsyncPredictRequest::getModelId()const
  89. {
  90. return modelId_;
  91. }
  92. void CreateAsyncPredictRequest::setModelId(int modelId)
  93. {
  94. modelId_ = modelId;
  95. setBodyParameter("ModelId", std::to_string(modelId));
  96. }
  97. std::string CreateAsyncPredictRequest::getFileUrl()const
  98. {
  99. return fileUrl_;
  100. }
  101. void CreateAsyncPredictRequest::setFileUrl(const std::string& fileUrl)
  102. {
  103. fileUrl_ = fileUrl;
  104. setBodyParameter("FileUrl", fileUrl);
  105. }
  106. std::string CreateAsyncPredictRequest::getModelVersion()const
  107. {
  108. return modelVersion_;
  109. }
  110. void CreateAsyncPredictRequest::setModelVersion(const std::string& modelVersion)
  111. {
  112. modelVersion_ = modelVersion;
  113. setBodyParameter("ModelVersion", modelVersion);
  114. }