aws-sdk-cloudwatchlogs 1.96.0

AWS SDK for Amazon CloudWatch Logs
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 PutIntegrationInput {
    /// <p>A name for the integration.</p>
    pub integration_name: ::std::option::Option<::std::string::String>,
    /// <p>A structure that contains configuration information for the integration that you are creating.</p>
    pub resource_config: ::std::option::Option<crate::types::ResourceConfig>,
    /// <p>The type of integration. Currently, the only supported type is <code>OPENSEARCH</code>.</p>
    pub integration_type: ::std::option::Option<crate::types::IntegrationType>,
}
impl PutIntegrationInput {
    /// <p>A name for the integration.</p>
    pub fn integration_name(&self) -> ::std::option::Option<&str> {
        self.integration_name.as_deref()
    }
    /// <p>A structure that contains configuration information for the integration that you are creating.</p>
    pub fn resource_config(&self) -> ::std::option::Option<&crate::types::ResourceConfig> {
        self.resource_config.as_ref()
    }
    /// <p>The type of integration. Currently, the only supported type is <code>OPENSEARCH</code>.</p>
    pub fn integration_type(&self) -> ::std::option::Option<&crate::types::IntegrationType> {
        self.integration_type.as_ref()
    }
}
impl PutIntegrationInput {
    /// Creates a new builder-style object to manufacture [`PutIntegrationInput`](crate::operation::put_integration::PutIntegrationInput).
    pub fn builder() -> crate::operation::put_integration::builders::PutIntegrationInputBuilder {
        crate::operation::put_integration::builders::PutIntegrationInputBuilder::default()
    }
}

/// A builder for [`PutIntegrationInput`](crate::operation::put_integration::PutIntegrationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutIntegrationInputBuilder {
    pub(crate) integration_name: ::std::option::Option<::std::string::String>,
    pub(crate) resource_config: ::std::option::Option<crate::types::ResourceConfig>,
    pub(crate) integration_type: ::std::option::Option<crate::types::IntegrationType>,
}
impl PutIntegrationInputBuilder {
    /// <p>A name for the integration.</p>
    /// This field is required.
    pub fn integration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.integration_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A name for the integration.</p>
    pub fn set_integration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.integration_name = input;
        self
    }
    /// <p>A name for the integration.</p>
    pub fn get_integration_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.integration_name
    }
    /// <p>A structure that contains configuration information for the integration that you are creating.</p>
    /// This field is required.
    pub fn resource_config(mut self, input: crate::types::ResourceConfig) -> Self {
        self.resource_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>A structure that contains configuration information for the integration that you are creating.</p>
    pub fn set_resource_config(mut self, input: ::std::option::Option<crate::types::ResourceConfig>) -> Self {
        self.resource_config = input;
        self
    }
    /// <p>A structure that contains configuration information for the integration that you are creating.</p>
    pub fn get_resource_config(&self) -> &::std::option::Option<crate::types::ResourceConfig> {
        &self.resource_config
    }
    /// <p>The type of integration. Currently, the only supported type is <code>OPENSEARCH</code>.</p>
    /// This field is required.
    pub fn integration_type(mut self, input: crate::types::IntegrationType) -> Self {
        self.integration_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of integration. Currently, the only supported type is <code>OPENSEARCH</code>.</p>
    pub fn set_integration_type(mut self, input: ::std::option::Option<crate::types::IntegrationType>) -> Self {
        self.integration_type = input;
        self
    }
    /// <p>The type of integration. Currently, the only supported type is <code>OPENSEARCH</code>.</p>
    pub fn get_integration_type(&self) -> &::std::option::Option<crate::types::IntegrationType> {
        &self.integration_type
    }
    /// Consumes the builder and constructs a [`PutIntegrationInput`](crate::operation::put_integration::PutIntegrationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::put_integration::PutIntegrationInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::put_integration::PutIntegrationInput {
            integration_name: self.integration_name,
            resource_config: self.resource_config,
            integration_type: self.integration_type,
        })
    }
}