aws-sdk-cloudwatchomni 1.2.0

AWS SDK for CloudWatch Omni
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// The request for listing the integrations in an account.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListIntegrationsInput {
    /// Returns only integrations of this provider type.
    pub integration_type: ::std::option::Option<crate::types::IntegrationType>,
    /// Returns only integrations in this status.
    pub status: ::std::option::Option<crate::types::IntegrationStatus>,
    /// Returns only the integration with this exact name.
    pub name: ::std::option::Option<::std::string::String>,
    /// Pagination token from a previous response; omit for the first page.
    pub next_token: ::std::option::Option<::std::string::String>,
    /// Maximum number of integrations to return in one page.
    pub max_results: ::std::option::Option<i32>,
}
impl ListIntegrationsInput {
    /// Returns only integrations of this provider type.
    pub fn integration_type(&self) -> ::std::option::Option<&crate::types::IntegrationType> {
        self.integration_type.as_ref()
    }
    /// Returns only integrations in this status.
    pub fn status(&self) -> ::std::option::Option<&crate::types::IntegrationStatus> {
        self.status.as_ref()
    }
    /// Returns only the integration with this exact name.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// Pagination token from a previous response; omit for the first page.
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// Maximum number of integrations to return in one page.
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
}
impl ListIntegrationsInput {
    /// Creates a new builder-style object to manufacture [`ListIntegrationsInput`](crate::operation::list_integrations::ListIntegrationsInput).
    pub fn builder() -> crate::operation::list_integrations::builders::ListIntegrationsInputBuilder {
        crate::operation::list_integrations::builders::ListIntegrationsInputBuilder::default()
    }
}

/// A builder for [`ListIntegrationsInput`](crate::operation::list_integrations::ListIntegrationsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListIntegrationsInputBuilder {
    pub(crate) integration_type: ::std::option::Option<crate::types::IntegrationType>,
    pub(crate) status: ::std::option::Option<crate::types::IntegrationStatus>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
}
impl ListIntegrationsInputBuilder {
    /// Returns only integrations of this provider type.
    pub fn integration_type(mut self, input: crate::types::IntegrationType) -> Self {
        self.integration_type = ::std::option::Option::Some(input);
        self
    }
    /// Returns only integrations of this provider type.
    pub fn set_integration_type(mut self, input: ::std::option::Option<crate::types::IntegrationType>) -> Self {
        self.integration_type = input;
        self
    }
    /// Returns only integrations of this provider type.
    pub fn get_integration_type(&self) -> &::std::option::Option<crate::types::IntegrationType> {
        &self.integration_type
    }
    /// Returns only integrations in this status.
    pub fn status(mut self, input: crate::types::IntegrationStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// Returns only integrations in this status.
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::IntegrationStatus>) -> Self {
        self.status = input;
        self
    }
    /// Returns only integrations in this status.
    pub fn get_status(&self) -> &::std::option::Option<crate::types::IntegrationStatus> {
        &self.status
    }
    /// Returns only the integration with this exact name.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// Returns only the integration with this exact name.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// Returns only the integration with this exact name.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Pagination token from a previous response; omit for the first page.
    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
    }
    /// Pagination token from a previous response; omit for the first page.
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// Pagination token from a previous response; omit for the first page.
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Maximum number of integrations to return in one page.
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// Maximum number of integrations to return in one page.
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// Maximum number of integrations to return in one page.
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// Consumes the builder and constructs a [`ListIntegrationsInput`](crate::operation::list_integrations::ListIntegrationsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::list_integrations::ListIntegrationsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_integrations::ListIntegrationsInput {
            integration_type: self.integration_type,
            status: self.status,
            name: self.name,
            next_token: self.next_token,
            max_results: self.max_results,
        })
    }
}