aws_sdk_sagemaker/operation/delete_association/
_delete_association_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 DeleteAssociationInput {
6    /// <p>The ARN of the source.</p>
7    pub source_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Resource Name (ARN) of the destination.</p>
9    pub destination_arn: ::std::option::Option<::std::string::String>,
10}
11impl DeleteAssociationInput {
12    /// <p>The ARN of the source.</p>
13    pub fn source_arn(&self) -> ::std::option::Option<&str> {
14        self.source_arn.as_deref()
15    }
16    /// <p>The Amazon Resource Name (ARN) of the destination.</p>
17    pub fn destination_arn(&self) -> ::std::option::Option<&str> {
18        self.destination_arn.as_deref()
19    }
20}
21impl DeleteAssociationInput {
22    /// Creates a new builder-style object to manufacture [`DeleteAssociationInput`](crate::operation::delete_association::DeleteAssociationInput).
23    pub fn builder() -> crate::operation::delete_association::builders::DeleteAssociationInputBuilder {
24        crate::operation::delete_association::builders::DeleteAssociationInputBuilder::default()
25    }
26}
27
28/// A builder for [`DeleteAssociationInput`](crate::operation::delete_association::DeleteAssociationInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DeleteAssociationInputBuilder {
32    pub(crate) source_arn: ::std::option::Option<::std::string::String>,
33    pub(crate) destination_arn: ::std::option::Option<::std::string::String>,
34}
35impl DeleteAssociationInputBuilder {
36    /// <p>The ARN of the source.</p>
37    /// This field is required.
38    pub fn source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.source_arn = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The ARN of the source.</p>
43    pub fn set_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.source_arn = input;
45        self
46    }
47    /// <p>The ARN of the source.</p>
48    pub fn get_source_arn(&self) -> &::std::option::Option<::std::string::String> {
49        &self.source_arn
50    }
51    /// <p>The Amazon Resource Name (ARN) of the destination.</p>
52    /// This field is required.
53    pub fn destination_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.destination_arn = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The Amazon Resource Name (ARN) of the destination.</p>
58    pub fn set_destination_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.destination_arn = input;
60        self
61    }
62    /// <p>The Amazon Resource Name (ARN) of the destination.</p>
63    pub fn get_destination_arn(&self) -> &::std::option::Option<::std::string::String> {
64        &self.destination_arn
65    }
66    /// Consumes the builder and constructs a [`DeleteAssociationInput`](crate::operation::delete_association::DeleteAssociationInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<crate::operation::delete_association::DeleteAssociationInput, ::aws_smithy_types::error::operation::BuildError> {
70        ::std::result::Result::Ok(crate::operation::delete_association::DeleteAssociationInput {
71            source_arn: self.source_arn,
72            destination_arn: self.destination_arn,
73        })
74    }
75}