// 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 ListResourcesInput {
/// <p>Specifies that you want to list only the resource shares that match the following:</p>
/// <ul>
/// <li>
/// <p><b> <code>SELF</code> </b> – resources that your account shares with other accounts</p></li>
/// <li>
/// <p><b> <code>OTHER-ACCOUNTS</code> </b> – resources that other accounts share with your account</p></li>
/// </ul>
pub resource_owner: ::std::option::Option<crate::types::ResourceOwner>,
/// <p>Specifies that you want to list only the resource shares that are associated with the specified principal.</p>
pub principal: ::std::option::Option<::std::string::String>,
/// <p>Specifies that you want to list only the resource shares that include resources of the specified resource type.</p>
/// <p>For valid values, query the <code>ListResourceTypes</code> operation.</p>
pub resource_type: ::std::option::Option<::std::string::String>,
/// <p>Specifies that you want to list only the resource shares that include resources with the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
pub resource_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>Specifies that you want to list only resources in the resource shares identified by the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
pub resource_share_arns: ::std::option::Option<::std::vec::Vec<::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 the results to include only resources that have the specified scope.</p>
/// <ul>
/// <li>
/// <p><code>ALL</code> – the results include both global and regional resources or resource types.</p></li>
/// <li>
/// <p><code>GLOBAL</code> – the results include only global resources or resource types.</p></li>
/// <li>
/// <p><code>REGIONAL</code> – the results include only regional resources or resource types.</p></li>
/// </ul>
/// <p>The default value is <code>ALL</code>.</p>
pub resource_region_scope: ::std::option::Option<crate::types::ResourceRegionScopeFilter>,
}
impl ListResourcesInput {
/// <p>Specifies that you want to list only the resource shares that match the following:</p>
/// <ul>
/// <li>
/// <p><b> <code>SELF</code> </b> – resources that your account shares with other accounts</p></li>
/// <li>
/// <p><b> <code>OTHER-ACCOUNTS</code> </b> – resources that other accounts share with your account</p></li>
/// </ul>
pub fn resource_owner(&self) -> ::std::option::Option<&crate::types::ResourceOwner> {
self.resource_owner.as_ref()
}
/// <p>Specifies that you want to list only the resource shares that are associated with the specified principal.</p>
pub fn principal(&self) -> ::std::option::Option<&str> {
self.principal.as_deref()
}
/// <p>Specifies that you want to list only the resource shares that include resources of the specified resource type.</p>
/// <p>For valid values, query the <code>ListResourceTypes</code> operation.</p>
pub fn resource_type(&self) -> ::std::option::Option<&str> {
self.resource_type.as_deref()
}
/// <p>Specifies that you want to list only the resource shares that include resources with the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.resource_arns.is_none()`.
pub fn resource_arns(&self) -> &[::std::string::String] {
self.resource_arns.as_deref().unwrap_or_default()
}
/// <p>Specifies that you want to list only resources in the resource shares identified by the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.resource_share_arns.is_none()`.
pub fn resource_share_arns(&self) -> &[::std::string::String] {
self.resource_share_arns.as_deref().unwrap_or_default()
}
/// <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 the results to include only resources that have the specified scope.</p>
/// <ul>
/// <li>
/// <p><code>ALL</code> – the results include both global and regional resources or resource types.</p></li>
/// <li>
/// <p><code>GLOBAL</code> – the results include only global resources or resource types.</p></li>
/// <li>
/// <p><code>REGIONAL</code> – the results include only regional resources or resource types.</p></li>
/// </ul>
/// <p>The default value is <code>ALL</code>.</p>
pub fn resource_region_scope(&self) -> ::std::option::Option<&crate::types::ResourceRegionScopeFilter> {
self.resource_region_scope.as_ref()
}
}
impl ListResourcesInput {
/// Creates a new builder-style object to manufacture [`ListResourcesInput`](crate::operation::list_resources::ListResourcesInput).
pub fn builder() -> crate::operation::list_resources::builders::ListResourcesInputBuilder {
crate::operation::list_resources::builders::ListResourcesInputBuilder::default()
}
}
/// A builder for [`ListResourcesInput`](crate::operation::list_resources::ListResourcesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListResourcesInputBuilder {
pub(crate) resource_owner: ::std::option::Option<crate::types::ResourceOwner>,
pub(crate) principal: ::std::option::Option<::std::string::String>,
pub(crate) resource_type: ::std::option::Option<::std::string::String>,
pub(crate) resource_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) resource_share_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) next_token: ::std::option::Option<::std::string::String>,
pub(crate) max_results: ::std::option::Option<i32>,
pub(crate) resource_region_scope: ::std::option::Option<crate::types::ResourceRegionScopeFilter>,
}
impl ListResourcesInputBuilder {
/// <p>Specifies that you want to list only the resource shares that match the following:</p>
/// <ul>
/// <li>
/// <p><b> <code>SELF</code> </b> – resources that your account shares with other accounts</p></li>
/// <li>
/// <p><b> <code>OTHER-ACCOUNTS</code> </b> – resources that other accounts share with your account</p></li>
/// </ul>
/// This field is required.
pub fn resource_owner(mut self, input: crate::types::ResourceOwner) -> Self {
self.resource_owner = ::std::option::Option::Some(input);
self
}
/// <p>Specifies that you want to list only the resource shares that match the following:</p>
/// <ul>
/// <li>
/// <p><b> <code>SELF</code> </b> – resources that your account shares with other accounts</p></li>
/// <li>
/// <p><b> <code>OTHER-ACCOUNTS</code> </b> – resources that other accounts share with your account</p></li>
/// </ul>
pub fn set_resource_owner(mut self, input: ::std::option::Option<crate::types::ResourceOwner>) -> Self {
self.resource_owner = input;
self
}
/// <p>Specifies that you want to list only the resource shares that match the following:</p>
/// <ul>
/// <li>
/// <p><b> <code>SELF</code> </b> – resources that your account shares with other accounts</p></li>
/// <li>
/// <p><b> <code>OTHER-ACCOUNTS</code> </b> – resources that other accounts share with your account</p></li>
/// </ul>
pub fn get_resource_owner(&self) -> &::std::option::Option<crate::types::ResourceOwner> {
&self.resource_owner
}
/// <p>Specifies that you want to list only the resource shares that are associated with the specified principal.</p>
pub fn principal(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.principal = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies that you want to list only the resource shares that are associated with the specified principal.</p>
pub fn set_principal(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.principal = input;
self
}
/// <p>Specifies that you want to list only the resource shares that are associated with the specified principal.</p>
pub fn get_principal(&self) -> &::std::option::Option<::std::string::String> {
&self.principal
}
/// <p>Specifies that you want to list only the resource shares that include resources of the specified resource type.</p>
/// <p>For valid values, query the <code>ListResourceTypes</code> operation.</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 the resource shares that include resources of the specified resource type.</p>
/// <p>For valid values, query the <code>ListResourceTypes</code> operation.</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 the resource shares that include resources of the specified resource type.</p>
/// <p>For valid values, query the <code>ListResourceTypes</code> operation.</p>
pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_type
}
/// Appends an item to `resource_arns`.
///
/// To override the contents of this collection use [`set_resource_arns`](Self::set_resource_arns).
///
/// <p>Specifies that you want to list only the resource shares that include resources with the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
pub fn resource_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.resource_arns.unwrap_or_default();
v.push(input.into());
self.resource_arns = ::std::option::Option::Some(v);
self
}
/// <p>Specifies that you want to list only the resource shares that include resources with the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
pub fn set_resource_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.resource_arns = input;
self
}
/// <p>Specifies that you want to list only the resource shares that include resources with the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
pub fn get_resource_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.resource_arns
}
/// Appends an item to `resource_share_arns`.
///
/// To override the contents of this collection use [`set_resource_share_arns`](Self::set_resource_share_arns).
///
/// <p>Specifies that you want to list only resources in the resource shares identified by the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
pub fn resource_share_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.resource_share_arns.unwrap_or_default();
v.push(input.into());
self.resource_share_arns = ::std::option::Option::Some(v);
self
}
/// <p>Specifies that you want to list only resources in the resource shares identified by the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
pub fn set_resource_share_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.resource_share_arns = input;
self
}
/// <p>Specifies that you want to list only resources in the resource shares identified by the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
pub fn get_resource_share_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.resource_share_arns
}
/// <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 the results to include only resources that have the specified scope.</p>
/// <ul>
/// <li>
/// <p><code>ALL</code> – the results include both global and regional resources or resource types.</p></li>
/// <li>
/// <p><code>GLOBAL</code> – the results include only global resources or resource types.</p></li>
/// <li>
/// <p><code>REGIONAL</code> – the results include only regional resources or resource types.</p></li>
/// </ul>
/// <p>The default value is <code>ALL</code>.</p>
pub fn resource_region_scope(mut self, input: crate::types::ResourceRegionScopeFilter) -> Self {
self.resource_region_scope = ::std::option::Option::Some(input);
self
}
/// <p>Specifies that you want the results to include only resources that have the specified scope.</p>
/// <ul>
/// <li>
/// <p><code>ALL</code> – the results include both global and regional resources or resource types.</p></li>
/// <li>
/// <p><code>GLOBAL</code> – the results include only global resources or resource types.</p></li>
/// <li>
/// <p><code>REGIONAL</code> – the results include only regional resources or resource types.</p></li>
/// </ul>
/// <p>The default value is <code>ALL</code>.</p>
pub fn set_resource_region_scope(mut self, input: ::std::option::Option<crate::types::ResourceRegionScopeFilter>) -> Self {
self.resource_region_scope = input;
self
}
/// <p>Specifies that you want the results to include only resources that have the specified scope.</p>
/// <ul>
/// <li>
/// <p><code>ALL</code> – the results include both global and regional resources or resource types.</p></li>
/// <li>
/// <p><code>GLOBAL</code> – the results include only global resources or resource types.</p></li>
/// <li>
/// <p><code>REGIONAL</code> – the results include only regional resources or resource types.</p></li>
/// </ul>
/// <p>The default value is <code>ALL</code>.</p>
pub fn get_resource_region_scope(&self) -> &::std::option::Option<crate::types::ResourceRegionScopeFilter> {
&self.resource_region_scope
}
/// Consumes the builder and constructs a [`ListResourcesInput`](crate::operation::list_resources::ListResourcesInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::list_resources::ListResourcesInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::list_resources::ListResourcesInput {
resource_owner: self.resource_owner,
principal: self.principal,
resource_type: self.resource_type,
resource_arns: self.resource_arns,
resource_share_arns: self.resource_share_arns,
next_token: self.next_token,
max_results: self.max_results,
resource_region_scope: self.resource_region_scope,
})
}
}