aws_sdk_transcribe/operation/update_vocabulary/
_update_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 UpdateVocabularyOutput {
6    /// <p>The name of the updated 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 date and time the specified custom vocabulary was last updated.</p>
11    /// <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>
12    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
13    /// <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>
14    pub vocabulary_state: ::std::option::Option<crate::types::VocabularyState>,
15    _request_id: Option<String>,
16}
17impl UpdateVocabularyOutput {
18    /// <p>The name of the updated custom vocabulary.</p>
19    pub fn vocabulary_name(&self) -> ::std::option::Option<&str> {
20        self.vocabulary_name.as_deref()
21    }
22    /// <p>The language code you selected for your custom vocabulary.</p>
23    pub fn language_code(&self) -> ::std::option::Option<&crate::types::LanguageCode> {
24        self.language_code.as_ref()
25    }
26    /// <p>The date and time the specified custom vocabulary was last updated.</p>
27    /// <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>
28    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
29        self.last_modified_time.as_ref()
30    }
31    /// <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>
32    pub fn vocabulary_state(&self) -> ::std::option::Option<&crate::types::VocabularyState> {
33        self.vocabulary_state.as_ref()
34    }
35}
36impl ::aws_types::request_id::RequestId for UpdateVocabularyOutput {
37    fn request_id(&self) -> Option<&str> {
38        self._request_id.as_deref()
39    }
40}
41impl UpdateVocabularyOutput {
42    /// Creates a new builder-style object to manufacture [`UpdateVocabularyOutput`](crate::operation::update_vocabulary::UpdateVocabularyOutput).
43    pub fn builder() -> crate::operation::update_vocabulary::builders::UpdateVocabularyOutputBuilder {
44        crate::operation::update_vocabulary::builders::UpdateVocabularyOutputBuilder::default()
45    }
46}
47
48/// A builder for [`UpdateVocabularyOutput`](crate::operation::update_vocabulary::UpdateVocabularyOutput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct UpdateVocabularyOutputBuilder {
52    pub(crate) vocabulary_name: ::std::option::Option<::std::string::String>,
53    pub(crate) language_code: ::std::option::Option<crate::types::LanguageCode>,
54    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
55    pub(crate) vocabulary_state: ::std::option::Option<crate::types::VocabularyState>,
56    _request_id: Option<String>,
57}
58impl UpdateVocabularyOutputBuilder {
59    /// <p>The name of the updated custom vocabulary.</p>
60    pub fn vocabulary_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.vocabulary_name = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The name of the updated custom vocabulary.</p>
65    pub fn set_vocabulary_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.vocabulary_name = input;
67        self
68    }
69    /// <p>The name of the updated custom vocabulary.</p>
70    pub fn get_vocabulary_name(&self) -> &::std::option::Option<::std::string::String> {
71        &self.vocabulary_name
72    }
73    /// <p>The language code you selected for your custom vocabulary.</p>
74    pub fn language_code(mut self, input: crate::types::LanguageCode) -> Self {
75        self.language_code = ::std::option::Option::Some(input);
76        self
77    }
78    /// <p>The language code you selected for your custom vocabulary.</p>
79    pub fn set_language_code(mut self, input: ::std::option::Option<crate::types::LanguageCode>) -> Self {
80        self.language_code = input;
81        self
82    }
83    /// <p>The language code you selected for your custom vocabulary.</p>
84    pub fn get_language_code(&self) -> &::std::option::Option<crate::types::LanguageCode> {
85        &self.language_code
86    }
87    /// <p>The date and time the specified custom vocabulary was last updated.</p>
88    /// <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>
89    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
90        self.last_modified_time = ::std::option::Option::Some(input);
91        self
92    }
93    /// <p>The date and time the specified custom vocabulary was last updated.</p>
94    /// <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>
95    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
96        self.last_modified_time = input;
97        self
98    }
99    /// <p>The date and time the specified custom vocabulary was last updated.</p>
100    /// <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>
101    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
102        &self.last_modified_time
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 vocabulary_state(mut self, input: crate::types::VocabularyState) -> Self {
106        self.vocabulary_state = ::std::option::Option::Some(input);
107        self
108    }
109    /// <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>
110    pub fn set_vocabulary_state(mut self, input: ::std::option::Option<crate::types::VocabularyState>) -> Self {
111        self.vocabulary_state = input;
112        self
113    }
114    /// <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>
115    pub fn get_vocabulary_state(&self) -> &::std::option::Option<crate::types::VocabularyState> {
116        &self.vocabulary_state
117    }
118    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
119        self._request_id = Some(request_id.into());
120        self
121    }
122
123    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
124        self._request_id = request_id;
125        self
126    }
127    /// Consumes the builder and constructs a [`UpdateVocabularyOutput`](crate::operation::update_vocabulary::UpdateVocabularyOutput).
128    pub fn build(self) -> crate::operation::update_vocabulary::UpdateVocabularyOutput {
129        crate::operation::update_vocabulary::UpdateVocabularyOutput {
130            vocabulary_name: self.vocabulary_name,
131            language_code: self.language_code,
132            last_modified_time: self.last_modified_time,
133            vocabulary_state: self.vocabulary_state,
134            _request_id: self._request_id,
135        }
136    }
137}