BatchTranslateRequest.h 2.7 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. #ifndef ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEREQUEST_H_
  17. #define ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEREQUEST_H_
  18. #include <alibabacloud/anytrans/AnyTransExport.h>
  19. #include <alibabacloud/core/RoaServiceRequest.h>
  20. #include <string>
  21. #include <vector>
  22. #include <map>
  23. namespace AlibabaCloud {
  24. namespace AnyTrans {
  25. namespace Model {
  26. class ALIBABACLOUD_ANYTRANS_EXPORT BatchTranslateRequest : public RoaServiceRequest {
  27. public:
  28. struct Ext {
  29. std::string string;
  30. std::vector<std::string> sensitives;
  31. struct TerminologiesItem {
  32. std::string tgt;
  33. std::string src;
  34. };
  35. terminologiesItem terminologiesItem;
  36. std::vector<terminologiesItem> terminologies;
  37. struct TextTransform {
  38. bool toLower;
  39. bool toUpper;
  40. bool toTitle;
  41. };
  42. textTransform textTransform;
  43. struct ExamplesItem {
  44. std::string tgt;
  45. std::string src;
  46. };
  47. examplesItem examplesItem;
  48. std::vector<examplesItem> examples;
  49. struct Config {
  50. bool skipCsiCheck;
  51. };
  52. config config;
  53. std::string domainHint;
  54. };
  55. BatchTranslateRequest();
  56. ~BatchTranslateRequest();
  57. ext getExt() const;
  58. void setExt(const ext &ext);
  59. std::string getSourceLanguage() const;
  60. void setSourceLanguage(const std::string &sourceLanguage);
  61. std::string getFormat() const;
  62. void setFormat(const std::string &format);
  63. std::string getScene() const;
  64. void setScene(const std::string &scene);
  65. std::string getAppName() const;
  66. void setAppName(const std::string &appName);
  67. std::string getTargetLanguage() const;
  68. void setTargetLanguage(const std::string &targetLanguage);
  69. std::map<std::string, std::string> getText() const;
  70. void setText(const std::map<std::string, std::string> &text);
  71. std::string getWorkspaceId() const;
  72. void setWorkspaceId(const std::string &workspaceId);
  73. private:
  74. ext ext_;
  75. std::string sourceLanguage_;
  76. std::string format_;
  77. std::string scene_;
  78. std::string appName_;
  79. std::string targetLanguage_;
  80. std::map<std::string, std::string> text_;
  81. std::string workspaceId_;
  82. };
  83. } // namespace Model
  84. } // namespace AnyTrans
  85. } // namespace AlibabaCloud
  86. #endif // !ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEREQUEST_H_