aws_sdk_kinesis/operation/delete_stream/
_delete_stream_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input for <code>DeleteStream</code>.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteStreamInput {
7    /// <p>The name of the stream to delete.</p>
8    pub stream_name: ::std::option::Option<::std::string::String>,
9    /// <p>If this parameter is unset (<code>null</code>) or if you set it to <code>false</code>, and the stream has registered consumers, the call to <code>DeleteStream</code> fails with a <code>ResourceInUseException</code>.</p>
10    pub enforce_consumer_deletion: ::std::option::Option<bool>,
11    /// <p>The ARN of the stream.</p>
12    pub stream_arn: ::std::option::Option<::std::string::String>,
13}
14impl DeleteStreamInput {
15    /// <p>The name of the stream to delete.</p>
16    pub fn stream_name(&self) -> ::std::option::Option<&str> {
17        self.stream_name.as_deref()
18    }
19    /// <p>If this parameter is unset (<code>null</code>) or if you set it to <code>false</code>, and the stream has registered consumers, the call to <code>DeleteStream</code> fails with a <code>ResourceInUseException</code>.</p>
20    pub fn enforce_consumer_deletion(&self) -> ::std::option::Option<bool> {
21        self.enforce_consumer_deletion
22    }
23    /// <p>The ARN of the stream.</p>
24    pub fn stream_arn(&self) -> ::std::option::Option<&str> {
25        self.stream_arn.as_deref()
26    }
27}
28impl DeleteStreamInput {
29    /// Creates a new builder-style object to manufacture [`DeleteStreamInput`](crate::operation::delete_stream::DeleteStreamInput).
30    pub fn builder() -> crate::operation::delete_stream::builders::DeleteStreamInputBuilder {
31        crate::operation::delete_stream::builders::DeleteStreamInputBuilder::default()
32    }
33}
34
35/// A builder for [`DeleteStreamInput`](crate::operation::delete_stream::DeleteStreamInput).
36#[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    /// <p>The name of the stream to delete.</p>
45    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    /// <p>The name of the stream to delete.</p>
50    pub fn set_stream_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.stream_name = input;
52        self
53    }
54    /// <p>The name of the stream to delete.</p>
55    pub fn get_stream_name(&self) -> &::std::option::Option<::std::string::String> {
56        &self.stream_name
57    }
58    /// <p>If this parameter is unset (<code>null</code>) or if you set it to <code>false</code>, and the stream has registered consumers, the call to <code>DeleteStream</code> fails with a <code>ResourceInUseException</code>.</p>
59    pub fn enforce_consumer_deletion(mut self, input: bool) -> Self {
60        self.enforce_consumer_deletion = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>If this parameter is unset (<code>null</code>) or if you set it to <code>false</code>, and the stream has registered consumers, the call to <code>DeleteStream</code> fails with a <code>ResourceInUseException</code>.</p>
64    pub fn set_enforce_consumer_deletion(mut self, input: ::std::option::Option<bool>) -> Self {
65        self.enforce_consumer_deletion = input;
66        self
67    }
68    /// <p>If this parameter is unset (<code>null</code>) or if you set it to <code>false</code>, and the stream has registered consumers, the call to <code>DeleteStream</code> fails with a <code>ResourceInUseException</code>.</p>
69    pub fn get_enforce_consumer_deletion(&self) -> &::std::option::Option<bool> {
70        &self.enforce_consumer_deletion
71    }
72    /// <p>The ARN of the stream.</p>
73    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    /// <p>The ARN of the stream.</p>
78    pub fn set_stream_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.stream_arn = input;
80        self
81    }
82    /// <p>The ARN of the stream.</p>
83    pub fn get_stream_arn(&self) -> &::std::option::Option<::std::string::String> {
84        &self.stream_arn
85    }
86    /// Consumes the builder and constructs a [`DeleteStreamInput`](crate::operation::delete_stream::DeleteStreamInput).
87    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}