aws_sdk_iam/operation/delete_policy/_delete_policy_input.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 DeletePolicyInput {
6 /// <p>The Amazon Resource Name (ARN) of the IAM policy you want to delete.</p>
7 /// <p>For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
8 pub policy_arn: ::std::option::Option<::std::string::String>,
9}
10impl DeletePolicyInput {
11 /// <p>The Amazon Resource Name (ARN) of the IAM policy you want to delete.</p>
12 /// <p>For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
13 pub fn policy_arn(&self) -> ::std::option::Option<&str> {
14 self.policy_arn.as_deref()
15 }
16}
17impl DeletePolicyInput {
18 /// Creates a new builder-style object to manufacture [`DeletePolicyInput`](crate::operation::delete_policy::DeletePolicyInput).
19 pub fn builder() -> crate::operation::delete_policy::builders::DeletePolicyInputBuilder {
20 crate::operation::delete_policy::builders::DeletePolicyInputBuilder::default()
21 }
22}
23
24/// A builder for [`DeletePolicyInput`](crate::operation::delete_policy::DeletePolicyInput).
25#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
26#[non_exhaustive]
27pub struct DeletePolicyInputBuilder {
28 pub(crate) policy_arn: ::std::option::Option<::std::string::String>,
29}
30impl DeletePolicyInputBuilder {
31 /// <p>The Amazon Resource Name (ARN) of the IAM policy you want to delete.</p>
32 /// <p>For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
33 /// This field is required.
34 pub fn policy_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
35 self.policy_arn = ::std::option::Option::Some(input.into());
36 self
37 }
38 /// <p>The Amazon Resource Name (ARN) of the IAM policy you want to delete.</p>
39 /// <p>For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
40 pub fn set_policy_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
41 self.policy_arn = input;
42 self
43 }
44 /// <p>The Amazon Resource Name (ARN) of the IAM policy you want to delete.</p>
45 /// <p>For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
46 pub fn get_policy_arn(&self) -> &::std::option::Option<::std::string::String> {
47 &self.policy_arn
48 }
49 /// Consumes the builder and constructs a [`DeletePolicyInput`](crate::operation::delete_policy::DeletePolicyInput).
50 pub fn build(
51 self,
52 ) -> ::std::result::Result<crate::operation::delete_policy::DeletePolicyInput, ::aws_smithy_types::error::operation::BuildError> {
53 ::std::result::Result::Ok(crate::operation::delete_policy::DeletePolicyInput { policy_arn: self.policy_arn })
54 }
55}