aws_sdk_elementalinference/operation/update_feed/
_update_feed_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateFeedOutput {
6 pub arn: ::std::string::String,
8 pub name: ::std::string::String,
10 pub id: ::std::string::String,
12 pub data_endpoints: ::std::vec::Vec<::std::string::String>,
14 pub outputs: ::std::vec::Vec<crate::types::GetOutput>,
16 pub access_role_arn: ::std::option::Option<::std::string::String>,
18 pub status: crate::types::FeedStatus,
20 pub association: ::std::option::Option<crate::types::FeedAssociation>,
22 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
24 _request_id: Option<String>,
25}
26impl UpdateFeedOutput {
27 pub fn arn(&self) -> &str {
29 use std::ops::Deref;
30 self.arn.deref()
31 }
32 pub fn name(&self) -> &str {
34 use std::ops::Deref;
35 self.name.deref()
36 }
37 pub fn id(&self) -> &str {
39 use std::ops::Deref;
40 self.id.deref()
41 }
42 pub fn data_endpoints(&self) -> &[::std::string::String] {
44 use std::ops::Deref;
45 self.data_endpoints.deref()
46 }
47 pub fn outputs(&self) -> &[crate::types::GetOutput] {
49 use std::ops::Deref;
50 self.outputs.deref()
51 }
52 pub fn access_role_arn(&self) -> ::std::option::Option<&str> {
54 self.access_role_arn.as_deref()
55 }
56 pub fn status(&self) -> &crate::types::FeedStatus {
58 &self.status
59 }
60 pub fn association(&self) -> ::std::option::Option<&crate::types::FeedAssociation> {
62 self.association.as_ref()
63 }
64 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
66 self.tags.as_ref()
67 }
68}
69impl ::aws_types::request_id::RequestId for UpdateFeedOutput {
70 fn request_id(&self) -> Option<&str> {
71 self._request_id.as_deref()
72 }
73}
74impl UpdateFeedOutput {
75 pub fn builder() -> crate::operation::update_feed::builders::UpdateFeedOutputBuilder {
77 crate::operation::update_feed::builders::UpdateFeedOutputBuilder::default()
78 }
79}
80
81#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
83#[non_exhaustive]
84pub struct UpdateFeedOutputBuilder {
85 pub(crate) arn: ::std::option::Option<::std::string::String>,
86 pub(crate) name: ::std::option::Option<::std::string::String>,
87 pub(crate) id: ::std::option::Option<::std::string::String>,
88 pub(crate) data_endpoints: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
89 pub(crate) outputs: ::std::option::Option<::std::vec::Vec<crate::types::GetOutput>>,
90 pub(crate) access_role_arn: ::std::option::Option<::std::string::String>,
91 pub(crate) status: ::std::option::Option<crate::types::FeedStatus>,
92 pub(crate) association: ::std::option::Option<crate::types::FeedAssociation>,
93 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
94 _request_id: Option<String>,
95}
96impl UpdateFeedOutputBuilder {
97 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100 self.arn = ::std::option::Option::Some(input.into());
101 self
102 }
103 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105 self.arn = input;
106 self
107 }
108 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
110 &self.arn
111 }
112 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115 self.name = ::std::option::Option::Some(input.into());
116 self
117 }
118 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.name = input;
121 self
122 }
123 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
125 &self.name
126 }
127 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130 self.id = ::std::option::Option::Some(input.into());
131 self
132 }
133 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135 self.id = input;
136 self
137 }
138 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
140 &self.id
141 }
142 pub fn data_endpoints(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148 let mut v = self.data_endpoints.unwrap_or_default();
149 v.push(input.into());
150 self.data_endpoints = ::std::option::Option::Some(v);
151 self
152 }
153 pub fn set_data_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
155 self.data_endpoints = input;
156 self
157 }
158 pub fn get_data_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
160 &self.data_endpoints
161 }
162 pub fn outputs(mut self, input: crate::types::GetOutput) -> Self {
168 let mut v = self.outputs.unwrap_or_default();
169 v.push(input);
170 self.outputs = ::std::option::Option::Some(v);
171 self
172 }
173 pub fn set_outputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::GetOutput>>) -> Self {
175 self.outputs = input;
176 self
177 }
178 pub fn get_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GetOutput>> {
180 &self.outputs
181 }
182 pub fn access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
184 self.access_role_arn = ::std::option::Option::Some(input.into());
185 self
186 }
187 pub fn set_access_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
189 self.access_role_arn = input;
190 self
191 }
192 pub fn get_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
194 &self.access_role_arn
195 }
196 pub fn status(mut self, input: crate::types::FeedStatus) -> Self {
199 self.status = ::std::option::Option::Some(input);
200 self
201 }
202 pub fn set_status(mut self, input: ::std::option::Option<crate::types::FeedStatus>) -> Self {
204 self.status = input;
205 self
206 }
207 pub fn get_status(&self) -> &::std::option::Option<crate::types::FeedStatus> {
209 &self.status
210 }
211 pub fn association(mut self, input: crate::types::FeedAssociation) -> Self {
213 self.association = ::std::option::Option::Some(input);
214 self
215 }
216 pub fn set_association(mut self, input: ::std::option::Option<crate::types::FeedAssociation>) -> Self {
218 self.association = input;
219 self
220 }
221 pub fn get_association(&self) -> &::std::option::Option<crate::types::FeedAssociation> {
223 &self.association
224 }
225 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
231 let mut hash_map = self.tags.unwrap_or_default();
232 hash_map.insert(k.into(), v.into());
233 self.tags = ::std::option::Option::Some(hash_map);
234 self
235 }
236 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
238 self.tags = input;
239 self
240 }
241 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
243 &self.tags
244 }
245 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
246 self._request_id = Some(request_id.into());
247 self
248 }
249
250 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
251 self._request_id = request_id;
252 self
253 }
254 pub fn build(self) -> ::std::result::Result<crate::operation::update_feed::UpdateFeedOutput, ::aws_smithy_types::error::operation::BuildError> {
263 ::std::result::Result::Ok(crate::operation::update_feed::UpdateFeedOutput {
264 arn: self.arn.ok_or_else(|| {
265 ::aws_smithy_types::error::operation::BuildError::missing_field(
266 "arn",
267 "arn was not specified but it is required when building UpdateFeedOutput",
268 )
269 })?,
270 name: self.name.ok_or_else(|| {
271 ::aws_smithy_types::error::operation::BuildError::missing_field(
272 "name",
273 "name was not specified but it is required when building UpdateFeedOutput",
274 )
275 })?,
276 id: self.id.ok_or_else(|| {
277 ::aws_smithy_types::error::operation::BuildError::missing_field(
278 "id",
279 "id was not specified but it is required when building UpdateFeedOutput",
280 )
281 })?,
282 data_endpoints: self.data_endpoints.ok_or_else(|| {
283 ::aws_smithy_types::error::operation::BuildError::missing_field(
284 "data_endpoints",
285 "data_endpoints was not specified but it is required when building UpdateFeedOutput",
286 )
287 })?,
288 outputs: self.outputs.ok_or_else(|| {
289 ::aws_smithy_types::error::operation::BuildError::missing_field(
290 "outputs",
291 "outputs was not specified but it is required when building UpdateFeedOutput",
292 )
293 })?,
294 access_role_arn: self.access_role_arn,
295 status: self.status.ok_or_else(|| {
296 ::aws_smithy_types::error::operation::BuildError::missing_field(
297 "status",
298 "status was not specified but it is required when building UpdateFeedOutput",
299 )
300 })?,
301 association: self.association,
302 tags: self.tags,
303 _request_id: self._request_id,
304 })
305 }
306}