aws_sdk_elementalinference/operation/delete_feed/
_delete_feed_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteFeedOutput {
6 pub arn: ::std::string::String,
8 pub id: ::std::string::String,
10 pub status: crate::types::FeedStatus,
12 _request_id: Option<String>,
13}
14impl DeleteFeedOutput {
15 pub fn arn(&self) -> &str {
17 use std::ops::Deref;
18 self.arn.deref()
19 }
20 pub fn id(&self) -> &str {
22 use std::ops::Deref;
23 self.id.deref()
24 }
25 pub fn status(&self) -> &crate::types::FeedStatus {
27 &self.status
28 }
29}
30impl ::aws_types::request_id::RequestId for DeleteFeedOutput {
31 fn request_id(&self) -> Option<&str> {
32 self._request_id.as_deref()
33 }
34}
35impl DeleteFeedOutput {
36 pub fn builder() -> crate::operation::delete_feed::builders::DeleteFeedOutputBuilder {
38 crate::operation::delete_feed::builders::DeleteFeedOutputBuilder::default()
39 }
40}
41
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct DeleteFeedOutputBuilder {
46 pub(crate) arn: ::std::option::Option<::std::string::String>,
47 pub(crate) id: ::std::option::Option<::std::string::String>,
48 pub(crate) status: ::std::option::Option<crate::types::FeedStatus>,
49 _request_id: Option<String>,
50}
51impl DeleteFeedOutputBuilder {
52 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55 self.arn = ::std::option::Option::Some(input.into());
56 self
57 }
58 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.arn = input;
61 self
62 }
63 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
65 &self.arn
66 }
67 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70 self.id = ::std::option::Option::Some(input.into());
71 self
72 }
73 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75 self.id = input;
76 self
77 }
78 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
80 &self.id
81 }
82 pub fn status(mut self, input: crate::types::FeedStatus) -> Self {
85 self.status = ::std::option::Option::Some(input);
86 self
87 }
88 pub fn set_status(mut self, input: ::std::option::Option<crate::types::FeedStatus>) -> Self {
90 self.status = input;
91 self
92 }
93 pub fn get_status(&self) -> &::std::option::Option<crate::types::FeedStatus> {
95 &self.status
96 }
97 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
98 self._request_id = Some(request_id.into());
99 self
100 }
101
102 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
103 self._request_id = request_id;
104 self
105 }
106 pub fn build(self) -> ::std::result::Result<crate::operation::delete_feed::DeleteFeedOutput, ::aws_smithy_types::error::operation::BuildError> {
112 ::std::result::Result::Ok(crate::operation::delete_feed::DeleteFeedOutput {
113 arn: self.arn.ok_or_else(|| {
114 ::aws_smithy_types::error::operation::BuildError::missing_field(
115 "arn",
116 "arn was not specified but it is required when building DeleteFeedOutput",
117 )
118 })?,
119 id: self.id.ok_or_else(|| {
120 ::aws_smithy_types::error::operation::BuildError::missing_field(
121 "id",
122 "id was not specified but it is required when building DeleteFeedOutput",
123 )
124 })?,
125 status: self.status.ok_or_else(|| {
126 ::aws_smithy_types::error::operation::BuildError::missing_field(
127 "status",
128 "status was not specified but it is required when building DeleteFeedOutput",
129 )
130 })?,
131 _request_id: self._request_id,
132 })
133 }
134}