aws-sdk-mpa 1.26.0

AWS SDK for AWS Multi-party Approval
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 ListSessionsInput {
    /// <p>Amazon Resource Name (ARN) for the approval team.</p>
    pub approval_team_arn: ::std::option::Option<::std::string::String>,
    /// <p>The maximum number of items to return in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that you can retrieve the remaining results.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>If present, indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a next call to the operation to get more output. You can repeat this until the <code>NextToken</code> response element returns <code>null</code>.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>An array of <code>Filter</code> objects. Contains the filter to apply when listing sessions.</p>
    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
}
impl ListSessionsInput {
    /// <p>Amazon Resource Name (ARN) for the approval team.</p>
    pub fn approval_team_arn(&self) -> ::std::option::Option<&str> {
        self.approval_team_arn.as_deref()
    }
    /// <p>The maximum number of items to return in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that you can retrieve the remaining results.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>If present, indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a next call to the operation to get more output. You can repeat this until the <code>NextToken</code> response element returns <code>null</code>.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>An array of <code>Filter</code> objects. Contains the filter to apply when listing sessions.</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 `.filters.is_none()`.
    pub fn filters(&self) -> &[crate::types::Filter] {
        self.filters.as_deref().unwrap_or_default()
    }
}
impl ListSessionsInput {
    /// Creates a new builder-style object to manufacture [`ListSessionsInput`](crate::operation::list_sessions::ListSessionsInput).
    pub fn builder() -> crate::operation::list_sessions::builders::ListSessionsInputBuilder {
        crate::operation::list_sessions::builders::ListSessionsInputBuilder::default()
    }
}

/// A builder for [`ListSessionsInput`](crate::operation::list_sessions::ListSessionsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListSessionsInputBuilder {
    pub(crate) approval_team_arn: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
}
impl ListSessionsInputBuilder {
    /// <p>Amazon Resource Name (ARN) for the approval team.</p>
    /// This field is required.
    pub fn approval_team_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.approval_team_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Amazon Resource Name (ARN) for the approval team.</p>
    pub fn set_approval_team_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.approval_team_arn = input;
        self
    }
    /// <p>Amazon Resource Name (ARN) for the approval team.</p>
    pub fn get_approval_team_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.approval_team_arn
    }
    /// <p>The maximum number of items to return in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that you can retrieve the remaining results.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of items to return in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that you can retrieve the remaining results.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of items to return in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that you can retrieve the remaining results.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>If present, indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a next call to the operation to get more output. You can repeat this until the <code>NextToken</code> response element returns <code>null</code>.</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>If present, indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a next call to the operation to get more output. You can repeat this until the <code>NextToken</code> response element returns <code>null</code>.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>If present, indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a next call to the operation to get more output. You can repeat this until the <code>NextToken</code> response element returns <code>null</code>.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Appends an item to `filters`.
    ///
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
    ///
    /// <p>An array of <code>Filter</code> objects. Contains the filter to apply when listing sessions.</p>
    pub fn filters(mut self, input: crate::types::Filter) -> Self {
        let mut v = self.filters.unwrap_or_default();
        v.push(input);
        self.filters = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of <code>Filter</code> objects. Contains the filter to apply when listing sessions.</p>
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
        self.filters = input;
        self
    }
    /// <p>An array of <code>Filter</code> objects. Contains the filter to apply when listing sessions.</p>
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
        &self.filters
    }
    /// Consumes the builder and constructs a [`ListSessionsInput`](crate::operation::list_sessions::ListSessionsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::list_sessions::ListSessionsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_sessions::ListSessionsInput {
            approval_team_arn: self.approval_team_arn,
            max_results: self.max_results,
            next_token: self.next_token,
            filters: self.filters,
        })
    }
}