aws_sdk_kinesis/operation/delete_stream/
_delete_stream_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteStreamInput {
7 pub stream_name: ::std::option::Option<::std::string::String>,
9 pub enforce_consumer_deletion: ::std::option::Option<bool>,
11 pub stream_arn: ::std::option::Option<::std::string::String>,
13}
14impl DeleteStreamInput {
15 pub fn stream_name(&self) -> ::std::option::Option<&str> {
17 self.stream_name.as_deref()
18 }
19 pub fn enforce_consumer_deletion(&self) -> ::std::option::Option<bool> {
21 self.enforce_consumer_deletion
22 }
23 pub fn stream_arn(&self) -> ::std::option::Option<&str> {
25 self.stream_arn.as_deref()
26 }
27}
28impl DeleteStreamInput {
29 pub fn builder() -> crate::operation::delete_stream::builders::DeleteStreamInputBuilder {
31 crate::operation::delete_stream::builders::DeleteStreamInputBuilder::default()
32 }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct DeleteStreamInputBuilder {
39 pub(crate) stream_name: ::std::option::Option<::std::string::String>,
40 pub(crate) enforce_consumer_deletion: ::std::option::Option<bool>,
41 pub(crate) stream_arn: ::std::option::Option<::std::string::String>,
42}
43impl DeleteStreamInputBuilder {
44 pub fn stream_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.stream_name = ::std::option::Option::Some(input.into());
47 self
48 }
49 pub fn set_stream_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.stream_name = input;
52 self
53 }
54 pub fn get_stream_name(&self) -> &::std::option::Option<::std::string::String> {
56 &self.stream_name
57 }
58 pub fn enforce_consumer_deletion(mut self, input: bool) -> Self {
60 self.enforce_consumer_deletion = ::std::option::Option::Some(input);
61 self
62 }
63 pub fn set_enforce_consumer_deletion(mut self, input: ::std::option::Option<bool>) -> Self {
65 self.enforce_consumer_deletion = input;
66 self
67 }
68 pub fn get_enforce_consumer_deletion(&self) -> &::std::option::Option<bool> {
70 &self.enforce_consumer_deletion
71 }
72 pub fn stream_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74 self.stream_arn = ::std::option::Option::Some(input.into());
75 self
76 }
77 pub fn set_stream_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.stream_arn = input;
80 self
81 }
82 pub fn get_stream_arn(&self) -> &::std::option::Option<::std::string::String> {
84 &self.stream_arn
85 }
86 pub fn build(
88 self,
89 ) -> ::std::result::Result<crate::operation::delete_stream::DeleteStreamInput, ::aws_smithy_types::error::operation::BuildError> {
90 ::std::result::Result::Ok(crate::operation::delete_stream::DeleteStreamInput {
91 stream_name: self.stream_name,
92 enforce_consumer_deletion: self.enforce_consumer_deletion,
93 stream_arn: self.stream_arn,
94 })
95 }
96}