Skip to main content

aws_sdk_context/operation/delete_connection/
_delete_connection_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteConnectionInput {
6    /// <p>The connection to delete, by its ID (which starts with <code>conn-</code>) or its ARN.</p>
7    pub connection_id: ::std::option::Option<::std::string::String>,
8    /// <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>
9    pub deletion_mode: ::std::option::Option<crate::types::DeletionMode>,
10}
11impl DeleteConnectionInput {
12    /// <p>The connection to delete, by its ID (which starts with <code>conn-</code>) or its ARN.</p>
13    pub fn connection_id(&self) -> ::std::option::Option<&str> {
14        self.connection_id.as_deref()
15    }
16    /// <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>
17    pub fn deletion_mode(&self) -> ::std::option::Option<&crate::types::DeletionMode> {
18        self.deletion_mode.as_ref()
19    }
20}
21impl DeleteConnectionInput {
22    /// Creates a new builder-style object to manufacture [`DeleteConnectionInput`](crate::operation::delete_connection::DeleteConnectionInput).
23    pub fn builder() -> crate::operation::delete_connection::builders::DeleteConnectionInputBuilder {
24        crate::operation::delete_connection::builders::DeleteConnectionInputBuilder::default()
25    }
26}
27
28/// A builder for [`DeleteConnectionInput`](crate::operation::delete_connection::DeleteConnectionInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DeleteConnectionInputBuilder {
32    pub(crate) connection_id: ::std::option::Option<::std::string::String>,
33    pub(crate) deletion_mode: ::std::option::Option<crate::types::DeletionMode>,
34}
35impl DeleteConnectionInputBuilder {
36    /// <p>The connection to delete, by its ID (which starts with <code>conn-</code>) or its ARN.</p>
37    /// This field is required.
38    pub fn connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.connection_id = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The connection to delete, by its ID (which starts with <code>conn-</code>) or its ARN.</p>
43    pub fn set_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.connection_id = input;
45        self
46    }
47    /// <p>The connection to delete, by its ID (which starts with <code>conn-</code>) or its ARN.</p>
48    pub fn get_connection_id(&self) -> &::std::option::Option<::std::string::String> {
49        &self.connection_id
50    }
51    /// <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>
52    pub fn deletion_mode(mut self, input: crate::types::DeletionMode) -> Self {
53        self.deletion_mode = ::std::option::Option::Some(input);
54        self
55    }
56    /// <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>
57    pub fn set_deletion_mode(mut self, input: ::std::option::Option<crate::types::DeletionMode>) -> Self {
58        self.deletion_mode = input;
59        self
60    }
61    /// <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>
62    pub fn get_deletion_mode(&self) -> &::std::option::Option<crate::types::DeletionMode> {
63        &self.deletion_mode
64    }
65    /// Consumes the builder and constructs a [`DeleteConnectionInput`](crate::operation::delete_connection::DeleteConnectionInput).
66    pub fn build(
67        self,
68    ) -> ::std::result::Result<crate::operation::delete_connection::DeleteConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
69        ::std::result::Result::Ok(crate::operation::delete_connection::DeleteConnectionInput {
70            connection_id: self.connection_id,
71            deletion_mode: self.deletion_mode,
72        })
73    }
74}