aws_sdk_transcribe/operation/get_vocabulary/
_get_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 GetVocabularyOutput {
6    /// <p>The name of the custom vocabulary you requested information about.</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 the specified custom vocabulary was last modified.</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    /// <p>The Amazon S3 location where the custom vocabulary is stored; use this URI to view or download the custom vocabulary.</p>
18    pub download_uri: ::std::option::Option<::std::string::String>,
19    _request_id: Option<String>,
20}
21impl GetVocabularyOutput {
22    /// <p>The name of the custom vocabulary you requested information about.</p>
23    pub fn vocabulary_name(&self) -> ::std::option::Option<&str> {
24        self.vocabulary_name.as_deref()
25    }
26    /// <p>The language code you selected for your custom vocabulary.</p>
27    pub fn language_code(&self) -> ::std::option::Option<&crate::types::LanguageCode> {
28        self.language_code.as_ref()
29    }
30    /// <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>
31    pub fn vocabulary_state(&self) -> ::std::option::Option<&crate::types::VocabularyState> {
32        self.vocabulary_state.as_ref()
33    }
34    /// <p>The date and time the specified custom vocabulary was last modified.</p>
35    /// <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>
36    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
37        self.last_modified_time.as_ref()
38    }
39    /// <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>
40    pub fn failure_reason(&self) -> ::std::option::Option<&str> {
41        self.failure_reason.as_deref()
42    }
43    /// <p>The Amazon S3 location where the custom vocabulary is stored; use this URI to view or download the custom vocabulary.</p>
44    pub fn download_uri(&self) -> ::std::option::Option<&str> {
45        self.download_uri.as_deref()
46    }
47}
48impl ::aws_types::request_id::RequestId for GetVocabularyOutput {
49    fn request_id(&self) -> Option<&str> {
50        self._request_id.as_deref()
51    }
52}
53impl GetVocabularyOutput {
54    /// Creates a new builder-style object to manufacture [`GetVocabularyOutput`](crate::operation::get_vocabulary::GetVocabularyOutput).
55    pub fn builder() -> crate::operation::get_vocabulary::builders::GetVocabularyOutputBuilder {
56        crate::operation::get_vocabulary::builders::GetVocabularyOutputBuilder::default()
57    }
58}
59
60/// A builder for [`GetVocabularyOutput`](crate::operation::get_vocabulary::GetVocabularyOutput).
61#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
62#[non_exhaustive]
63pub struct GetVocabularyOutputBuilder {
64    pub(crate) vocabulary_name: ::std::option::Option<::std::string::String>,
65    pub(crate) language_code: ::std::option::Option<crate::types::LanguageCode>,
66    pub(crate) vocabulary_state: ::std::option::Option<crate::types::VocabularyState>,
67    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
68    pub(crate) failure_reason: ::std::option::Option<::std::string::String>,
69    pub(crate) download_uri: ::std::option::Option<::std::string::String>,
70    _request_id: Option<String>,
71}
72impl GetVocabularyOutputBuilder {
73    /// <p>The name of the custom vocabulary you requested information about.</p>
74    pub fn vocabulary_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.vocabulary_name = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The name of the custom vocabulary you requested information about.</p>
79    pub fn set_vocabulary_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.vocabulary_name = input;
81        self
82    }
83    /// <p>The name of the custom vocabulary you requested information about.</p>
84    pub fn get_vocabulary_name(&self) -> &::std::option::Option<::std::string::String> {
85        &self.vocabulary_name
86    }
87    /// <p>The language code you selected for your custom vocabulary.</p>
88    pub fn language_code(mut self, input: crate::types::LanguageCode) -> Self {
89        self.language_code = ::std::option::Option::Some(input);
90        self
91    }
92    /// <p>The language code you selected for your custom vocabulary.</p>
93    pub fn set_language_code(mut self, input: ::std::option::Option<crate::types::LanguageCode>) -> Self {
94        self.language_code = input;
95        self
96    }
97    /// <p>The language code you selected for your custom vocabulary.</p>
98    pub fn get_language_code(&self) -> &::std::option::Option<crate::types::LanguageCode> {
99        &self.language_code
100    }
101    /// <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>
102    pub fn vocabulary_state(mut self, input: crate::types::VocabularyState) -> Self {
103        self.vocabulary_state = ::std::option::Option::Some(input);
104        self
105    }
106    /// <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>
107    pub fn set_vocabulary_state(mut self, input: ::std::option::Option<crate::types::VocabularyState>) -> Self {
108        self.vocabulary_state = input;
109        self
110    }
111    /// <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>
112    pub fn get_vocabulary_state(&self) -> &::std::option::Option<crate::types::VocabularyState> {
113        &self.vocabulary_state
114    }
115    /// <p>The date and time the specified custom vocabulary was last modified.</p>
116    /// <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>
117    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
118        self.last_modified_time = ::std::option::Option::Some(input);
119        self
120    }
121    /// <p>The date and time the specified custom vocabulary was last modified.</p>
122    /// <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>
123    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
124        self.last_modified_time = input;
125        self
126    }
127    /// <p>The date and time the specified custom vocabulary was last modified.</p>
128    /// <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>
129    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
130        &self.last_modified_time
131    }
132    /// <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>
133    pub fn failure_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134        self.failure_reason = ::std::option::Option::Some(input.into());
135        self
136    }
137    /// <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>
138    pub fn set_failure_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139        self.failure_reason = input;
140        self
141    }
142    /// <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>
143    pub fn get_failure_reason(&self) -> &::std::option::Option<::std::string::String> {
144        &self.failure_reason
145    }
146    /// <p>The Amazon S3 location where the custom vocabulary is stored; use this URI to view or download the custom vocabulary.</p>
147    pub fn download_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148        self.download_uri = ::std::option::Option::Some(input.into());
149        self
150    }
151    /// <p>The Amazon S3 location where the custom vocabulary is stored; use this URI to view or download the custom vocabulary.</p>
152    pub fn set_download_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153        self.download_uri = input;
154        self
155    }
156    /// <p>The Amazon S3 location where the custom vocabulary is stored; use this URI to view or download the custom vocabulary.</p>
157    pub fn get_download_uri(&self) -> &::std::option::Option<::std::string::String> {
158        &self.download_uri
159    }
160    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
161        self._request_id = Some(request_id.into());
162        self
163    }
164
165    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
166        self._request_id = request_id;
167        self
168    }
169    /// Consumes the builder and constructs a [`GetVocabularyOutput`](crate::operation::get_vocabulary::GetVocabularyOutput).
170    pub fn build(self) -> crate::operation::get_vocabulary::GetVocabularyOutput {
171        crate::operation::get_vocabulary::GetVocabularyOutput {
172            vocabulary_name: self.vocabulary_name,
173            language_code: self.language_code,
174            vocabulary_state: self.vocabulary_state,
175            last_modified_time: self.last_modified_time,
176            failure_reason: self.failure_reason,
177            download_uri: self.download_uri,
178            _request_id: self._request_id,
179        }
180    }
181}