aws-sdk-continuum 1.0.0

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

/// Specifies the Collector to disassociate from this Environment.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DisassociateCollectorInput {
    /// The unique identifier of the Environment whose associations are updated.
    pub environment_id: ::std::option::Option<::std::string::String>,
    /// The ARN of the Collector to disassociate from this Environment.
    pub collector_arn: ::std::option::Option<::std::string::String>,
}
impl DisassociateCollectorInput {
    /// The unique identifier of the Environment whose associations are updated.
    pub fn environment_id(&self) -> ::std::option::Option<&str> {
        self.environment_id.as_deref()
    }
    /// The ARN of the Collector to disassociate from this Environment.
    pub fn collector_arn(&self) -> ::std::option::Option<&str> {
        self.collector_arn.as_deref()
    }
}
impl DisassociateCollectorInput {
    /// Creates a new builder-style object to manufacture [`DisassociateCollectorInput`](crate::operation::disassociate_collector::DisassociateCollectorInput).
    pub fn builder() -> crate::operation::disassociate_collector::builders::DisassociateCollectorInputBuilder {
        crate::operation::disassociate_collector::builders::DisassociateCollectorInputBuilder::default()
    }
}

/// A builder for [`DisassociateCollectorInput`](crate::operation::disassociate_collector::DisassociateCollectorInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DisassociateCollectorInputBuilder {
    pub(crate) environment_id: ::std::option::Option<::std::string::String>,
    pub(crate) collector_arn: ::std::option::Option<::std::string::String>,
}
impl DisassociateCollectorInputBuilder {
    /// The unique identifier of the Environment whose associations are updated.
    /// This field is required.
    pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.environment_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The unique identifier of the Environment whose associations are updated.
    pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.environment_id = input;
        self
    }
    /// The unique identifier of the Environment whose associations are updated.
    pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.environment_id
    }
    /// The ARN of the Collector to disassociate from this Environment.
    /// This field is required.
    pub fn collector_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.collector_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The ARN of the Collector to disassociate from this Environment.
    pub fn set_collector_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.collector_arn = input;
        self
    }
    /// The ARN of the Collector to disassociate from this Environment.
    pub fn get_collector_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.collector_arn
    }
    /// Consumes the builder and constructs a [`DisassociateCollectorInput`](crate::operation::disassociate_collector::DisassociateCollectorInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::disassociate_collector::DisassociateCollectorInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::disassociate_collector::DisassociateCollectorInput {
            environment_id: self.environment_id,
            collector_arn: self.collector_arn,
        })
    }
}