aws-sdk-ram 1.103.0

AWS SDK for AWS Resource Access Manager
Documentation
// 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 ListPermissionsInput {
    /// <p>Specifies that you want to list only those permissions that apply to the specified resource type. This parameter is not case sensitive.</p>
    /// <p>For example, to list only permissions that apply to Amazon EC2 subnets, specify <code>ec2:subnet</code>. You can use the <code>ListResourceTypes</code> operation to get the specific string required.</p>
    pub resource_type: ::std::option::Option<::std::string::String>,
    /// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>Specifies that you want to list only permissions of this type:</p>
    /// <ul>
    /// <li>
    /// <p><code>AWS</code> – returns only Amazon Web Services managed permissions.</p></li>
    /// <li>
    /// <p><code>LOCAL</code> – returns only customer managed permissions</p></li>
    /// <li>
    /// <p><code>ALL</code> – returns both Amazon Web Services managed permissions and customer managed permissions.</p></li>
    /// </ul>
    /// <p>If you don't specify this parameter, the default is <code>All</code>.</p>
    pub permission_type: ::std::option::Option<crate::types::PermissionTypeFilter>,
}
impl ListPermissionsInput {
    /// <p>Specifies that you want to list only those permissions that apply to the specified resource type. This parameter is not case sensitive.</p>
    /// <p>For example, to list only permissions that apply to Amazon EC2 subnets, specify <code>ec2:subnet</code>. You can use the <code>ListResourceTypes</code> operation to get the specific string required.</p>
    pub fn resource_type(&self) -> ::std::option::Option<&str> {
        self.resource_type.as_deref()
    }
    /// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>Specifies that you want to list only permissions of this type:</p>
    /// <ul>
    /// <li>
    /// <p><code>AWS</code> – returns only Amazon Web Services managed permissions.</p></li>
    /// <li>
    /// <p><code>LOCAL</code> – returns only customer managed permissions</p></li>
    /// <li>
    /// <p><code>ALL</code> – returns both Amazon Web Services managed permissions and customer managed permissions.</p></li>
    /// </ul>
    /// <p>If you don't specify this parameter, the default is <code>All</code>.</p>
    pub fn permission_type(&self) -> ::std::option::Option<&crate::types::PermissionTypeFilter> {
        self.permission_type.as_ref()
    }
}
impl ListPermissionsInput {
    /// Creates a new builder-style object to manufacture [`ListPermissionsInput`](crate::operation::list_permissions::ListPermissionsInput).
    pub fn builder() -> crate::operation::list_permissions::builders::ListPermissionsInputBuilder {
        crate::operation::list_permissions::builders::ListPermissionsInputBuilder::default()
    }
}

/// A builder for [`ListPermissionsInput`](crate::operation::list_permissions::ListPermissionsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListPermissionsInputBuilder {
    pub(crate) resource_type: ::std::option::Option<::std::string::String>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) permission_type: ::std::option::Option<crate::types::PermissionTypeFilter>,
}
impl ListPermissionsInputBuilder {
    /// <p>Specifies that you want to list only those permissions that apply to the specified resource type. This parameter is not case sensitive.</p>
    /// <p>For example, to list only permissions that apply to Amazon EC2 subnets, specify <code>ec2:subnet</code>. You can use the <code>ListResourceTypes</code> operation to get the specific string required.</p>
    pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies that you want to list only those permissions that apply to the specified resource type. This parameter is not case sensitive.</p>
    /// <p>For example, to list only permissions that apply to Amazon EC2 subnets, specify <code>ec2:subnet</code>. You can use the <code>ListResourceTypes</code> operation to get the specific string required.</p>
    pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_type = input;
        self
    }
    /// <p>Specifies that you want to list only those permissions that apply to the specified resource type. This parameter is not case sensitive.</p>
    /// <p>For example, to list only permissions that apply to Amazon EC2 subnets, specify <code>ec2:subnet</code>. You can use the <code>ListResourceTypes</code> operation to get the specific string required.</p>
    pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_type
    }
    /// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>Specifies that you want to list only permissions of this type:</p>
    /// <ul>
    /// <li>
    /// <p><code>AWS</code> – returns only Amazon Web Services managed permissions.</p></li>
    /// <li>
    /// <p><code>LOCAL</code> – returns only customer managed permissions</p></li>
    /// <li>
    /// <p><code>ALL</code> – returns both Amazon Web Services managed permissions and customer managed permissions.</p></li>
    /// </ul>
    /// <p>If you don't specify this parameter, the default is <code>All</code>.</p>
    pub fn permission_type(mut self, input: crate::types::PermissionTypeFilter) -> Self {
        self.permission_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies that you want to list only permissions of this type:</p>
    /// <ul>
    /// <li>
    /// <p><code>AWS</code> – returns only Amazon Web Services managed permissions.</p></li>
    /// <li>
    /// <p><code>LOCAL</code> – returns only customer managed permissions</p></li>
    /// <li>
    /// <p><code>ALL</code> – returns both Amazon Web Services managed permissions and customer managed permissions.</p></li>
    /// </ul>
    /// <p>If you don't specify this parameter, the default is <code>All</code>.</p>
    pub fn set_permission_type(mut self, input: ::std::option::Option<crate::types::PermissionTypeFilter>) -> Self {
        self.permission_type = input;
        self
    }
    /// <p>Specifies that you want to list only permissions of this type:</p>
    /// <ul>
    /// <li>
    /// <p><code>AWS</code> – returns only Amazon Web Services managed permissions.</p></li>
    /// <li>
    /// <p><code>LOCAL</code> – returns only customer managed permissions</p></li>
    /// <li>
    /// <p><code>ALL</code> – returns both Amazon Web Services managed permissions and customer managed permissions.</p></li>
    /// </ul>
    /// <p>If you don't specify this parameter, the default is <code>All</code>.</p>
    pub fn get_permission_type(&self) -> &::std::option::Option<crate::types::PermissionTypeFilter> {
        &self.permission_type
    }
    /// Consumes the builder and constructs a [`ListPermissionsInput`](crate::operation::list_permissions::ListPermissionsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::list_permissions::ListPermissionsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_permissions::ListPermissionsInput {
            resource_type: self.resource_type,
            next_token: self.next_token,
            max_results: self.max_results,
            permission_type: self.permission_type,
        })
    }
}