AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
TranslateTextRequest.h
1
6#pragma once
7#include <aws/translate/Translate_EXPORTS.h>
8#include <aws/translate/TranslateRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/translate/model/TranslationSettings.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Translate
17{
18namespace Model
19{
20
24 {
25 public:
26 AWS_TRANSLATE_API TranslateTextRequest();
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "TranslateText"; }
33
34 AWS_TRANSLATE_API Aws::String SerializePayload() const override;
35
37
38
40
44 inline const Aws::String& GetText() const{ return m_text; }
45 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
46 inline void SetText(const Aws::String& value) { m_textHasBeenSet = true; m_text = value; }
47 inline void SetText(Aws::String&& value) { m_textHasBeenSet = true; m_text = std::move(value); }
48 inline void SetText(const char* value) { m_textHasBeenSet = true; m_text.assign(value); }
49 inline TranslateTextRequest& WithText(const Aws::String& value) { SetText(value); return *this;}
50 inline TranslateTextRequest& WithText(Aws::String&& value) { SetText(std::move(value)); return *this;}
51 inline TranslateTextRequest& WithText(const char* value) { SetText(value); return *this;}
53
55
65 inline const Aws::Vector<Aws::String>& GetTerminologyNames() const{ return m_terminologyNames; }
66 inline bool TerminologyNamesHasBeenSet() const { return m_terminologyNamesHasBeenSet; }
67 inline void SetTerminologyNames(const Aws::Vector<Aws::String>& value) { m_terminologyNamesHasBeenSet = true; m_terminologyNames = value; }
68 inline void SetTerminologyNames(Aws::Vector<Aws::String>&& value) { m_terminologyNamesHasBeenSet = true; m_terminologyNames = std::move(value); }
71 inline TranslateTextRequest& AddTerminologyNames(const Aws::String& value) { m_terminologyNamesHasBeenSet = true; m_terminologyNames.push_back(value); return *this; }
72 inline TranslateTextRequest& AddTerminologyNames(Aws::String&& value) { m_terminologyNamesHasBeenSet = true; m_terminologyNames.push_back(std::move(value)); return *this; }
73 inline TranslateTextRequest& AddTerminologyNames(const char* value) { m_terminologyNamesHasBeenSet = true; m_terminologyNames.push_back(value); return *this; }
75
77
91 inline const Aws::String& GetSourceLanguageCode() const{ return m_sourceLanguageCode; }
92 inline bool SourceLanguageCodeHasBeenSet() const { return m_sourceLanguageCodeHasBeenSet; }
93 inline void SetSourceLanguageCode(const Aws::String& value) { m_sourceLanguageCodeHasBeenSet = true; m_sourceLanguageCode = value; }
94 inline void SetSourceLanguageCode(Aws::String&& value) { m_sourceLanguageCodeHasBeenSet = true; m_sourceLanguageCode = std::move(value); }
95 inline void SetSourceLanguageCode(const char* value) { m_sourceLanguageCodeHasBeenSet = true; m_sourceLanguageCode.assign(value); }
97 inline TranslateTextRequest& WithSourceLanguageCode(Aws::String&& value) { SetSourceLanguageCode(std::move(value)); return *this;}
98 inline TranslateTextRequest& WithSourceLanguageCode(const char* value) { SetSourceLanguageCode(value); return *this;}
100
102
108 inline const Aws::String& GetTargetLanguageCode() const{ return m_targetLanguageCode; }
109 inline bool TargetLanguageCodeHasBeenSet() const { return m_targetLanguageCodeHasBeenSet; }
110 inline void SetTargetLanguageCode(const Aws::String& value) { m_targetLanguageCodeHasBeenSet = true; m_targetLanguageCode = value; }
111 inline void SetTargetLanguageCode(Aws::String&& value) { m_targetLanguageCodeHasBeenSet = true; m_targetLanguageCode = std::move(value); }
112 inline void SetTargetLanguageCode(const char* value) { m_targetLanguageCodeHasBeenSet = true; m_targetLanguageCode.assign(value); }
114 inline TranslateTextRequest& WithTargetLanguageCode(Aws::String&& value) { SetTargetLanguageCode(std::move(value)); return *this;}
115 inline TranslateTextRequest& WithTargetLanguageCode(const char* value) { SetTargetLanguageCode(value); return *this;}
117
119
126 inline const TranslationSettings& GetSettings() const{ return m_settings; }
127 inline bool SettingsHasBeenSet() const { return m_settingsHasBeenSet; }
128 inline void SetSettings(const TranslationSettings& value) { m_settingsHasBeenSet = true; m_settings = value; }
129 inline void SetSettings(TranslationSettings&& value) { m_settingsHasBeenSet = true; m_settings = std::move(value); }
130 inline TranslateTextRequest& WithSettings(const TranslationSettings& value) { SetSettings(value); return *this;}
131 inline TranslateTextRequest& WithSettings(TranslationSettings&& value) { SetSettings(std::move(value)); return *this;}
133 private:
134
135 Aws::String m_text;
136 bool m_textHasBeenSet = false;
137
138 Aws::Vector<Aws::String> m_terminologyNames;
139 bool m_terminologyNamesHasBeenSet = false;
140
141 Aws::String m_sourceLanguageCode;
142 bool m_sourceLanguageCodeHasBeenSet = false;
143
144 Aws::String m_targetLanguageCode;
145 bool m_targetLanguageCodeHasBeenSet = false;
146
147 TranslationSettings m_settings;
148 bool m_settingsHasBeenSet = false;
149 };
150
151} // namespace Model
152} // namespace Translate
153} // namespace Aws
TranslateTextRequest & AddTerminologyNames(const Aws::String &value)
TranslateTextRequest & WithSettings(const TranslationSettings &value)
TranslateTextRequest & WithSourceLanguageCode(const char *value)
void SetTerminologyNames(Aws::Vector< Aws::String > &&value)
TranslateTextRequest & WithTargetLanguageCode(const Aws::String &value)
TranslateTextRequest & WithText(const Aws::String &value)
TranslateTextRequest & WithText(const char *value)
void SetTerminologyNames(const Aws::Vector< Aws::String > &value)
void SetSettings(TranslationSettings &&value)
AWS_TRANSLATE_API Aws::String SerializePayload() const override
virtual const char * GetServiceRequestName() const override
TranslateTextRequest & WithSourceLanguageCode(Aws::String &&value)
TranslateTextRequest & AddTerminologyNames(const char *value)
TranslateTextRequest & WithText(Aws::String &&value)
TranslateTextRequest & WithTerminologyNames(const Aws::Vector< Aws::String > &value)
const Aws::Vector< Aws::String > & GetTerminologyNames() const
const TranslationSettings & GetSettings() const
TranslateTextRequest & WithSettings(TranslationSettings &&value)
void SetTargetLanguageCode(const Aws::String &value)
void SetSourceLanguageCode(const Aws::String &value)
TranslateTextRequest & WithTargetLanguageCode(Aws::String &&value)
TranslateTextRequest & WithSourceLanguageCode(const Aws::String &value)
AWS_TRANSLATE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
TranslateTextRequest & AddTerminologyNames(Aws::String &&value)
void SetSettings(const TranslationSettings &value)
TranslateTextRequest & WithTargetLanguageCode(const char *value)
TranslateTextRequest & WithTerminologyNames(Aws::Vector< Aws::String > &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector