1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Provides information about the status of documents submitted for indexing.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Status {
/// <p>The identifier of the document.</p>
pub document_id: ::std::option::Option<::std::string::String>,
/// <p>The current status of a document.</p>
/// <p>If the document was submitted for deletion, the status is <code>NOT_FOUND</code> after the document is deleted.</p>
pub document_status: ::std::option::Option<crate::types::DocumentStatus>,
/// <p>Indicates the source of the error.</p>
pub failure_code: ::std::option::Option<::std::string::String>,
/// <p>Provides detailed information about why the document couldn't be indexed. Use this information to correct the error before you resubmit the document for indexing.</p>
pub failure_reason: ::std::option::Option<::std::string::String>,
}
impl Status {
/// <p>The identifier of the document.</p>
pub fn document_id(&self) -> ::std::option::Option<&str> {
self.document_id.as_deref()
}
/// <p>The current status of a document.</p>
/// <p>If the document was submitted for deletion, the status is <code>NOT_FOUND</code> after the document is deleted.</p>
pub fn document_status(&self) -> ::std::option::Option<&crate::types::DocumentStatus> {
self.document_status.as_ref()
}
/// <p>Indicates the source of the error.</p>
pub fn failure_code(&self) -> ::std::option::Option<&str> {
self.failure_code.as_deref()
}
/// <p>Provides detailed information about why the document couldn't be indexed. Use this information to correct the error before you resubmit the document for indexing.</p>
pub fn failure_reason(&self) -> ::std::option::Option<&str> {
self.failure_reason.as_deref()
}
}
impl Status {
/// Creates a new builder-style object to manufacture [`Status`](crate::types::Status).
pub fn builder() -> crate::types::builders::StatusBuilder {
crate::types::builders::StatusBuilder::default()
}
}
/// A builder for [`Status`](crate::types::Status).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StatusBuilder {
pub(crate) document_id: ::std::option::Option<::std::string::String>,
pub(crate) document_status: ::std::option::Option<crate::types::DocumentStatus>,
pub(crate) failure_code: ::std::option::Option<::std::string::String>,
pub(crate) failure_reason: ::std::option::Option<::std::string::String>,
}
impl StatusBuilder {
/// <p>The identifier of the document.</p>
pub fn document_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.document_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the document.</p>
pub fn set_document_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.document_id = input;
self
}
/// <p>The identifier of the document.</p>
pub fn get_document_id(&self) -> &::std::option::Option<::std::string::String> {
&self.document_id
}
/// <p>The current status of a document.</p>
/// <p>If the document was submitted for deletion, the status is <code>NOT_FOUND</code> after the document is deleted.</p>
pub fn document_status(mut self, input: crate::types::DocumentStatus) -> Self {
self.document_status = ::std::option::Option::Some(input);
self
}
/// <p>The current status of a document.</p>
/// <p>If the document was submitted for deletion, the status is <code>NOT_FOUND</code> after the document is deleted.</p>
pub fn set_document_status(mut self, input: ::std::option::Option<crate::types::DocumentStatus>) -> Self {
self.document_status = input;
self
}
/// <p>The current status of a document.</p>
/// <p>If the document was submitted for deletion, the status is <code>NOT_FOUND</code> after the document is deleted.</p>
pub fn get_document_status(&self) -> &::std::option::Option<crate::types::DocumentStatus> {
&self.document_status
}
/// <p>Indicates the source of the error.</p>
pub fn failure_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.failure_code = ::std::option::Option::Some(input.into());
self
}
/// <p>Indicates the source of the error.</p>
pub fn set_failure_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.failure_code = input;
self
}
/// <p>Indicates the source of the error.</p>
pub fn get_failure_code(&self) -> &::std::option::Option<::std::string::String> {
&self.failure_code
}
/// <p>Provides detailed information about why the document couldn't be indexed. Use this information to correct the error before you resubmit the document for indexing.</p>
pub fn failure_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.failure_reason = ::std::option::Option::Some(input.into());
self
}
/// <p>Provides detailed information about why the document couldn't be indexed. Use this information to correct the error before you resubmit the document for indexing.</p>
pub fn set_failure_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.failure_reason = input;
self
}
/// <p>Provides detailed information about why the document couldn't be indexed. Use this information to correct the error before you resubmit the document for indexing.</p>
pub fn get_failure_reason(&self) -> &::std::option::Option<::std::string::String> {
&self.failure_reason
}
/// Consumes the builder and constructs a [`Status`](crate::types::Status).
pub fn build(self) -> crate::types::Status {
crate::types::Status {
document_id: self.document_id,
document_status: self.document_status,
failure_code: self.failure_code,
failure_reason: self.failure_reason,
}
}
}