Skip to main content

aws_sdk_elementalinference/operation/delete_feed/
_delete_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 DeleteFeedOutput {
6    /// <p>The ARN of the deleted feed.</p>
7    pub arn: ::std::string::String,
8    /// <p>The ID of the deleted feed.</p>
9    pub id: ::std::string::String,
10    /// <p>The current status of the feed. When deletion of the feed has succeeded, the status will be DELETED.</p>
11    pub status: crate::types::FeedStatus,
12    _request_id: Option<String>,
13}
14impl DeleteFeedOutput {
15    /// <p>The ARN of the deleted feed.</p>
16    pub fn arn(&self) -> &str {
17        use std::ops::Deref;
18        self.arn.deref()
19    }
20    /// <p>The ID of the deleted feed.</p>
21    pub fn id(&self) -> &str {
22        use std::ops::Deref;
23        self.id.deref()
24    }
25    /// <p>The current status of the feed. When deletion of the feed has succeeded, the status will be DELETED.</p>
26    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    /// Creates a new builder-style object to manufacture [`DeleteFeedOutput`](crate::operation::delete_feed::DeleteFeedOutput).
37    pub fn builder() -> crate::operation::delete_feed::builders::DeleteFeedOutputBuilder {
38        crate::operation::delete_feed::builders::DeleteFeedOutputBuilder::default()
39    }
40}
41
42/// A builder for [`DeleteFeedOutput`](crate::operation::delete_feed::DeleteFeedOutput).
43#[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    /// <p>The ARN of the deleted feed.</p>
53    /// This field is required.
54    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    /// <p>The ARN of the deleted feed.</p>
59    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.arn = input;
61        self
62    }
63    /// <p>The ARN of the deleted feed.</p>
64    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
65        &self.arn
66    }
67    /// <p>The ID of the deleted feed.</p>
68    /// This field is required.
69    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    /// <p>The ID of the deleted feed.</p>
74    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75        self.id = input;
76        self
77    }
78    /// <p>The ID of the deleted feed.</p>
79    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
80        &self.id
81    }
82    /// <p>The current status of the feed. When deletion of the feed has succeeded, the status will be DELETED.</p>
83    /// This field is required.
84    pub fn status(mut self, input: crate::types::FeedStatus) -> Self {
85        self.status = ::std::option::Option::Some(input);
86        self
87    }
88    /// <p>The current status of the feed. When deletion of the feed has succeeded, the status will be DELETED.</p>
89    pub fn set_status(mut self, input: ::std::option::Option<crate::types::FeedStatus>) -> Self {
90        self.status = input;
91        self
92    }
93    /// <p>The current status of the feed. When deletion of the feed has succeeded, the status will be DELETED.</p>
94    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    /// Consumes the builder and constructs a [`DeleteFeedOutput`](crate::operation::delete_feed::DeleteFeedOutput).
107    /// This method will fail if any of the following fields are not set:
108    /// - [`arn`](crate::operation::delete_feed::builders::DeleteFeedOutputBuilder::arn)
109    /// - [`id`](crate::operation::delete_feed::builders::DeleteFeedOutputBuilder::id)
110    /// - [`status`](crate::operation::delete_feed::builders::DeleteFeedOutputBuilder::status)
111    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}