1#[non_exhaustive]
4#[derive(std::clone::Clone, std::cmp::PartialEq)]
5pub struct PutEntry {
6 pub key: std::option::Option<std::string::String>,
8 #[allow(missing_docs)] pub value: std::option::Option<aws_smithy_types::Document>,
10}
11impl PutEntry {
12 pub fn key(&self) -> std::option::Option<&str> {
14 self.key.as_deref()
15 }
16 #[allow(missing_docs)] pub fn value(&self) -> std::option::Option<&aws_smithy_types::Document> {
18 self.value.as_ref()
19 }
20}
21impl std::fmt::Debug for PutEntry {
22 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23 let mut formatter = f.debug_struct("PutEntry");
24 formatter.field("key", &self.key);
25 formatter.field("value", &self.value);
26 formatter.finish()
27 }
28}
29pub mod put_entry {
31 #[non_exhaustive]
33 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
34 pub struct Builder {
35 pub(crate) key: std::option::Option<std::string::String>,
36 pub(crate) value: std::option::Option<aws_smithy_types::Document>,
37 }
38 impl Builder {
39 pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
41 self.key = Some(input.into());
42 self
43 }
44 pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
46 self.key = input;
47 self
48 }
49 #[allow(missing_docs)] pub fn value(mut self, input: aws_smithy_types::Document) -> Self {
51 self.value = Some(input);
52 self
53 }
54 #[allow(missing_docs)] pub fn set_value(mut self, input: std::option::Option<aws_smithy_types::Document>) -> Self {
56 self.value = input;
57 self
58 }
59 pub fn build(self) -> crate::model::PutEntry {
61 crate::model::PutEntry {
62 key: self.key,
63 value: self.value,
64 }
65 }
66 }
67}
68impl PutEntry {
69 pub fn builder() -> crate::model::put_entry::Builder {
71 crate::model::put_entry::Builder::default()
72 }
73}
74
75#[non_exhaustive]
77#[derive(std::clone::Clone, std::cmp::PartialEq)]
78pub struct WatchResponse {
79 pub index: std::option::Option<std::string::String>,
81}
82impl WatchResponse {
83 pub fn index(&self) -> std::option::Option<&str> {
85 self.index.as_deref()
86 }
87}
88impl std::fmt::Debug for WatchResponse {
89 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
90 let mut formatter = f.debug_struct("WatchResponse");
91 formatter.field("index", &self.index);
92 formatter.finish()
93 }
94}
95pub mod watch_response {
97 #[non_exhaustive]
99 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
100 pub struct Builder {
101 pub(crate) index: std::option::Option<std::string::String>,
102 }
103 impl Builder {
104 pub fn index(mut self, input: impl Into<std::string::String>) -> Self {
106 self.index = Some(input.into());
107 self
108 }
109 pub fn set_index(mut self, input: std::option::Option<std::string::String>) -> Self {
111 self.index = input;
112 self
113 }
114 pub fn build(self) -> crate::model::WatchResponse {
116 crate::model::WatchResponse { index: self.index }
117 }
118 }
119}
120impl WatchResponse {
121 pub fn builder() -> crate::model::watch_response::Builder {
123 crate::model::watch_response::Builder::default()
124 }
125}
126
127#[non_exhaustive]
129#[derive(std::clone::Clone, std::cmp::PartialEq)]
130pub struct KvEntry {
131 pub key: std::option::Option<std::vec::Vec<std::string::String>>,
133 #[allow(missing_docs)] pub value: std::option::Option<aws_smithy_types::Document>,
135 #[allow(missing_docs)] pub deleted: std::option::Option<bool>,
137}
138impl KvEntry {
139 pub fn key(&self) -> std::option::Option<&[std::string::String]> {
141 self.key.as_deref()
142 }
143 #[allow(missing_docs)] pub fn value(&self) -> std::option::Option<&aws_smithy_types::Document> {
145 self.value.as_ref()
146 }
147 #[allow(missing_docs)] pub fn deleted(&self) -> std::option::Option<bool> {
149 self.deleted
150 }
151}
152impl std::fmt::Debug for KvEntry {
153 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
154 let mut formatter = f.debug_struct("KvEntry");
155 formatter.field("key", &self.key);
156 formatter.field("value", &self.value);
157 formatter.field("deleted", &self.deleted);
158 formatter.finish()
159 }
160}
161pub mod kv_entry {
163 #[non_exhaustive]
165 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
166 pub struct Builder {
167 pub(crate) key: std::option::Option<std::vec::Vec<std::string::String>>,
168 pub(crate) value: std::option::Option<aws_smithy_types::Document>,
169 pub(crate) deleted: std::option::Option<bool>,
170 }
171 impl Builder {
172 pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
178 let mut v = self.key.unwrap_or_default();
179 v.push(input.into());
180 self.key = Some(v);
181 self
182 }
183 pub fn set_key(
185 mut self,
186 input: std::option::Option<std::vec::Vec<std::string::String>>,
187 ) -> Self {
188 self.key = input;
189 self
190 }
191 #[allow(missing_docs)] pub fn value(mut self, input: aws_smithy_types::Document) -> Self {
193 self.value = Some(input);
194 self
195 }
196 #[allow(missing_docs)] pub fn set_value(mut self, input: std::option::Option<aws_smithy_types::Document>) -> Self {
198 self.value = input;
199 self
200 }
201 #[allow(missing_docs)] pub fn deleted(mut self, input: bool) -> Self {
203 self.deleted = Some(input);
204 self
205 }
206 #[allow(missing_docs)] pub fn set_deleted(mut self, input: std::option::Option<bool>) -> Self {
208 self.deleted = input;
209 self
210 }
211 pub fn build(self) -> crate::model::KvEntry {
213 crate::model::KvEntry {
214 key: self.key,
215 value: self.value,
216 deleted: self.deleted,
217 }
218 }
219 }
220}
221impl KvEntry {
222 pub fn builder() -> crate::model::kv_entry::Builder {
224 crate::model::kv_entry::Builder::default()
225 }
226}