aws_sdk_transcribe/operation/update_vocabulary/
_update_vocabulary_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateVocabularyOutput {
6 pub vocabulary_name: ::std::option::Option<::std::string::String>,
8 pub language_code: ::std::option::Option<crate::types::LanguageCode>,
10 pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
13 pub vocabulary_state: ::std::option::Option<crate::types::VocabularyState>,
15 _request_id: Option<String>,
16}
17impl UpdateVocabularyOutput {
18 pub fn vocabulary_name(&self) -> ::std::option::Option<&str> {
20 self.vocabulary_name.as_deref()
21 }
22 pub fn language_code(&self) -> ::std::option::Option<&crate::types::LanguageCode> {
24 self.language_code.as_ref()
25 }
26 pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
29 self.last_modified_time.as_ref()
30 }
31 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 pub fn builder() -> crate::operation::update_vocabulary::builders::UpdateVocabularyOutputBuilder {
44 crate::operation::update_vocabulary::builders::UpdateVocabularyOutputBuilder::default()
45 }
46}
47
48#[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 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 pub fn set_vocabulary_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.vocabulary_name = input;
67 self
68 }
69 pub fn get_vocabulary_name(&self) -> &::std::option::Option<::std::string::String> {
71 &self.vocabulary_name
72 }
73 pub fn language_code(mut self, input: crate::types::LanguageCode) -> Self {
75 self.language_code = ::std::option::Option::Some(input);
76 self
77 }
78 pub fn set_language_code(mut self, input: ::std::option::Option<crate::types::LanguageCode>) -> Self {
80 self.language_code = input;
81 self
82 }
83 pub fn get_language_code(&self) -> &::std::option::Option<crate::types::LanguageCode> {
85 &self.language_code
86 }
87 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 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 pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
102 &self.last_modified_time
103 }
104 pub fn vocabulary_state(mut self, input: crate::types::VocabularyState) -> Self {
106 self.vocabulary_state = ::std::option::Option::Some(input);
107 self
108 }
109 pub fn set_vocabulary_state(mut self, input: ::std::option::Option<crate::types::VocabularyState>) -> Self {
111 self.vocabulary_state = input;
112 self
113 }
114 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 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}