aws_sdk_kendra/operation/describe_faq/
_describe_faq_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 DescribeFaqOutput {
6    /// <p>The identifier of the FAQ.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <p>The identifier of the index for the FAQ.</p>
9    pub index_id: ::std::option::Option<::std::string::String>,
10    /// <p>The name that you gave the FAQ when it was created.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>The description of the FAQ that you provided when it was created.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The Unix timestamp when the FAQ was created.</p>
15    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
16    /// <p>The Unix timestamp when the FAQ was last updated.</p>
17    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
18    /// <p>Information required to find a specific file in an Amazon S3 bucket.</p>
19    pub s3_path: ::std::option::Option<crate::types::S3Path>,
20    /// <p>The status of the FAQ. It is ready to use when the status is <code>ACTIVE</code>.</p>
21    pub status: ::std::option::Option<crate::types::FaqStatus>,
22    /// <p>The Amazon Resource Name (ARN) of the IAM role that provides access to the S3 bucket containing the FAQ file.</p>
23    pub role_arn: ::std::option::Option<::std::string::String>,
24    /// <p>If the <code>Status</code> field is <code>FAILED</code>, the <code>ErrorMessage</code> field contains the reason why the FAQ failed.</p>
25    pub error_message: ::std::option::Option<::std::string::String>,
26    /// <p>The file format used for the FAQ file.</p>
27    pub file_format: ::std::option::Option<crate::types::FaqFileFormat>,
28    /// <p>The code for a language. This shows a supported language for the FAQ document. English is supported by default. For more information on supported languages, including their codes, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html">Adding documents in languages other than English</a>.</p>
29    pub language_code: ::std::option::Option<::std::string::String>,
30    _request_id: Option<String>,
31}
32impl DescribeFaqOutput {
33    /// <p>The identifier of the FAQ.</p>
34    pub fn id(&self) -> ::std::option::Option<&str> {
35        self.id.as_deref()
36    }
37    /// <p>The identifier of the index for the FAQ.</p>
38    pub fn index_id(&self) -> ::std::option::Option<&str> {
39        self.index_id.as_deref()
40    }
41    /// <p>The name that you gave the FAQ when it was created.</p>
42    pub fn name(&self) -> ::std::option::Option<&str> {
43        self.name.as_deref()
44    }
45    /// <p>The description of the FAQ that you provided when it was created.</p>
46    pub fn description(&self) -> ::std::option::Option<&str> {
47        self.description.as_deref()
48    }
49    /// <p>The Unix timestamp when the FAQ was created.</p>
50    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
51        self.created_at.as_ref()
52    }
53    /// <p>The Unix timestamp when the FAQ was last updated.</p>
54    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
55        self.updated_at.as_ref()
56    }
57    /// <p>Information required to find a specific file in an Amazon S3 bucket.</p>
58    pub fn s3_path(&self) -> ::std::option::Option<&crate::types::S3Path> {
59        self.s3_path.as_ref()
60    }
61    /// <p>The status of the FAQ. It is ready to use when the status is <code>ACTIVE</code>.</p>
62    pub fn status(&self) -> ::std::option::Option<&crate::types::FaqStatus> {
63        self.status.as_ref()
64    }
65    /// <p>The Amazon Resource Name (ARN) of the IAM role that provides access to the S3 bucket containing the FAQ file.</p>
66    pub fn role_arn(&self) -> ::std::option::Option<&str> {
67        self.role_arn.as_deref()
68    }
69    /// <p>If the <code>Status</code> field is <code>FAILED</code>, the <code>ErrorMessage</code> field contains the reason why the FAQ failed.</p>
70    pub fn error_message(&self) -> ::std::option::Option<&str> {
71        self.error_message.as_deref()
72    }
73    /// <p>The file format used for the FAQ file.</p>
74    pub fn file_format(&self) -> ::std::option::Option<&crate::types::FaqFileFormat> {
75        self.file_format.as_ref()
76    }
77    /// <p>The code for a language. This shows a supported language for the FAQ document. English is supported by default. For more information on supported languages, including their codes, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html">Adding documents in languages other than English</a>.</p>
78    pub fn language_code(&self) -> ::std::option::Option<&str> {
79        self.language_code.as_deref()
80    }
81}
82impl ::aws_types::request_id::RequestId for DescribeFaqOutput {
83    fn request_id(&self) -> Option<&str> {
84        self._request_id.as_deref()
85    }
86}
87impl DescribeFaqOutput {
88    /// Creates a new builder-style object to manufacture [`DescribeFaqOutput`](crate::operation::describe_faq::DescribeFaqOutput).
89    pub fn builder() -> crate::operation::describe_faq::builders::DescribeFaqOutputBuilder {
90        crate::operation::describe_faq::builders::DescribeFaqOutputBuilder::default()
91    }
92}
93
94/// A builder for [`DescribeFaqOutput`](crate::operation::describe_faq::DescribeFaqOutput).
95#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
96#[non_exhaustive]
97pub struct DescribeFaqOutputBuilder {
98    pub(crate) id: ::std::option::Option<::std::string::String>,
99    pub(crate) index_id: ::std::option::Option<::std::string::String>,
100    pub(crate) name: ::std::option::Option<::std::string::String>,
101    pub(crate) description: ::std::option::Option<::std::string::String>,
102    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
103    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
104    pub(crate) s3_path: ::std::option::Option<crate::types::S3Path>,
105    pub(crate) status: ::std::option::Option<crate::types::FaqStatus>,
106    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
107    pub(crate) error_message: ::std::option::Option<::std::string::String>,
108    pub(crate) file_format: ::std::option::Option<crate::types::FaqFileFormat>,
109    pub(crate) language_code: ::std::option::Option<::std::string::String>,
110    _request_id: Option<String>,
111}
112impl DescribeFaqOutputBuilder {
113    /// <p>The identifier of the FAQ.</p>
114    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.id = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>The identifier of the FAQ.</p>
119    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.id = input;
121        self
122    }
123    /// <p>The identifier of the FAQ.</p>
124    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
125        &self.id
126    }
127    /// <p>The identifier of the index for the FAQ.</p>
128    pub fn index_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.index_id = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>The identifier of the index for the FAQ.</p>
133    pub fn set_index_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.index_id = input;
135        self
136    }
137    /// <p>The identifier of the index for the FAQ.</p>
138    pub fn get_index_id(&self) -> &::std::option::Option<::std::string::String> {
139        &self.index_id
140    }
141    /// <p>The name that you gave the FAQ when it was created.</p>
142    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.name = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <p>The name that you gave the FAQ when it was created.</p>
147    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.name = input;
149        self
150    }
151    /// <p>The name that you gave the FAQ when it was created.</p>
152    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
153        &self.name
154    }
155    /// <p>The description of the FAQ that you provided when it was created.</p>
156    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157        self.description = ::std::option::Option::Some(input.into());
158        self
159    }
160    /// <p>The description of the FAQ that you provided when it was created.</p>
161    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162        self.description = input;
163        self
164    }
165    /// <p>The description of the FAQ that you provided when it was created.</p>
166    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
167        &self.description
168    }
169    /// <p>The Unix timestamp when the FAQ was created.</p>
170    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
171        self.created_at = ::std::option::Option::Some(input);
172        self
173    }
174    /// <p>The Unix timestamp when the FAQ was created.</p>
175    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
176        self.created_at = input;
177        self
178    }
179    /// <p>The Unix timestamp when the FAQ was created.</p>
180    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
181        &self.created_at
182    }
183    /// <p>The Unix timestamp when the FAQ was last updated.</p>
184    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
185        self.updated_at = ::std::option::Option::Some(input);
186        self
187    }
188    /// <p>The Unix timestamp when the FAQ was last updated.</p>
189    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
190        self.updated_at = input;
191        self
192    }
193    /// <p>The Unix timestamp when the FAQ was last updated.</p>
194    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
195        &self.updated_at
196    }
197    /// <p>Information required to find a specific file in an Amazon S3 bucket.</p>
198    pub fn s3_path(mut self, input: crate::types::S3Path) -> Self {
199        self.s3_path = ::std::option::Option::Some(input);
200        self
201    }
202    /// <p>Information required to find a specific file in an Amazon S3 bucket.</p>
203    pub fn set_s3_path(mut self, input: ::std::option::Option<crate::types::S3Path>) -> Self {
204        self.s3_path = input;
205        self
206    }
207    /// <p>Information required to find a specific file in an Amazon S3 bucket.</p>
208    pub fn get_s3_path(&self) -> &::std::option::Option<crate::types::S3Path> {
209        &self.s3_path
210    }
211    /// <p>The status of the FAQ. It is ready to use when the status is <code>ACTIVE</code>.</p>
212    pub fn status(mut self, input: crate::types::FaqStatus) -> Self {
213        self.status = ::std::option::Option::Some(input);
214        self
215    }
216    /// <p>The status of the FAQ. It is ready to use when the status is <code>ACTIVE</code>.</p>
217    pub fn set_status(mut self, input: ::std::option::Option<crate::types::FaqStatus>) -> Self {
218        self.status = input;
219        self
220    }
221    /// <p>The status of the FAQ. It is ready to use when the status is <code>ACTIVE</code>.</p>
222    pub fn get_status(&self) -> &::std::option::Option<crate::types::FaqStatus> {
223        &self.status
224    }
225    /// <p>The Amazon Resource Name (ARN) of the IAM role that provides access to the S3 bucket containing the FAQ file.</p>
226    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
227        self.role_arn = ::std::option::Option::Some(input.into());
228        self
229    }
230    /// <p>The Amazon Resource Name (ARN) of the IAM role that provides access to the S3 bucket containing the FAQ file.</p>
231    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
232        self.role_arn = input;
233        self
234    }
235    /// <p>The Amazon Resource Name (ARN) of the IAM role that provides access to the S3 bucket containing the FAQ file.</p>
236    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
237        &self.role_arn
238    }
239    /// <p>If the <code>Status</code> field is <code>FAILED</code>, the <code>ErrorMessage</code> field contains the reason why the FAQ failed.</p>
240    pub fn error_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
241        self.error_message = ::std::option::Option::Some(input.into());
242        self
243    }
244    /// <p>If the <code>Status</code> field is <code>FAILED</code>, the <code>ErrorMessage</code> field contains the reason why the FAQ failed.</p>
245    pub fn set_error_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
246        self.error_message = input;
247        self
248    }
249    /// <p>If the <code>Status</code> field is <code>FAILED</code>, the <code>ErrorMessage</code> field contains the reason why the FAQ failed.</p>
250    pub fn get_error_message(&self) -> &::std::option::Option<::std::string::String> {
251        &self.error_message
252    }
253    /// <p>The file format used for the FAQ file.</p>
254    pub fn file_format(mut self, input: crate::types::FaqFileFormat) -> Self {
255        self.file_format = ::std::option::Option::Some(input);
256        self
257    }
258    /// <p>The file format used for the FAQ file.</p>
259    pub fn set_file_format(mut self, input: ::std::option::Option<crate::types::FaqFileFormat>) -> Self {
260        self.file_format = input;
261        self
262    }
263    /// <p>The file format used for the FAQ file.</p>
264    pub fn get_file_format(&self) -> &::std::option::Option<crate::types::FaqFileFormat> {
265        &self.file_format
266    }
267    /// <p>The code for a language. This shows a supported language for the FAQ document. English is supported by default. For more information on supported languages, including their codes, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html">Adding documents in languages other than English</a>.</p>
268    pub fn language_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
269        self.language_code = ::std::option::Option::Some(input.into());
270        self
271    }
272    /// <p>The code for a language. This shows a supported language for the FAQ document. English is supported by default. For more information on supported languages, including their codes, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html">Adding documents in languages other than English</a>.</p>
273    pub fn set_language_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
274        self.language_code = input;
275        self
276    }
277    /// <p>The code for a language. This shows a supported language for the FAQ document. English is supported by default. For more information on supported languages, including their codes, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html">Adding documents in languages other than English</a>.</p>
278    pub fn get_language_code(&self) -> &::std::option::Option<::std::string::String> {
279        &self.language_code
280    }
281    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
282        self._request_id = Some(request_id.into());
283        self
284    }
285
286    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
287        self._request_id = request_id;
288        self
289    }
290    /// Consumes the builder and constructs a [`DescribeFaqOutput`](crate::operation::describe_faq::DescribeFaqOutput).
291    pub fn build(self) -> crate::operation::describe_faq::DescribeFaqOutput {
292        crate::operation::describe_faq::DescribeFaqOutput {
293            id: self.id,
294            index_id: self.index_id,
295            name: self.name,
296            description: self.description,
297            created_at: self.created_at,
298            updated_at: self.updated_at,
299            s3_path: self.s3_path,
300            status: self.status,
301            role_arn: self.role_arn,
302            error_message: self.error_message,
303            file_format: self.file_format,
304            language_code: self.language_code,
305            _request_id: self._request_id,
306        }
307    }
308}