1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/transcribe/TranscribeService_EXPORTS.h>
8 #include <aws/transcribe/TranscribeServiceRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/transcribe/model/LanguageCode.h>
11 #include <aws/core/utils/memory/stl/AWSVector.h>
12 #include <aws/transcribe/model/Tag.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace TranscribeService
18 {
19 namespace Model
20 {
21 
22   /**
23    */
24   class AWS_TRANSCRIBESERVICE_API CreateVocabularyRequest : public TranscribeServiceRequest
25   {
26   public:
27     CreateVocabularyRequest();
28 
29     // Service request name is the Operation name which will send this request out,
30     // each operation should has unique request name, so that we can get operation's name from this request.
31     // Note: this is not true for response, multiple operations may have the same response name,
32     // so we can not get operation's name from response.
GetServiceRequestName()33     inline virtual const char* GetServiceRequestName() const override { return "CreateVocabulary"; }
34 
35     Aws::String SerializePayload() const override;
36 
37     Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
38 
39 
40     /**
41      * <p>The name of the vocabulary. The name must be unique within an Amazon Web
42      * Services account. The name is case sensitive. If you try to create a vocabulary
43      * with the same name as a previous vocabulary you will receive a
44      * <code>ConflictException</code> error.</p>
45      */
GetVocabularyName()46     inline const Aws::String& GetVocabularyName() const{ return m_vocabularyName; }
47 
48     /**
49      * <p>The name of the vocabulary. The name must be unique within an Amazon Web
50      * Services account. The name is case sensitive. If you try to create a vocabulary
51      * with the same name as a previous vocabulary you will receive a
52      * <code>ConflictException</code> error.</p>
53      */
VocabularyNameHasBeenSet()54     inline bool VocabularyNameHasBeenSet() const { return m_vocabularyNameHasBeenSet; }
55 
56     /**
57      * <p>The name of the vocabulary. The name must be unique within an Amazon Web
58      * Services account. The name is case sensitive. If you try to create a vocabulary
59      * with the same name as a previous vocabulary you will receive a
60      * <code>ConflictException</code> error.</p>
61      */
SetVocabularyName(const Aws::String & value)62     inline void SetVocabularyName(const Aws::String& value) { m_vocabularyNameHasBeenSet = true; m_vocabularyName = value; }
63 
64     /**
65      * <p>The name of the vocabulary. The name must be unique within an Amazon Web
66      * Services account. The name is case sensitive. If you try to create a vocabulary
67      * with the same name as a previous vocabulary you will receive a
68      * <code>ConflictException</code> error.</p>
69      */
SetVocabularyName(Aws::String && value)70     inline void SetVocabularyName(Aws::String&& value) { m_vocabularyNameHasBeenSet = true; m_vocabularyName = std::move(value); }
71 
72     /**
73      * <p>The name of the vocabulary. The name must be unique within an Amazon Web
74      * Services account. The name is case sensitive. If you try to create a vocabulary
75      * with the same name as a previous vocabulary you will receive a
76      * <code>ConflictException</code> error.</p>
77      */
SetVocabularyName(const char * value)78     inline void SetVocabularyName(const char* value) { m_vocabularyNameHasBeenSet = true; m_vocabularyName.assign(value); }
79 
80     /**
81      * <p>The name of the vocabulary. The name must be unique within an Amazon Web
82      * Services account. The name is case sensitive. If you try to create a vocabulary
83      * with the same name as a previous vocabulary you will receive a
84      * <code>ConflictException</code> error.</p>
85      */
WithVocabularyName(const Aws::String & value)86     inline CreateVocabularyRequest& WithVocabularyName(const Aws::String& value) { SetVocabularyName(value); return *this;}
87 
88     /**
89      * <p>The name of the vocabulary. The name must be unique within an Amazon Web
90      * Services account. The name is case sensitive. If you try to create a vocabulary
91      * with the same name as a previous vocabulary you will receive a
92      * <code>ConflictException</code> error.</p>
93      */
WithVocabularyName(Aws::String && value)94     inline CreateVocabularyRequest& WithVocabularyName(Aws::String&& value) { SetVocabularyName(std::move(value)); return *this;}
95 
96     /**
97      * <p>The name of the vocabulary. The name must be unique within an Amazon Web
98      * Services account. The name is case sensitive. If you try to create a vocabulary
99      * with the same name as a previous vocabulary you will receive a
100      * <code>ConflictException</code> error.</p>
101      */
WithVocabularyName(const char * value)102     inline CreateVocabularyRequest& WithVocabularyName(const char* value) { SetVocabularyName(value); return *this;}
103 
104 
105     /**
106      * <p>The language code of the vocabulary entries. For a list of languages and
107      * their corresponding language codes, see <a>transcribe-whatis</a>.</p>
108      */
GetLanguageCode()109     inline const LanguageCode& GetLanguageCode() const{ return m_languageCode; }
110 
111     /**
112      * <p>The language code of the vocabulary entries. For a list of languages and
113      * their corresponding language codes, see <a>transcribe-whatis</a>.</p>
114      */
LanguageCodeHasBeenSet()115     inline bool LanguageCodeHasBeenSet() const { return m_languageCodeHasBeenSet; }
116 
117     /**
118      * <p>The language code of the vocabulary entries. For a list of languages and
119      * their corresponding language codes, see <a>transcribe-whatis</a>.</p>
120      */
SetLanguageCode(const LanguageCode & value)121     inline void SetLanguageCode(const LanguageCode& value) { m_languageCodeHasBeenSet = true; m_languageCode = value; }
122 
123     /**
124      * <p>The language code of the vocabulary entries. For a list of languages and
125      * their corresponding language codes, see <a>transcribe-whatis</a>.</p>
126      */
SetLanguageCode(LanguageCode && value)127     inline void SetLanguageCode(LanguageCode&& value) { m_languageCodeHasBeenSet = true; m_languageCode = std::move(value); }
128 
129     /**
130      * <p>The language code of the vocabulary entries. For a list of languages and
131      * their corresponding language codes, see <a>transcribe-whatis</a>.</p>
132      */
WithLanguageCode(const LanguageCode & value)133     inline CreateVocabularyRequest& WithLanguageCode(const LanguageCode& value) { SetLanguageCode(value); return *this;}
134 
135     /**
136      * <p>The language code of the vocabulary entries. For a list of languages and
137      * their corresponding language codes, see <a>transcribe-whatis</a>.</p>
138      */
WithLanguageCode(LanguageCode && value)139     inline CreateVocabularyRequest& WithLanguageCode(LanguageCode&& value) { SetLanguageCode(std::move(value)); return *this;}
140 
141 
142     /**
143      * <p>An array of strings that contains the vocabulary entries. </p>
144      */
GetPhrases()145     inline const Aws::Vector<Aws::String>& GetPhrases() const{ return m_phrases; }
146 
147     /**
148      * <p>An array of strings that contains the vocabulary entries. </p>
149      */
PhrasesHasBeenSet()150     inline bool PhrasesHasBeenSet() const { return m_phrasesHasBeenSet; }
151 
152     /**
153      * <p>An array of strings that contains the vocabulary entries. </p>
154      */
SetPhrases(const Aws::Vector<Aws::String> & value)155     inline void SetPhrases(const Aws::Vector<Aws::String>& value) { m_phrasesHasBeenSet = true; m_phrases = value; }
156 
157     /**
158      * <p>An array of strings that contains the vocabulary entries. </p>
159      */
SetPhrases(Aws::Vector<Aws::String> && value)160     inline void SetPhrases(Aws::Vector<Aws::String>&& value) { m_phrasesHasBeenSet = true; m_phrases = std::move(value); }
161 
162     /**
163      * <p>An array of strings that contains the vocabulary entries. </p>
164      */
WithPhrases(const Aws::Vector<Aws::String> & value)165     inline CreateVocabularyRequest& WithPhrases(const Aws::Vector<Aws::String>& value) { SetPhrases(value); return *this;}
166 
167     /**
168      * <p>An array of strings that contains the vocabulary entries. </p>
169      */
WithPhrases(Aws::Vector<Aws::String> && value)170     inline CreateVocabularyRequest& WithPhrases(Aws::Vector<Aws::String>&& value) { SetPhrases(std::move(value)); return *this;}
171 
172     /**
173      * <p>An array of strings that contains the vocabulary entries. </p>
174      */
AddPhrases(const Aws::String & value)175     inline CreateVocabularyRequest& AddPhrases(const Aws::String& value) { m_phrasesHasBeenSet = true; m_phrases.push_back(value); return *this; }
176 
177     /**
178      * <p>An array of strings that contains the vocabulary entries. </p>
179      */
AddPhrases(Aws::String && value)180     inline CreateVocabularyRequest& AddPhrases(Aws::String&& value) { m_phrasesHasBeenSet = true; m_phrases.push_back(std::move(value)); return *this; }
181 
182     /**
183      * <p>An array of strings that contains the vocabulary entries. </p>
184      */
AddPhrases(const char * value)185     inline CreateVocabularyRequest& AddPhrases(const char* value) { m_phrasesHasBeenSet = true; m_phrases.push_back(value); return *this; }
186 
187 
188     /**
189      * <p>The S3 location of the text file that contains the definition of the custom
190      * vocabulary. The URI must be in the same region as the API endpoint that you are
191      * calling. The general form is:</p> <p>For more information about S3 object names,
192      * see <a
193      * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#object-keys">Object
194      * Keys</a> in the <i>Amazon S3 Developer Guide</i>.</p> <p>For more information
195      * about custom vocabularies, see <a
196      * href="https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary">Custom
197      * vocabularies</a>.</p>
198      */
GetVocabularyFileUri()199     inline const Aws::String& GetVocabularyFileUri() const{ return m_vocabularyFileUri; }
200 
201     /**
202      * <p>The S3 location of the text file that contains the definition of the custom
203      * vocabulary. The URI must be in the same region as the API endpoint that you are
204      * calling. The general form is:</p> <p>For more information about S3 object names,
205      * see <a
206      * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#object-keys">Object
207      * Keys</a> in the <i>Amazon S3 Developer Guide</i>.</p> <p>For more information
208      * about custom vocabularies, see <a
209      * href="https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary">Custom
210      * vocabularies</a>.</p>
211      */
VocabularyFileUriHasBeenSet()212     inline bool VocabularyFileUriHasBeenSet() const { return m_vocabularyFileUriHasBeenSet; }
213 
214     /**
215      * <p>The S3 location of the text file that contains the definition of the custom
216      * vocabulary. The URI must be in the same region as the API endpoint that you are
217      * calling. The general form is:</p> <p>For more information about S3 object names,
218      * see <a
219      * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#object-keys">Object
220      * Keys</a> in the <i>Amazon S3 Developer Guide</i>.</p> <p>For more information
221      * about custom vocabularies, see <a
222      * href="https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary">Custom
223      * vocabularies</a>.</p>
224      */
SetVocabularyFileUri(const Aws::String & value)225     inline void SetVocabularyFileUri(const Aws::String& value) { m_vocabularyFileUriHasBeenSet = true; m_vocabularyFileUri = value; }
226 
227     /**
228      * <p>The S3 location of the text file that contains the definition of the custom
229      * vocabulary. The URI must be in the same region as the API endpoint that you are
230      * calling. The general form is:</p> <p>For more information about S3 object names,
231      * see <a
232      * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#object-keys">Object
233      * Keys</a> in the <i>Amazon S3 Developer Guide</i>.</p> <p>For more information
234      * about custom vocabularies, see <a
235      * href="https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary">Custom
236      * vocabularies</a>.</p>
237      */
SetVocabularyFileUri(Aws::String && value)238     inline void SetVocabularyFileUri(Aws::String&& value) { m_vocabularyFileUriHasBeenSet = true; m_vocabularyFileUri = std::move(value); }
239 
240     /**
241      * <p>The S3 location of the text file that contains the definition of the custom
242      * vocabulary. The URI must be in the same region as the API endpoint that you are
243      * calling. The general form is:</p> <p>For more information about S3 object names,
244      * see <a
245      * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#object-keys">Object
246      * Keys</a> in the <i>Amazon S3 Developer Guide</i>.</p> <p>For more information
247      * about custom vocabularies, see <a
248      * href="https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary">Custom
249      * vocabularies</a>.</p>
250      */
SetVocabularyFileUri(const char * value)251     inline void SetVocabularyFileUri(const char* value) { m_vocabularyFileUriHasBeenSet = true; m_vocabularyFileUri.assign(value); }
252 
253     /**
254      * <p>The S3 location of the text file that contains the definition of the custom
255      * vocabulary. The URI must be in the same region as the API endpoint that you are
256      * calling. The general form is:</p> <p>For more information about S3 object names,
257      * see <a
258      * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#object-keys">Object
259      * Keys</a> in the <i>Amazon S3 Developer Guide</i>.</p> <p>For more information
260      * about custom vocabularies, see <a
261      * href="https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary">Custom
262      * vocabularies</a>.</p>
263      */
WithVocabularyFileUri(const Aws::String & value)264     inline CreateVocabularyRequest& WithVocabularyFileUri(const Aws::String& value) { SetVocabularyFileUri(value); return *this;}
265 
266     /**
267      * <p>The S3 location of the text file that contains the definition of the custom
268      * vocabulary. The URI must be in the same region as the API endpoint that you are
269      * calling. The general form is:</p> <p>For more information about S3 object names,
270      * see <a
271      * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#object-keys">Object
272      * Keys</a> in the <i>Amazon S3 Developer Guide</i>.</p> <p>For more information
273      * about custom vocabularies, see <a
274      * href="https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary">Custom
275      * vocabularies</a>.</p>
276      */
WithVocabularyFileUri(Aws::String && value)277     inline CreateVocabularyRequest& WithVocabularyFileUri(Aws::String&& value) { SetVocabularyFileUri(std::move(value)); return *this;}
278 
279     /**
280      * <p>The S3 location of the text file that contains the definition of the custom
281      * vocabulary. The URI must be in the same region as the API endpoint that you are
282      * calling. The general form is:</p> <p>For more information about S3 object names,
283      * see <a
284      * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#object-keys">Object
285      * Keys</a> in the <i>Amazon S3 Developer Guide</i>.</p> <p>For more information
286      * about custom vocabularies, see <a
287      * href="https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary">Custom
288      * vocabularies</a>.</p>
289      */
WithVocabularyFileUri(const char * value)290     inline CreateVocabularyRequest& WithVocabularyFileUri(const char* value) { SetVocabularyFileUri(value); return *this;}
291 
292 
293     /**
294      * <p>Adds one or more tags, each in the form of a key:value pair, to a new Amazon
295      * Transcribe vocabulary at the time you create this new vocabulary.</p>
296      */
GetTags()297     inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
298 
299     /**
300      * <p>Adds one or more tags, each in the form of a key:value pair, to a new Amazon
301      * Transcribe vocabulary at the time you create this new vocabulary.</p>
302      */
TagsHasBeenSet()303     inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
304 
305     /**
306      * <p>Adds one or more tags, each in the form of a key:value pair, to a new Amazon
307      * Transcribe vocabulary at the time you create this new vocabulary.</p>
308      */
SetTags(const Aws::Vector<Tag> & value)309     inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
310 
311     /**
312      * <p>Adds one or more tags, each in the form of a key:value pair, to a new Amazon
313      * Transcribe vocabulary at the time you create this new vocabulary.</p>
314      */
SetTags(Aws::Vector<Tag> && value)315     inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
316 
317     /**
318      * <p>Adds one or more tags, each in the form of a key:value pair, to a new Amazon
319      * Transcribe vocabulary at the time you create this new vocabulary.</p>
320      */
WithTags(const Aws::Vector<Tag> & value)321     inline CreateVocabularyRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
322 
323     /**
324      * <p>Adds one or more tags, each in the form of a key:value pair, to a new Amazon
325      * Transcribe vocabulary at the time you create this new vocabulary.</p>
326      */
WithTags(Aws::Vector<Tag> && value)327     inline CreateVocabularyRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
328 
329     /**
330      * <p>Adds one or more tags, each in the form of a key:value pair, to a new Amazon
331      * Transcribe vocabulary at the time you create this new vocabulary.</p>
332      */
AddTags(const Tag & value)333     inline CreateVocabularyRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
334 
335     /**
336      * <p>Adds one or more tags, each in the form of a key:value pair, to a new Amazon
337      * Transcribe vocabulary at the time you create this new vocabulary.</p>
338      */
AddTags(Tag && value)339     inline CreateVocabularyRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
340 
341   private:
342 
343     Aws::String m_vocabularyName;
344     bool m_vocabularyNameHasBeenSet;
345 
346     LanguageCode m_languageCode;
347     bool m_languageCodeHasBeenSet;
348 
349     Aws::Vector<Aws::String> m_phrases;
350     bool m_phrasesHasBeenSet;
351 
352     Aws::String m_vocabularyFileUri;
353     bool m_vocabularyFileUriHasBeenSet;
354 
355     Aws::Vector<Tag> m_tags;
356     bool m_tagsHasBeenSet;
357   };
358 
359 } // namespace Model
360 } // namespace TranscribeService
361 } // namespace Aws
362