aws_sdk_transcribe/operation/create_vocabulary/
_create_vocabulary_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateVocabularyOutput {
6    /// <p>The name you chose for your custom vocabulary.</p>
7    pub vocabulary_name: ::std::option::Option<::std::string::String>,
8    /// <p>The language code you selected for your custom vocabulary.</p>
9    pub language_code: ::std::option::Option<crate::types::LanguageCode>,
10    /// <p>The processing state of your custom vocabulary. If the state is <code>READY</code>, you can use the custom vocabulary in a <code>StartTranscriptionJob</code> request.</p>
11    pub vocabulary_state: ::std::option::Option<crate::types::VocabularyState>,
12    /// <p>The date and time you created your custom vocabulary.</p>
13    /// <p>Timestamps are in the format <code>YYYY-MM-DD'T'HH:MM:SS.SSSSSS-UTC</code>. For example, <code>2022-05-04T12:32:58.761000-07:00</code> represents 12:32 PM UTC-7 on May 4, 2022.</p>
14    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
15    /// <p>If <code>VocabularyState</code> is <code>FAILED</code>, <code>FailureReason</code> contains information about why the custom vocabulary request failed. See also: <a href="https://docs.aws.amazon.com/transcribe/latest/APIReference/CommonErrors.html">Common Errors</a>.</p>
16    pub failure_reason: ::std::option::Option<::std::string::String>,
17    _request_id: Option<String>,
18}
19impl CreateVocabularyOutput {
20    /// <p>The name you chose for your custom vocabulary.</p>
21    pub fn vocabulary_name(&self) -> ::std::option::Option<&str> {
22        self.vocabulary_name.as_deref()
23    }
24    /// <p>The language code you selected for your custom vocabulary.</p>
25    pub fn language_code(&self) -> ::std::option::Option<&crate::types::LanguageCode> {
26        self.language_code.as_ref()
27    }
28    /// <p>The processing state of your custom vocabulary. If the state is <code>READY</code>, you can use the custom vocabulary in a <code>StartTranscriptionJob</code> request.</p>
29    pub fn vocabulary_state(&self) -> ::std::option::Option<&crate::types::VocabularyState> {
30        self.vocabulary_state.as_ref()
31    }
32    /// <p>The date and time you created your custom vocabulary.</p>
33    /// <p>Timestamps are in the format <code>YYYY-MM-DD'T'HH:MM:SS.SSSSSS-UTC</code>. For example, <code>2022-05-04T12:32:58.761000-07:00</code> represents 12:32 PM UTC-7 on May 4, 2022.</p>
34    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
35        self.last_modified_time.as_ref()
36    }
37    /// <p>If <code>VocabularyState</code> is <code>FAILED</code>, <code>FailureReason</code> contains information about why the custom vocabulary request failed. See also: <a href="https://docs.aws.amazon.com/transcribe/latest/APIReference/CommonErrors.html">Common Errors</a>.</p>
38    pub fn failure_reason(&self) -> ::std::option::Option<&str> {
39        self.failure_reason.as_deref()
40    }
41}
42impl ::aws_types::request_id::RequestId for CreateVocabularyOutput {
43    fn request_id(&self) -> Option<&str> {
44        self._request_id.as_deref()
45    }
46}
47impl CreateVocabularyOutput {
48    /// Creates a new builder-style object to manufacture [`CreateVocabularyOutput`](crate::operation::create_vocabulary::CreateVocabularyOutput).
49    pub fn builder() -> crate::operation::create_vocabulary::builders::CreateVocabularyOutputBuilder {
50        crate::operation::create_vocabulary::builders::CreateVocabularyOutputBuilder::default()
51    }
52}
53
54/// A builder for [`CreateVocabularyOutput`](crate::operation::create_vocabulary::CreateVocabularyOutput).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct CreateVocabularyOutputBuilder {
58    pub(crate) vocabulary_name: ::std::option::Option<::std::string::String>,
59    pub(crate) language_code: ::std::option::Option<crate::types::LanguageCode>,
60    pub(crate) vocabulary_state: ::std::option::Option<crate::types::VocabularyState>,
61    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
62    pub(crate) failure_reason: ::std::option::Option<::std::string::String>,
63    _request_id: Option<String>,
64}
65impl CreateVocabularyOutputBuilder {
66    /// <p>The name you chose for your custom vocabulary.</p>
67    pub fn vocabulary_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.vocabulary_name = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The name you chose for your custom vocabulary.</p>
72    pub fn set_vocabulary_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.vocabulary_name = input;
74        self
75    }
76    /// <p>The name you chose for your custom vocabulary.</p>
77    pub fn get_vocabulary_name(&self) -> &::std::option::Option<::std::string::String> {
78        &self.vocabulary_name
79    }
80    /// <p>The language code you selected for your custom vocabulary.</p>
81    pub fn language_code(mut self, input: crate::types::LanguageCode) -> Self {
82        self.language_code = ::std::option::Option::Some(input);
83        self
84    }
85    /// <p>The language code you selected for your custom vocabulary.</p>
86    pub fn set_language_code(mut self, input: ::std::option::Option<crate::types::LanguageCode>) -> Self {
87        self.language_code = input;
88        self
89    }
90    /// <p>The language code you selected for your custom vocabulary.</p>
91    pub fn get_language_code(&self) -> &::std::option::Option<crate::types::LanguageCode> {
92        &self.language_code
93    }
94    /// <p>The processing state of your custom vocabulary. If the state is <code>READY</code>, you can use the custom vocabulary in a <code>StartTranscriptionJob</code> request.</p>
95    pub fn vocabulary_state(mut self, input: crate::types::VocabularyState) -> Self {
96        self.vocabulary_state = ::std::option::Option::Some(input);
97        self
98    }
99    /// <p>The processing state of your custom vocabulary. If the state is <code>READY</code>, you can use the custom vocabulary in a <code>StartTranscriptionJob</code> request.</p>
100    pub fn set_vocabulary_state(mut self, input: ::std::option::Option<crate::types::VocabularyState>) -> Self {
101        self.vocabulary_state = input;
102        self
103    }
104    /// <p>The processing state of your custom vocabulary. If the state is <code>READY</code>, you can use the custom vocabulary in a <code>StartTranscriptionJob</code> request.</p>
105    pub fn get_vocabulary_state(&self) -> &::std::option::Option<crate::types::VocabularyState> {
106        &self.vocabulary_state
107    }
108    /// <p>The date and time you created your custom vocabulary.</p>
109    /// <p>Timestamps are in the format <code>YYYY-MM-DD'T'HH:MM:SS.SSSSSS-UTC</code>. For example, <code>2022-05-04T12:32:58.761000-07:00</code> represents 12:32 PM UTC-7 on May 4, 2022.</p>
110    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
111        self.last_modified_time = ::std::option::Option::Some(input);
112        self
113    }
114    /// <p>The date and time you created your custom vocabulary.</p>
115    /// <p>Timestamps are in the format <code>YYYY-MM-DD'T'HH:MM:SS.SSSSSS-UTC</code>. For example, <code>2022-05-04T12:32:58.761000-07:00</code> represents 12:32 PM UTC-7 on May 4, 2022.</p>
116    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
117        self.last_modified_time = input;
118        self
119    }
120    /// <p>The date and time you created your custom vocabulary.</p>
121    /// <p>Timestamps are in the format <code>YYYY-MM-DD'T'HH:MM:SS.SSSSSS-UTC</code>. For example, <code>2022-05-04T12:32:58.761000-07:00</code> represents 12:32 PM UTC-7 on May 4, 2022.</p>
122    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
123        &self.last_modified_time
124    }
125    /// <p>If <code>VocabularyState</code> is <code>FAILED</code>, <code>FailureReason</code> contains information about why the custom vocabulary request failed. See also: <a href="https://docs.aws.amazon.com/transcribe/latest/APIReference/CommonErrors.html">Common Errors</a>.</p>
126    pub fn failure_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.failure_reason = ::std::option::Option::Some(input.into());
128        self
129    }
130    /// <p>If <code>VocabularyState</code> is <code>FAILED</code>, <code>FailureReason</code> contains information about why the custom vocabulary request failed. See also: <a href="https://docs.aws.amazon.com/transcribe/latest/APIReference/CommonErrors.html">Common Errors</a>.</p>
131    pub fn set_failure_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.failure_reason = input;
133        self
134    }
135    /// <p>If <code>VocabularyState</code> is <code>FAILED</code>, <code>FailureReason</code> contains information about why the custom vocabulary request failed. See also: <a href="https://docs.aws.amazon.com/transcribe/latest/APIReference/CommonErrors.html">Common Errors</a>.</p>
136    pub fn get_failure_reason(&self) -> &::std::option::Option<::std::string::String> {
137        &self.failure_reason
138    }
139    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
140        self._request_id = Some(request_id.into());
141        self
142    }
143
144    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
145        self._request_id = request_id;
146        self
147    }
148    /// Consumes the builder and constructs a [`CreateVocabularyOutput`](crate::operation::create_vocabulary::CreateVocabularyOutput).
149    pub fn build(self) -> crate::operation::create_vocabulary::CreateVocabularyOutput {
150        crate::operation::create_vocabulary::CreateVocabularyOutput {
151            vocabulary_name: self.vocabulary_name,
152            language_code: self.language_code,
153            vocabulary_state: self.vocabulary_state,
154            last_modified_time: self.last_modified_time,
155            failure_reason: self.failure_reason,
156            _request_id: self._request_id,
157        }
158    }
159}