aws_sdk_codestarconnections/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 Amazon Resource Name (ARN) of the connection to be deleted.</p><note>
7    /// <p>The ARN is never reused if the connection is deleted.</p>
8    /// </note>
9    pub connection_arn: ::std::option::Option<::std::string::String>,
10}
11impl DeleteConnectionInput {
12    /// <p>The Amazon Resource Name (ARN) of the connection to be deleted.</p><note>
13    /// <p>The ARN is never reused if the connection is deleted.</p>
14    /// </note>
15    pub fn connection_arn(&self) -> ::std::option::Option<&str> {
16        self.connection_arn.as_deref()
17    }
18}
19impl DeleteConnectionInput {
20    /// Creates a new builder-style object to manufacture [`DeleteConnectionInput`](crate::operation::delete_connection::DeleteConnectionInput).
21    pub fn builder() -> crate::operation::delete_connection::builders::DeleteConnectionInputBuilder {
22        crate::operation::delete_connection::builders::DeleteConnectionInputBuilder::default()
23    }
24}
25
26/// A builder for [`DeleteConnectionInput`](crate::operation::delete_connection::DeleteConnectionInput).
27#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
28#[non_exhaustive]
29pub struct DeleteConnectionInputBuilder {
30    pub(crate) connection_arn: ::std::option::Option<::std::string::String>,
31}
32impl DeleteConnectionInputBuilder {
33    /// <p>The Amazon Resource Name (ARN) of the connection to be deleted.</p><note>
34    /// <p>The ARN is never reused if the connection is deleted.</p>
35    /// </note>
36    /// This field is required.
37    pub fn connection_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
38        self.connection_arn = ::std::option::Option::Some(input.into());
39        self
40    }
41    /// <p>The Amazon Resource Name (ARN) of the connection to be deleted.</p><note>
42    /// <p>The ARN is never reused if the connection is deleted.</p>
43    /// </note>
44    pub fn set_connection_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45        self.connection_arn = input;
46        self
47    }
48    /// <p>The Amazon Resource Name (ARN) of the connection to be deleted.</p><note>
49    /// <p>The ARN is never reused if the connection is deleted.</p>
50    /// </note>
51    pub fn get_connection_arn(&self) -> &::std::option::Option<::std::string::String> {
52        &self.connection_arn
53    }
54    /// Consumes the builder and constructs a [`DeleteConnectionInput`](crate::operation::delete_connection::DeleteConnectionInput).
55    pub fn build(
56        self,
57    ) -> ::std::result::Result<crate::operation::delete_connection::DeleteConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
58        ::std::result::Result::Ok(crate::operation::delete_connection::DeleteConnectionInput {
59            connection_arn: self.connection_arn,
60        })
61    }
62}