aws-sdk-datazone 1.136.0

AWS SDK for Amazon DataZone
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 ListConnectionsInput {
    /// <p>The ID of the domain where you want to list connections.</p>
    pub domain_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The maximum number of connections to return in a single call to ListConnections. When the number of connections to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListConnections to list the next set of connections.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>When the number of connections is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of connections, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListConnections to list the next set of connections.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>Specifies how you want to sort the listed connections.</p>
    pub sort_by: ::std::option::Option<crate::types::SortFieldConnection>,
    /// <p>Specifies the sort order for the listed connections.</p>
    pub sort_order: ::std::option::Option<crate::types::SortOrder>,
    /// <p>The name of the connection.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the environment where you want to list connections.</p>
    pub environment_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the project where you want to list connections.</p>
    pub project_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The type of connection.</p>
    pub r#type: ::std::option::Option<crate::types::ConnectionType>,
    /// <p>The scope of the connection.</p>
    pub scope: ::std::option::Option<crate::types::ConnectionScope>,
}
impl ListConnectionsInput {
    /// <p>The ID of the domain where you want to list connections.</p>
    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
        self.domain_identifier.as_deref()
    }
    /// <p>The maximum number of connections to return in a single call to ListConnections. When the number of connections to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListConnections to list the next set of connections.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>When the number of connections is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of connections, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListConnections to list the next set of connections.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>Specifies how you want to sort the listed connections.</p>
    pub fn sort_by(&self) -> ::std::option::Option<&crate::types::SortFieldConnection> {
        self.sort_by.as_ref()
    }
    /// <p>Specifies the sort order for the listed connections.</p>
    pub fn sort_order(&self) -> ::std::option::Option<&crate::types::SortOrder> {
        self.sort_order.as_ref()
    }
    /// <p>The name of the connection.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The ID of the environment where you want to list connections.</p>
    pub fn environment_identifier(&self) -> ::std::option::Option<&str> {
        self.environment_identifier.as_deref()
    }
    /// <p>The ID of the project where you want to list connections.</p>
    pub fn project_identifier(&self) -> ::std::option::Option<&str> {
        self.project_identifier.as_deref()
    }
    /// <p>The type of connection.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::ConnectionType> {
        self.r#type.as_ref()
    }
    /// <p>The scope of the connection.</p>
    pub fn scope(&self) -> ::std::option::Option<&crate::types::ConnectionScope> {
        self.scope.as_ref()
    }
}
impl ListConnectionsInput {
    /// Creates a new builder-style object to manufacture [`ListConnectionsInput`](crate::operation::list_connections::ListConnectionsInput).
    pub fn builder() -> crate::operation::list_connections::builders::ListConnectionsInputBuilder {
        crate::operation::list_connections::builders::ListConnectionsInputBuilder::default()
    }
}

/// A builder for [`ListConnectionsInput`](crate::operation::list_connections::ListConnectionsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListConnectionsInputBuilder {
    pub(crate) domain_identifier: ::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) sort_by: ::std::option::Option<crate::types::SortFieldConnection>,
    pub(crate) sort_order: ::std::option::Option<crate::types::SortOrder>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) environment_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) project_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::ConnectionType>,
    pub(crate) scope: ::std::option::Option<crate::types::ConnectionScope>,
}
impl ListConnectionsInputBuilder {
    /// <p>The ID of the domain where you want to list connections.</p>
    /// This field is required.
    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the domain where you want to list connections.</p>
    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_identifier = input;
        self
    }
    /// <p>The ID of the domain where you want to list connections.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_identifier
    }
    /// <p>The maximum number of connections to return in a single call to ListConnections. When the number of connections to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListConnections to list the next set of connections.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of connections to return in a single call to ListConnections. When the number of connections to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListConnections to list the next set of connections.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of connections to return in a single call to ListConnections. When the number of connections to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListConnections to list the next set of connections.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>When the number of connections is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of connections, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListConnections to list the next set of connections.</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>When the number of connections is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of connections, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListConnections to list the next set of connections.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>When the number of connections is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of connections, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListConnections to list the next set of connections.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>Specifies how you want to sort the listed connections.</p>
    pub fn sort_by(mut self, input: crate::types::SortFieldConnection) -> Self {
        self.sort_by = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies how you want to sort the listed connections.</p>
    pub fn set_sort_by(mut self, input: ::std::option::Option<crate::types::SortFieldConnection>) -> Self {
        self.sort_by = input;
        self
    }
    /// <p>Specifies how you want to sort the listed connections.</p>
    pub fn get_sort_by(&self) -> &::std::option::Option<crate::types::SortFieldConnection> {
        &self.sort_by
    }
    /// <p>Specifies the sort order for the listed connections.</p>
    pub fn sort_order(mut self, input: crate::types::SortOrder) -> Self {
        self.sort_order = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the sort order for the listed connections.</p>
    pub fn set_sort_order(mut self, input: ::std::option::Option<crate::types::SortOrder>) -> Self {
        self.sort_order = input;
        self
    }
    /// <p>Specifies the sort order for the listed connections.</p>
    pub fn get_sort_order(&self) -> &::std::option::Option<crate::types::SortOrder> {
        &self.sort_order
    }
    /// <p>The name of the connection.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the connection.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the connection.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The ID of the environment where you want to list connections.</p>
    pub fn environment_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.environment_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the environment where you want to list connections.</p>
    pub fn set_environment_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.environment_identifier = input;
        self
    }
    /// <p>The ID of the environment where you want to list connections.</p>
    pub fn get_environment_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.environment_identifier
    }
    /// <p>The ID of the project where you want to list connections.</p>
    pub fn project_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.project_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the project where you want to list connections.</p>
    pub fn set_project_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.project_identifier = input;
        self
    }
    /// <p>The ID of the project where you want to list connections.</p>
    pub fn get_project_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.project_identifier
    }
    /// <p>The type of connection.</p>
    pub fn r#type(mut self, input: crate::types::ConnectionType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of connection.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::ConnectionType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of connection.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::ConnectionType> {
        &self.r#type
    }
    /// <p>The scope of the connection.</p>
    pub fn scope(mut self, input: crate::types::ConnectionScope) -> Self {
        self.scope = ::std::option::Option::Some(input);
        self
    }
    /// <p>The scope of the connection.</p>
    pub fn set_scope(mut self, input: ::std::option::Option<crate::types::ConnectionScope>) -> Self {
        self.scope = input;
        self
    }
    /// <p>The scope of the connection.</p>
    pub fn get_scope(&self) -> &::std::option::Option<crate::types::ConnectionScope> {
        &self.scope
    }
    /// Consumes the builder and constructs a [`ListConnectionsInput`](crate::operation::list_connections::ListConnectionsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::list_connections::ListConnectionsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_connections::ListConnectionsInput {
            domain_identifier: self.domain_identifier,
            max_results: self.max_results,
            next_token: self.next_token,
            sort_by: self.sort_by,
            sort_order: self.sort_order,
            name: self.name,
            environment_identifier: self.environment_identifier,
            project_identifier: self.project_identifier,
            r#type: self.r#type,
            scope: self.scope,
        })
    }
}