aws-sdk-context 1.0.0

AWS SDK for AWS Context
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 DeleteConnectionInput {
    /// <p>The connection to delete, by its ID (which starts with <code>conn-</code>) or its ARN.</p>
    pub connection_id: ::std::option::Option<::std::string::String>,
    /// <p>Specifies what happens to the connectivity resources behind the connection: the AWS Glue connection, whether AWS Context created it or you specified an existing one. AWS Context keeps the AWS Glue connections named in <code>glueConnectionMappings</code>. This member doesn't affect agent context content. To remove the connection's content from an agent context, remove the connection from the agent context with UpdateAgentContext. AWS Context never changes your source data. If you omit it, the default is <code>RETAIN</code>. It has no effect on <code>GLUE_DATA_CATALOG</code> and <code>BEDROCK_KNOWLEDGE_BASE</code> connections.</p>
    pub deletion_mode: ::std::option::Option<crate::types::DeletionMode>,
}
impl DeleteConnectionInput {
    /// <p>The connection to delete, by its ID (which starts with <code>conn-</code>) or its ARN.</p>
    pub fn connection_id(&self) -> ::std::option::Option<&str> {
        self.connection_id.as_deref()
    }
    /// <p>Specifies what happens to the connectivity resources behind the connection: the AWS Glue connection, whether AWS Context created it or you specified an existing one. AWS Context keeps the AWS Glue connections named in <code>glueConnectionMappings</code>. This member doesn't affect agent context content. To remove the connection's content from an agent context, remove the connection from the agent context with UpdateAgentContext. AWS Context never changes your source data. If you omit it, the default is <code>RETAIN</code>. It has no effect on <code>GLUE_DATA_CATALOG</code> and <code>BEDROCK_KNOWLEDGE_BASE</code> connections.</p>
    pub fn deletion_mode(&self) -> ::std::option::Option<&crate::types::DeletionMode> {
        self.deletion_mode.as_ref()
    }
}
impl DeleteConnectionInput {
    /// Creates a new builder-style object to manufacture [`DeleteConnectionInput`](crate::operation::delete_connection::DeleteConnectionInput).
    pub fn builder() -> crate::operation::delete_connection::builders::DeleteConnectionInputBuilder {
        crate::operation::delete_connection::builders::DeleteConnectionInputBuilder::default()
    }
}

/// A builder for [`DeleteConnectionInput`](crate::operation::delete_connection::DeleteConnectionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteConnectionInputBuilder {
    pub(crate) connection_id: ::std::option::Option<::std::string::String>,
    pub(crate) deletion_mode: ::std::option::Option<crate::types::DeletionMode>,
}
impl DeleteConnectionInputBuilder {
    /// <p>The connection to delete, by its ID (which starts with <code>conn-</code>) or its ARN.</p>
    /// This field is required.
    pub fn connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connection_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The connection to delete, by its ID (which starts with <code>conn-</code>) or its ARN.</p>
    pub fn set_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connection_id = input;
        self
    }
    /// <p>The connection to delete, by its ID (which starts with <code>conn-</code>) or its ARN.</p>
    pub fn get_connection_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.connection_id
    }
    /// <p>Specifies what happens to the connectivity resources behind the connection: the AWS Glue connection, whether AWS Context created it or you specified an existing one. AWS Context keeps the AWS Glue connections named in <code>glueConnectionMappings</code>. This member doesn't affect agent context content. To remove the connection's content from an agent context, remove the connection from the agent context with UpdateAgentContext. AWS Context never changes your source data. If you omit it, the default is <code>RETAIN</code>. It has no effect on <code>GLUE_DATA_CATALOG</code> and <code>BEDROCK_KNOWLEDGE_BASE</code> connections.</p>
    pub fn deletion_mode(mut self, input: crate::types::DeletionMode) -> Self {
        self.deletion_mode = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies what happens to the connectivity resources behind the connection: the AWS Glue connection, whether AWS Context created it or you specified an existing one. AWS Context keeps the AWS Glue connections named in <code>glueConnectionMappings</code>. This member doesn't affect agent context content. To remove the connection's content from an agent context, remove the connection from the agent context with UpdateAgentContext. AWS Context never changes your source data. If you omit it, the default is <code>RETAIN</code>. It has no effect on <code>GLUE_DATA_CATALOG</code> and <code>BEDROCK_KNOWLEDGE_BASE</code> connections.</p>
    pub fn set_deletion_mode(mut self, input: ::std::option::Option<crate::types::DeletionMode>) -> Self {
        self.deletion_mode = input;
        self
    }
    /// <p>Specifies what happens to the connectivity resources behind the connection: the AWS Glue connection, whether AWS Context created it or you specified an existing one. AWS Context keeps the AWS Glue connections named in <code>glueConnectionMappings</code>. This member doesn't affect agent context content. To remove the connection's content from an agent context, remove the connection from the agent context with UpdateAgentContext. AWS Context never changes your source data. If you omit it, the default is <code>RETAIN</code>. It has no effect on <code>GLUE_DATA_CATALOG</code> and <code>BEDROCK_KNOWLEDGE_BASE</code> connections.</p>
    pub fn get_deletion_mode(&self) -> &::std::option::Option<crate::types::DeletionMode> {
        &self.deletion_mode
    }
    /// Consumes the builder and constructs a [`DeleteConnectionInput`](crate::operation::delete_connection::DeleteConnectionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_connection::DeleteConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_connection::DeleteConnectionInput {
            connection_id: self.connection_id,
            deletion_mode: self.deletion_mode,
        })
    }
}