Skip to main content

aws_sdk_elementalinference/operation/update_feed/
_update_feed_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 UpdateFeedOutput {
6    /// <p>The ARN of the feed.</p>
7    pub arn: ::std::string::String,
8    /// <p>The updated or original name of the feed.</p>
9    pub name: ::std::string::String,
10    /// <p>The ID of the feed.</p>
11    pub id: ::std::string::String,
12    /// <p>The data endpoints of the feed.</p>
13    pub data_endpoints: ::std::vec::Vec<::std::string::String>,
14    /// <p>The array of outputs in the feed. You might have left this array unchanged, or you might have changed it.</p>
15    pub outputs: ::std::vec::Vec<crate::types::GetOutput>,
16    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role for the feed, after the update. This property is absent if the feed doesn't have an IAM role.</p>
17    pub access_role_arn: ::std::option::Option<::std::string::String>,
18    /// <p>The status of the feed.</p>
19    pub status: crate::types::FeedStatus,
20    /// <p>Information about the resource that is associated with the feed, if any.</p>
21    pub association: ::std::option::Option<crate::types::FeedAssociation>,
22    /// <p>The tags associated with the feed.</p>
23    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
24    _request_id: Option<String>,
25}
26impl UpdateFeedOutput {
27    /// <p>The ARN of the feed.</p>
28    pub fn arn(&self) -> &str {
29        use std::ops::Deref;
30        self.arn.deref()
31    }
32    /// <p>The updated or original name of the feed.</p>
33    pub fn name(&self) -> &str {
34        use std::ops::Deref;
35        self.name.deref()
36    }
37    /// <p>The ID of the feed.</p>
38    pub fn id(&self) -> &str {
39        use std::ops::Deref;
40        self.id.deref()
41    }
42    /// <p>The data endpoints of the feed.</p>
43    pub fn data_endpoints(&self) -> &[::std::string::String] {
44        use std::ops::Deref;
45        self.data_endpoints.deref()
46    }
47    /// <p>The array of outputs in the feed. You might have left this array unchanged, or you might have changed it.</p>
48    pub fn outputs(&self) -> &[crate::types::GetOutput] {
49        use std::ops::Deref;
50        self.outputs.deref()
51    }
52    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role for the feed, after the update. This property is absent if the feed doesn't have an IAM role.</p>
53    pub fn access_role_arn(&self) -> ::std::option::Option<&str> {
54        self.access_role_arn.as_deref()
55    }
56    /// <p>The status of the feed.</p>
57    pub fn status(&self) -> &crate::types::FeedStatus {
58        &self.status
59    }
60    /// <p>Information about the resource that is associated with the feed, if any.</p>
61    pub fn association(&self) -> ::std::option::Option<&crate::types::FeedAssociation> {
62        self.association.as_ref()
63    }
64    /// <p>The tags associated with the feed.</p>
65    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    /// Creates a new builder-style object to manufacture [`UpdateFeedOutput`](crate::operation::update_feed::UpdateFeedOutput).
76    pub fn builder() -> crate::operation::update_feed::builders::UpdateFeedOutputBuilder {
77        crate::operation::update_feed::builders::UpdateFeedOutputBuilder::default()
78    }
79}
80
81/// A builder for [`UpdateFeedOutput`](crate::operation::update_feed::UpdateFeedOutput).
82#[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    /// <p>The ARN of the feed.</p>
98    /// This field is required.
99    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    /// <p>The ARN of the feed.</p>
104    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105        self.arn = input;
106        self
107    }
108    /// <p>The ARN of the feed.</p>
109    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
110        &self.arn
111    }
112    /// <p>The updated or original name of the feed.</p>
113    /// This field is required.
114    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    /// <p>The updated or original name of the feed.</p>
119    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.name = input;
121        self
122    }
123    /// <p>The updated or original name of the feed.</p>
124    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
125        &self.name
126    }
127    /// <p>The ID of the feed.</p>
128    /// This field is required.
129    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    /// <p>The ID of the feed.</p>
134    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.id = input;
136        self
137    }
138    /// <p>The ID of the feed.</p>
139    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
140        &self.id
141    }
142    /// Appends an item to `data_endpoints`.
143    ///
144    /// To override the contents of this collection use [`set_data_endpoints`](Self::set_data_endpoints).
145    ///
146    /// <p>The data endpoints of the feed.</p>
147    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    /// <p>The data endpoints of the feed.</p>
154    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    /// <p>The data endpoints of the feed.</p>
159    pub fn get_data_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
160        &self.data_endpoints
161    }
162    /// Appends an item to `outputs`.
163    ///
164    /// To override the contents of this collection use [`set_outputs`](Self::set_outputs).
165    ///
166    /// <p>The array of outputs in the feed. You might have left this array unchanged, or you might have changed it.</p>
167    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    /// <p>The array of outputs in the feed. You might have left this array unchanged, or you might have changed it.</p>
174    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    /// <p>The array of outputs in the feed. You might have left this array unchanged, or you might have changed it.</p>
179    pub fn get_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GetOutput>> {
180        &self.outputs
181    }
182    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role for the feed, after the update. This property is absent if the feed doesn't have an IAM role.</p>
183    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    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role for the feed, after the update. This property is absent if the feed doesn't have an IAM role.</p>
188    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    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role for the feed, after the update. This property is absent if the feed doesn't have an IAM role.</p>
193    pub fn get_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
194        &self.access_role_arn
195    }
196    /// <p>The status of the feed.</p>
197    /// This field is required.
198    pub fn status(mut self, input: crate::types::FeedStatus) -> Self {
199        self.status = ::std::option::Option::Some(input);
200        self
201    }
202    /// <p>The status of the feed.</p>
203    pub fn set_status(mut self, input: ::std::option::Option<crate::types::FeedStatus>) -> Self {
204        self.status = input;
205        self
206    }
207    /// <p>The status of the feed.</p>
208    pub fn get_status(&self) -> &::std::option::Option<crate::types::FeedStatus> {
209        &self.status
210    }
211    /// <p>Information about the resource that is associated with the feed, if any.</p>
212    pub fn association(mut self, input: crate::types::FeedAssociation) -> Self {
213        self.association = ::std::option::Option::Some(input);
214        self
215    }
216    /// <p>Information about the resource that is associated with the feed, if any.</p>
217    pub fn set_association(mut self, input: ::std::option::Option<crate::types::FeedAssociation>) -> Self {
218        self.association = input;
219        self
220    }
221    /// <p>Information about the resource that is associated with the feed, if any.</p>
222    pub fn get_association(&self) -> &::std::option::Option<crate::types::FeedAssociation> {
223        &self.association
224    }
225    /// Adds a key-value pair to `tags`.
226    ///
227    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
228    ///
229    /// <p>The tags associated with the feed.</p>
230    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    /// <p>The tags associated with the feed.</p>
237    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    /// <p>The tags associated with the feed.</p>
242    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    /// Consumes the builder and constructs a [`UpdateFeedOutput`](crate::operation::update_feed::UpdateFeedOutput).
255    /// This method will fail if any of the following fields are not set:
256    /// - [`arn`](crate::operation::update_feed::builders::UpdateFeedOutputBuilder::arn)
257    /// - [`name`](crate::operation::update_feed::builders::UpdateFeedOutputBuilder::name)
258    /// - [`id`](crate::operation::update_feed::builders::UpdateFeedOutputBuilder::id)
259    /// - [`data_endpoints`](crate::operation::update_feed::builders::UpdateFeedOutputBuilder::data_endpoints)
260    /// - [`outputs`](crate::operation::update_feed::builders::UpdateFeedOutputBuilder::outputs)
261    /// - [`status`](crate::operation::update_feed::builders::UpdateFeedOutputBuilder::status)
262    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}