aws_sdk_elementalinference/operation/get_feed/
_get_feed_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetFeedOutput {
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 status: crate::types::FeedStatus,
18 pub association: ::std::option::Option<crate::types::FeedAssociation>,
20 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
22 _request_id: Option<String>,
23}
24impl GetFeedOutput {
25 pub fn arn(&self) -> &str {
27 use std::ops::Deref;
28 self.arn.deref()
29 }
30 pub fn name(&self) -> &str {
32 use std::ops::Deref;
33 self.name.deref()
34 }
35 pub fn id(&self) -> &str {
37 use std::ops::Deref;
38 self.id.deref()
39 }
40 pub fn data_endpoints(&self) -> &[::std::string::String] {
42 use std::ops::Deref;
43 self.data_endpoints.deref()
44 }
45 pub fn outputs(&self) -> &[crate::types::GetOutput] {
47 use std::ops::Deref;
48 self.outputs.deref()
49 }
50 pub fn status(&self) -> &crate::types::FeedStatus {
52 &self.status
53 }
54 pub fn association(&self) -> ::std::option::Option<&crate::types::FeedAssociation> {
56 self.association.as_ref()
57 }
58 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
60 self.tags.as_ref()
61 }
62}
63impl ::aws_types::request_id::RequestId for GetFeedOutput {
64 fn request_id(&self) -> Option<&str> {
65 self._request_id.as_deref()
66 }
67}
68impl GetFeedOutput {
69 pub fn builder() -> crate::operation::get_feed::builders::GetFeedOutputBuilder {
71 crate::operation::get_feed::builders::GetFeedOutputBuilder::default()
72 }
73}
74
75#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
77#[non_exhaustive]
78pub struct GetFeedOutputBuilder {
79 pub(crate) arn: ::std::option::Option<::std::string::String>,
80 pub(crate) name: ::std::option::Option<::std::string::String>,
81 pub(crate) id: ::std::option::Option<::std::string::String>,
82 pub(crate) data_endpoints: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
83 pub(crate) outputs: ::std::option::Option<::std::vec::Vec<crate::types::GetOutput>>,
84 pub(crate) status: ::std::option::Option<crate::types::FeedStatus>,
85 pub(crate) association: ::std::option::Option<crate::types::FeedAssociation>,
86 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
87 _request_id: Option<String>,
88}
89impl GetFeedOutputBuilder {
90 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93 self.arn = ::std::option::Option::Some(input.into());
94 self
95 }
96 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98 self.arn = input;
99 self
100 }
101 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
103 &self.arn
104 }
105 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108 self.name = ::std::option::Option::Some(input.into());
109 self
110 }
111 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113 self.name = input;
114 self
115 }
116 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
118 &self.name
119 }
120 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.id = ::std::option::Option::Some(input.into());
124 self
125 }
126 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.id = input;
129 self
130 }
131 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
133 &self.id
134 }
135 pub fn data_endpoints(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141 let mut v = self.data_endpoints.unwrap_or_default();
142 v.push(input.into());
143 self.data_endpoints = ::std::option::Option::Some(v);
144 self
145 }
146 pub fn set_data_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
148 self.data_endpoints = input;
149 self
150 }
151 pub fn get_data_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
153 &self.data_endpoints
154 }
155 pub fn outputs(mut self, input: crate::types::GetOutput) -> Self {
161 let mut v = self.outputs.unwrap_or_default();
162 v.push(input);
163 self.outputs = ::std::option::Option::Some(v);
164 self
165 }
166 pub fn set_outputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::GetOutput>>) -> Self {
168 self.outputs = input;
169 self
170 }
171 pub fn get_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GetOutput>> {
173 &self.outputs
174 }
175 pub fn status(mut self, input: crate::types::FeedStatus) -> Self {
178 self.status = ::std::option::Option::Some(input);
179 self
180 }
181 pub fn set_status(mut self, input: ::std::option::Option<crate::types::FeedStatus>) -> Self {
183 self.status = input;
184 self
185 }
186 pub fn get_status(&self) -> &::std::option::Option<crate::types::FeedStatus> {
188 &self.status
189 }
190 pub fn association(mut self, input: crate::types::FeedAssociation) -> Self {
192 self.association = ::std::option::Option::Some(input);
193 self
194 }
195 pub fn set_association(mut self, input: ::std::option::Option<crate::types::FeedAssociation>) -> Self {
197 self.association = input;
198 self
199 }
200 pub fn get_association(&self) -> &::std::option::Option<crate::types::FeedAssociation> {
202 &self.association
203 }
204 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
210 let mut hash_map = self.tags.unwrap_or_default();
211 hash_map.insert(k.into(), v.into());
212 self.tags = ::std::option::Option::Some(hash_map);
213 self
214 }
215 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
217 self.tags = input;
218 self
219 }
220 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
222 &self.tags
223 }
224 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
225 self._request_id = Some(request_id.into());
226 self
227 }
228
229 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
230 self._request_id = request_id;
231 self
232 }
233 pub fn build(self) -> ::std::result::Result<crate::operation::get_feed::GetFeedOutput, ::aws_smithy_types::error::operation::BuildError> {
242 ::std::result::Result::Ok(crate::operation::get_feed::GetFeedOutput {
243 arn: self.arn.ok_or_else(|| {
244 ::aws_smithy_types::error::operation::BuildError::missing_field(
245 "arn",
246 "arn was not specified but it is required when building GetFeedOutput",
247 )
248 })?,
249 name: self.name.ok_or_else(|| {
250 ::aws_smithy_types::error::operation::BuildError::missing_field(
251 "name",
252 "name was not specified but it is required when building GetFeedOutput",
253 )
254 })?,
255 id: self.id.ok_or_else(|| {
256 ::aws_smithy_types::error::operation::BuildError::missing_field(
257 "id",
258 "id was not specified but it is required when building GetFeedOutput",
259 )
260 })?,
261 data_endpoints: self.data_endpoints.ok_or_else(|| {
262 ::aws_smithy_types::error::operation::BuildError::missing_field(
263 "data_endpoints",
264 "data_endpoints was not specified but it is required when building GetFeedOutput",
265 )
266 })?,
267 outputs: self.outputs.ok_or_else(|| {
268 ::aws_smithy_types::error::operation::BuildError::missing_field(
269 "outputs",
270 "outputs was not specified but it is required when building GetFeedOutput",
271 )
272 })?,
273 status: self.status.ok_or_else(|| {
274 ::aws_smithy_types::error::operation::BuildError::missing_field(
275 "status",
276 "status was not specified but it is required when building GetFeedOutput",
277 )
278 })?,
279 association: self.association,
280 tags: self.tags,
281 _request_id: self._request_id,
282 })
283 }
284}