aws_sdk_sns/operation/remove_permission/
_remove_permission_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Input for RemovePermission action.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RemovePermissionInput {
7    /// <p>The ARN of the topic whose access control policy you wish to modify.</p>
8    pub topic_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The unique label of the statement you want to remove.</p>
10    pub label: ::std::option::Option<::std::string::String>,
11}
12impl RemovePermissionInput {
13    /// <p>The ARN of the topic whose access control policy you wish to modify.</p>
14    pub fn topic_arn(&self) -> ::std::option::Option<&str> {
15        self.topic_arn.as_deref()
16    }
17    /// <p>The unique label of the statement you want to remove.</p>
18    pub fn label(&self) -> ::std::option::Option<&str> {
19        self.label.as_deref()
20    }
21}
22impl RemovePermissionInput {
23    /// Creates a new builder-style object to manufacture [`RemovePermissionInput`](crate::operation::remove_permission::RemovePermissionInput).
24    pub fn builder() -> crate::operation::remove_permission::builders::RemovePermissionInputBuilder {
25        crate::operation::remove_permission::builders::RemovePermissionInputBuilder::default()
26    }
27}
28
29/// A builder for [`RemovePermissionInput`](crate::operation::remove_permission::RemovePermissionInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct RemovePermissionInputBuilder {
33    pub(crate) topic_arn: ::std::option::Option<::std::string::String>,
34    pub(crate) label: ::std::option::Option<::std::string::String>,
35}
36impl RemovePermissionInputBuilder {
37    /// <p>The ARN of the topic whose access control policy you wish to modify.</p>
38    /// This field is required.
39    pub fn topic_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40        self.topic_arn = ::std::option::Option::Some(input.into());
41        self
42    }
43    /// <p>The ARN of the topic whose access control policy you wish to modify.</p>
44    pub fn set_topic_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45        self.topic_arn = input;
46        self
47    }
48    /// <p>The ARN of the topic whose access control policy you wish to modify.</p>
49    pub fn get_topic_arn(&self) -> &::std::option::Option<::std::string::String> {
50        &self.topic_arn
51    }
52    /// <p>The unique label of the statement you want to remove.</p>
53    /// This field is required.
54    pub fn label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.label = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The unique label of the statement you want to remove.</p>
59    pub fn set_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.label = input;
61        self
62    }
63    /// <p>The unique label of the statement you want to remove.</p>
64    pub fn get_label(&self) -> &::std::option::Option<::std::string::String> {
65        &self.label
66    }
67    /// Consumes the builder and constructs a [`RemovePermissionInput`](crate::operation::remove_permission::RemovePermissionInput).
68    pub fn build(
69        self,
70    ) -> ::std::result::Result<crate::operation::remove_permission::RemovePermissionInput, ::aws_smithy_types::error::operation::BuildError> {
71        ::std::result::Result::Ok(crate::operation::remove_permission::RemovePermissionInput {
72            topic_arn: self.topic_arn,
73            label: self.label,
74        })
75    }
76}