aws_sdk_ram/operation/delete_permission/
_delete_permission_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 DeletePermissionInput {
6    /// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the customer managed permission that you want to delete.</p>
7    pub permission_arn: ::std::option::Option<::std::string::String>,
8    /// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
9    /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
10    /// <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>
11    pub client_token: ::std::option::Option<::std::string::String>,
12}
13impl DeletePermissionInput {
14    /// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the customer managed permission that you want to delete.</p>
15    pub fn permission_arn(&self) -> ::std::option::Option<&str> {
16        self.permission_arn.as_deref()
17    }
18    /// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
19    /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
20    /// <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>
21    pub fn client_token(&self) -> ::std::option::Option<&str> {
22        self.client_token.as_deref()
23    }
24}
25impl DeletePermissionInput {
26    /// Creates a new builder-style object to manufacture [`DeletePermissionInput`](crate::operation::delete_permission::DeletePermissionInput).
27    pub fn builder() -> crate::operation::delete_permission::builders::DeletePermissionInputBuilder {
28        crate::operation::delete_permission::builders::DeletePermissionInputBuilder::default()
29    }
30}
31
32/// A builder for [`DeletePermissionInput`](crate::operation::delete_permission::DeletePermissionInput).
33#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
34#[non_exhaustive]
35pub struct DeletePermissionInputBuilder {
36    pub(crate) permission_arn: ::std::option::Option<::std::string::String>,
37    pub(crate) client_token: ::std::option::Option<::std::string::String>,
38}
39impl DeletePermissionInputBuilder {
40    /// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the customer managed permission that you want to delete.</p>
41    /// This field is required.
42    pub fn permission_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
43        self.permission_arn = ::std::option::Option::Some(input.into());
44        self
45    }
46    /// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the customer managed permission that you want to delete.</p>
47    pub fn set_permission_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
48        self.permission_arn = input;
49        self
50    }
51    /// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the customer managed permission that you want to delete.</p>
52    pub fn get_permission_arn(&self) -> &::std::option::Option<::std::string::String> {
53        &self.permission_arn
54    }
55    /// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
56    /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
57    /// <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>
58    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.client_token = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
63    /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
64    /// <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>
65    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.client_token = input;
67        self
68    }
69    /// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
70    /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
71    /// <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>
72    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
73        &self.client_token
74    }
75    /// Consumes the builder and constructs a [`DeletePermissionInput`](crate::operation::delete_permission::DeletePermissionInput).
76    pub fn build(
77        self,
78    ) -> ::std::result::Result<crate::operation::delete_permission::DeletePermissionInput, ::aws_smithy_types::error::operation::BuildError> {
79        ::std::result::Result::Ok(crate::operation::delete_permission::DeletePermissionInput {
80            permission_arn: self.permission_arn,
81            client_token: self.client_token,
82        })
83    }
84}