aws-sdk-managedblockchainquery 1.101.0

AWS SDK for Amazon Managed Blockchain Query
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 ListTransactionsInput {
    /// <p>The address (either a contract or wallet), whose transactions are being requested.</p>
    pub address: ::std::option::Option<::std::string::String>,
    /// <p>The blockchain network where the transactions occurred.</p>
    pub network: ::std::option::Option<crate::types::QueryNetwork>,
    /// <p>The container for time.</p>
    pub from_blockchain_instant: ::std::option::Option<crate::types::BlockchainInstant>,
    /// <p>The container for time.</p>
    pub to_blockchain_instant: ::std::option::Option<crate::types::BlockchainInstant>,
    /// <p>The order by which the results will be sorted.</p>
    pub sort: ::std::option::Option<crate::types::ListTransactionsSort>,
    /// <p>The pagination token that indicates the next set of results to retrieve.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>The maximum number of transactions to list.</p>
    /// <p>Default: <code>100</code></p><note>
    /// <p>Even if additional results can be retrieved, the request can return less results than <code>maxResults</code> or an empty array of results.</p>
    /// <p>To retrieve the next set of results, make another request with the returned <code>nextToken</code> value. The value of <code>nextToken</code> is <code>null</code> when there are no more results to return</p>
    /// </note>
    pub max_results: ::std::option::Option<i32>,
    /// <p>This filter is used to include transactions in the response that haven't reached <a href="https://docs.aws.amazon.com/managed-blockchain/latest/ambq-dg/key-concepts.html#finality"> <i>finality</i> </a>. Transactions that have reached finality are always part of the response.</p>
    pub confirmation_status_filter: ::std::option::Option<crate::types::ConfirmationStatusFilter>,
}
impl ListTransactionsInput {
    /// <p>The address (either a contract or wallet), whose transactions are being requested.</p>
    pub fn address(&self) -> ::std::option::Option<&str> {
        self.address.as_deref()
    }
    /// <p>The blockchain network where the transactions occurred.</p>
    pub fn network(&self) -> ::std::option::Option<&crate::types::QueryNetwork> {
        self.network.as_ref()
    }
    /// <p>The container for time.</p>
    pub fn from_blockchain_instant(&self) -> ::std::option::Option<&crate::types::BlockchainInstant> {
        self.from_blockchain_instant.as_ref()
    }
    /// <p>The container for time.</p>
    pub fn to_blockchain_instant(&self) -> ::std::option::Option<&crate::types::BlockchainInstant> {
        self.to_blockchain_instant.as_ref()
    }
    /// <p>The order by which the results will be sorted.</p>
    pub fn sort(&self) -> ::std::option::Option<&crate::types::ListTransactionsSort> {
        self.sort.as_ref()
    }
    /// <p>The pagination token that indicates the next set of results to retrieve.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The maximum number of transactions to list.</p>
    /// <p>Default: <code>100</code></p><note>
    /// <p>Even if additional results can be retrieved, the request can return less results than <code>maxResults</code> or an empty array of results.</p>
    /// <p>To retrieve the next set of results, make another request with the returned <code>nextToken</code> value. The value of <code>nextToken</code> is <code>null</code> when there are no more results to return</p>
    /// </note>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>This filter is used to include transactions in the response that haven't reached <a href="https://docs.aws.amazon.com/managed-blockchain/latest/ambq-dg/key-concepts.html#finality"> <i>finality</i> </a>. Transactions that have reached finality are always part of the response.</p>
    pub fn confirmation_status_filter(&self) -> ::std::option::Option<&crate::types::ConfirmationStatusFilter> {
        self.confirmation_status_filter.as_ref()
    }
}
impl ListTransactionsInput {
    /// Creates a new builder-style object to manufacture [`ListTransactionsInput`](crate::operation::list_transactions::ListTransactionsInput).
    pub fn builder() -> crate::operation::list_transactions::builders::ListTransactionsInputBuilder {
        crate::operation::list_transactions::builders::ListTransactionsInputBuilder::default()
    }
}

/// A builder for [`ListTransactionsInput`](crate::operation::list_transactions::ListTransactionsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListTransactionsInputBuilder {
    pub(crate) address: ::std::option::Option<::std::string::String>,
    pub(crate) network: ::std::option::Option<crate::types::QueryNetwork>,
    pub(crate) from_blockchain_instant: ::std::option::Option<crate::types::BlockchainInstant>,
    pub(crate) to_blockchain_instant: ::std::option::Option<crate::types::BlockchainInstant>,
    pub(crate) sort: ::std::option::Option<crate::types::ListTransactionsSort>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) confirmation_status_filter: ::std::option::Option<crate::types::ConfirmationStatusFilter>,
}
impl ListTransactionsInputBuilder {
    /// <p>The address (either a contract or wallet), whose transactions are being requested.</p>
    /// This field is required.
    pub fn address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The address (either a contract or wallet), whose transactions are being requested.</p>
    pub fn set_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.address = input;
        self
    }
    /// <p>The address (either a contract or wallet), whose transactions are being requested.</p>
    pub fn get_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.address
    }
    /// <p>The blockchain network where the transactions occurred.</p>
    /// This field is required.
    pub fn network(mut self, input: crate::types::QueryNetwork) -> Self {
        self.network = ::std::option::Option::Some(input);
        self
    }
    /// <p>The blockchain network where the transactions occurred.</p>
    pub fn set_network(mut self, input: ::std::option::Option<crate::types::QueryNetwork>) -> Self {
        self.network = input;
        self
    }
    /// <p>The blockchain network where the transactions occurred.</p>
    pub fn get_network(&self) -> &::std::option::Option<crate::types::QueryNetwork> {
        &self.network
    }
    /// <p>The container for time.</p>
    pub fn from_blockchain_instant(mut self, input: crate::types::BlockchainInstant) -> Self {
        self.from_blockchain_instant = ::std::option::Option::Some(input);
        self
    }
    /// <p>The container for time.</p>
    pub fn set_from_blockchain_instant(mut self, input: ::std::option::Option<crate::types::BlockchainInstant>) -> Self {
        self.from_blockchain_instant = input;
        self
    }
    /// <p>The container for time.</p>
    pub fn get_from_blockchain_instant(&self) -> &::std::option::Option<crate::types::BlockchainInstant> {
        &self.from_blockchain_instant
    }
    /// <p>The container for time.</p>
    pub fn to_blockchain_instant(mut self, input: crate::types::BlockchainInstant) -> Self {
        self.to_blockchain_instant = ::std::option::Option::Some(input);
        self
    }
    /// <p>The container for time.</p>
    pub fn set_to_blockchain_instant(mut self, input: ::std::option::Option<crate::types::BlockchainInstant>) -> Self {
        self.to_blockchain_instant = input;
        self
    }
    /// <p>The container for time.</p>
    pub fn get_to_blockchain_instant(&self) -> &::std::option::Option<crate::types::BlockchainInstant> {
        &self.to_blockchain_instant
    }
    /// <p>The order by which the results will be sorted.</p>
    pub fn sort(mut self, input: crate::types::ListTransactionsSort) -> Self {
        self.sort = ::std::option::Option::Some(input);
        self
    }
    /// <p>The order by which the results will be sorted.</p>
    pub fn set_sort(mut self, input: ::std::option::Option<crate::types::ListTransactionsSort>) -> Self {
        self.sort = input;
        self
    }
    /// <p>The order by which the results will be sorted.</p>
    pub fn get_sort(&self) -> &::std::option::Option<crate::types::ListTransactionsSort> {
        &self.sort
    }
    /// <p>The pagination token that indicates the next set of results to retrieve.</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>The pagination token that indicates the next set of results to retrieve.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>The pagination token that indicates the next set of results to retrieve.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>The maximum number of transactions to list.</p>
    /// <p>Default: <code>100</code></p><note>
    /// <p>Even if additional results can be retrieved, the request can return less results than <code>maxResults</code> or an empty array of results.</p>
    /// <p>To retrieve the next set of results, make another request with the returned <code>nextToken</code> value. The value of <code>nextToken</code> is <code>null</code> when there are no more results to return</p>
    /// </note>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of transactions to list.</p>
    /// <p>Default: <code>100</code></p><note>
    /// <p>Even if additional results can be retrieved, the request can return less results than <code>maxResults</code> or an empty array of results.</p>
    /// <p>To retrieve the next set of results, make another request with the returned <code>nextToken</code> value. The value of <code>nextToken</code> is <code>null</code> when there are no more results to return</p>
    /// </note>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of transactions to list.</p>
    /// <p>Default: <code>100</code></p><note>
    /// <p>Even if additional results can be retrieved, the request can return less results than <code>maxResults</code> or an empty array of results.</p>
    /// <p>To retrieve the next set of results, make another request with the returned <code>nextToken</code> value. The value of <code>nextToken</code> is <code>null</code> when there are no more results to return</p>
    /// </note>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>This filter is used to include transactions in the response that haven't reached <a href="https://docs.aws.amazon.com/managed-blockchain/latest/ambq-dg/key-concepts.html#finality"> <i>finality</i> </a>. Transactions that have reached finality are always part of the response.</p>
    pub fn confirmation_status_filter(mut self, input: crate::types::ConfirmationStatusFilter) -> Self {
        self.confirmation_status_filter = ::std::option::Option::Some(input);
        self
    }
    /// <p>This filter is used to include transactions in the response that haven't reached <a href="https://docs.aws.amazon.com/managed-blockchain/latest/ambq-dg/key-concepts.html#finality"> <i>finality</i> </a>. Transactions that have reached finality are always part of the response.</p>
    pub fn set_confirmation_status_filter(mut self, input: ::std::option::Option<crate::types::ConfirmationStatusFilter>) -> Self {
        self.confirmation_status_filter = input;
        self
    }
    /// <p>This filter is used to include transactions in the response that haven't reached <a href="https://docs.aws.amazon.com/managed-blockchain/latest/ambq-dg/key-concepts.html#finality"> <i>finality</i> </a>. Transactions that have reached finality are always part of the response.</p>
    pub fn get_confirmation_status_filter(&self) -> &::std::option::Option<crate::types::ConfirmationStatusFilter> {
        &self.confirmation_status_filter
    }
    /// Consumes the builder and constructs a [`ListTransactionsInput`](crate::operation::list_transactions::ListTransactionsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::list_transactions::ListTransactionsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_transactions::ListTransactionsInput {
            address: self.address,
            network: self.network,
            from_blockchain_instant: self.from_blockchain_instant,
            to_blockchain_instant: self.to_blockchain_instant,
            sort: self.sort,
            next_token: self.next_token,
            max_results: self.max_results,
            confirmation_status_filter: self.confirmation_status_filter,
        })
    }
}