1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetPermissionInput {
    /// <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 permission whose contents you want to retrieve. To find the ARN for a permission, use either the <code>ListPermissions</code> operation or go to the <a href="https://console.aws.amazon.com/ram/home#Permissions:">Permissions library</a> page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.</p>
    pub permission_arn: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the version number of the RAM permission to retrieve. If you don't specify this parameter, the operation retrieves the default version.</p>
    /// <p>To see the list of available versions, use <code>ListPermissionVersions</code>.</p>
    pub permission_version: ::std::option::Option<i32>,
}
impl GetPermissionInput {
    /// <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 permission whose contents you want to retrieve. To find the ARN for a permission, use either the <code>ListPermissions</code> operation or go to the <a href="https://console.aws.amazon.com/ram/home#Permissions:">Permissions library</a> page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.</p>
    pub fn permission_arn(&self) -> ::std::option::Option<&str> {
        self.permission_arn.as_deref()
    }
    /// <p>Specifies the version number of the RAM permission to retrieve. If you don't specify this parameter, the operation retrieves the default version.</p>
    /// <p>To see the list of available versions, use <code>ListPermissionVersions</code>.</p>
    pub fn permission_version(&self) -> ::std::option::Option<i32> {
        self.permission_version
    }
}
impl GetPermissionInput {
    /// Creates a new builder-style object to manufacture [`GetPermissionInput`](crate::operation::get_permission::GetPermissionInput).
    pub fn builder() -> crate::operation::get_permission::builders::GetPermissionInputBuilder {
        crate::operation::get_permission::builders::GetPermissionInputBuilder::default()
    }
}

/// A builder for [`GetPermissionInput`](crate::operation::get_permission::GetPermissionInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetPermissionInputBuilder {
    pub(crate) permission_arn: ::std::option::Option<::std::string::String>,
    pub(crate) permission_version: ::std::option::Option<i32>,
}
impl GetPermissionInputBuilder {
    /// <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 permission whose contents you want to retrieve. To find the ARN for a permission, use either the <code>ListPermissions</code> operation or go to the <a href="https://console.aws.amazon.com/ram/home#Permissions:">Permissions library</a> page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.</p>
    /// This field is required.
    pub fn permission_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.permission_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <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 permission whose contents you want to retrieve. To find the ARN for a permission, use either the <code>ListPermissions</code> operation or go to the <a href="https://console.aws.amazon.com/ram/home#Permissions:">Permissions library</a> page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.</p>
    pub fn set_permission_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.permission_arn = input;
        self
    }
    /// <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 permission whose contents you want to retrieve. To find the ARN for a permission, use either the <code>ListPermissions</code> operation or go to the <a href="https://console.aws.amazon.com/ram/home#Permissions:">Permissions library</a> page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.</p>
    pub fn get_permission_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.permission_arn
    }
    /// <p>Specifies the version number of the RAM permission to retrieve. If you don't specify this parameter, the operation retrieves the default version.</p>
    /// <p>To see the list of available versions, use <code>ListPermissionVersions</code>.</p>
    pub fn permission_version(mut self, input: i32) -> Self {
        self.permission_version = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the version number of the RAM permission to retrieve. If you don't specify this parameter, the operation retrieves the default version.</p>
    /// <p>To see the list of available versions, use <code>ListPermissionVersions</code>.</p>
    pub fn set_permission_version(mut self, input: ::std::option::Option<i32>) -> Self {
        self.permission_version = input;
        self
    }
    /// <p>Specifies the version number of the RAM permission to retrieve. If you don't specify this parameter, the operation retrieves the default version.</p>
    /// <p>To see the list of available versions, use <code>ListPermissionVersions</code>.</p>
    pub fn get_permission_version(&self) -> &::std::option::Option<i32> {
        &self.permission_version
    }
    /// Consumes the builder and constructs a [`GetPermissionInput`](crate::operation::get_permission::GetPermissionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_permission::GetPermissionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_permission::GetPermissionInput {
            permission_arn: self.permission_arn,
            permission_version: self.permission_version,
        })
    }
}