aws_sdk_sagemaker/operation/add_association/_add_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 AddAssociationInput {
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 /// <p>The type of association. The following are suggested uses for each type. Amazon SageMaker places no restrictions on their use.</p>
11 /// <ul>
12 /// <li>
13 /// <p>ContributedTo - The source contributed to the destination or had a part in enabling the destination. For example, the training data contributed to the training job.</p></li>
14 /// <li>
15 /// <p>AssociatedWith - The source is connected to the destination. For example, an approval workflow is associated with a model deployment.</p></li>
16 /// <li>
17 /// <p>DerivedFrom - The destination is a modification of the source. For example, a digest output of a channel input for a processing job is derived from the original inputs.</p></li>
18 /// <li>
19 /// <p>Produced - The source generated the destination. For example, a training job produced a model artifact.</p></li>
20 /// </ul>
21 pub association_type: ::std::option::Option<crate::types::AssociationEdgeType>,
22}
23impl AddAssociationInput {
24 /// <p>The ARN of the source.</p>
25 pub fn source_arn(&self) -> ::std::option::Option<&str> {
26 self.source_arn.as_deref()
27 }
28 /// <p>The Amazon Resource Name (ARN) of the destination.</p>
29 pub fn destination_arn(&self) -> ::std::option::Option<&str> {
30 self.destination_arn.as_deref()
31 }
32 /// <p>The type of association. The following are suggested uses for each type. Amazon SageMaker places no restrictions on their use.</p>
33 /// <ul>
34 /// <li>
35 /// <p>ContributedTo - The source contributed to the destination or had a part in enabling the destination. For example, the training data contributed to the training job.</p></li>
36 /// <li>
37 /// <p>AssociatedWith - The source is connected to the destination. For example, an approval workflow is associated with a model deployment.</p></li>
38 /// <li>
39 /// <p>DerivedFrom - The destination is a modification of the source. For example, a digest output of a channel input for a processing job is derived from the original inputs.</p></li>
40 /// <li>
41 /// <p>Produced - The source generated the destination. For example, a training job produced a model artifact.</p></li>
42 /// </ul>
43 pub fn association_type(&self) -> ::std::option::Option<&crate::types::AssociationEdgeType> {
44 self.association_type.as_ref()
45 }
46}
47impl AddAssociationInput {
48 /// Creates a new builder-style object to manufacture [`AddAssociationInput`](crate::operation::add_association::AddAssociationInput).
49 pub fn builder() -> crate::operation::add_association::builders::AddAssociationInputBuilder {
50 crate::operation::add_association::builders::AddAssociationInputBuilder::default()
51 }
52}
53
54/// A builder for [`AddAssociationInput`](crate::operation::add_association::AddAssociationInput).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct AddAssociationInputBuilder {
58 pub(crate) source_arn: ::std::option::Option<::std::string::String>,
59 pub(crate) destination_arn: ::std::option::Option<::std::string::String>,
60 pub(crate) association_type: ::std::option::Option<crate::types::AssociationEdgeType>,
61}
62impl AddAssociationInputBuilder {
63 /// <p>The ARN of the source.</p>
64 /// This field is required.
65 pub fn source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66 self.source_arn = ::std::option::Option::Some(input.into());
67 self
68 }
69 /// <p>The ARN of the source.</p>
70 pub fn set_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71 self.source_arn = input;
72 self
73 }
74 /// <p>The ARN of the source.</p>
75 pub fn get_source_arn(&self) -> &::std::option::Option<::std::string::String> {
76 &self.source_arn
77 }
78 /// <p>The Amazon Resource Name (ARN) of the destination.</p>
79 /// This field is required.
80 pub fn destination_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.destination_arn = ::std::option::Option::Some(input.into());
82 self
83 }
84 /// <p>The Amazon Resource Name (ARN) of the destination.</p>
85 pub fn set_destination_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.destination_arn = input;
87 self
88 }
89 /// <p>The Amazon Resource Name (ARN) of the destination.</p>
90 pub fn get_destination_arn(&self) -> &::std::option::Option<::std::string::String> {
91 &self.destination_arn
92 }
93 /// <p>The type of association. The following are suggested uses for each type. Amazon SageMaker places no restrictions on their use.</p>
94 /// <ul>
95 /// <li>
96 /// <p>ContributedTo - The source contributed to the destination or had a part in enabling the destination. For example, the training data contributed to the training job.</p></li>
97 /// <li>
98 /// <p>AssociatedWith - The source is connected to the destination. For example, an approval workflow is associated with a model deployment.</p></li>
99 /// <li>
100 /// <p>DerivedFrom - The destination is a modification of the source. For example, a digest output of a channel input for a processing job is derived from the original inputs.</p></li>
101 /// <li>
102 /// <p>Produced - The source generated the destination. For example, a training job produced a model artifact.</p></li>
103 /// </ul>
104 pub fn association_type(mut self, input: crate::types::AssociationEdgeType) -> Self {
105 self.association_type = ::std::option::Option::Some(input);
106 self
107 }
108 /// <p>The type of association. The following are suggested uses for each type. Amazon SageMaker places no restrictions on their use.</p>
109 /// <ul>
110 /// <li>
111 /// <p>ContributedTo - The source contributed to the destination or had a part in enabling the destination. For example, the training data contributed to the training job.</p></li>
112 /// <li>
113 /// <p>AssociatedWith - The source is connected to the destination. For example, an approval workflow is associated with a model deployment.</p></li>
114 /// <li>
115 /// <p>DerivedFrom - The destination is a modification of the source. For example, a digest output of a channel input for a processing job is derived from the original inputs.</p></li>
116 /// <li>
117 /// <p>Produced - The source generated the destination. For example, a training job produced a model artifact.</p></li>
118 /// </ul>
119 pub fn set_association_type(mut self, input: ::std::option::Option<crate::types::AssociationEdgeType>) -> Self {
120 self.association_type = input;
121 self
122 }
123 /// <p>The type of association. The following are suggested uses for each type. Amazon SageMaker places no restrictions on their use.</p>
124 /// <ul>
125 /// <li>
126 /// <p>ContributedTo - The source contributed to the destination or had a part in enabling the destination. For example, the training data contributed to the training job.</p></li>
127 /// <li>
128 /// <p>AssociatedWith - The source is connected to the destination. For example, an approval workflow is associated with a model deployment.</p></li>
129 /// <li>
130 /// <p>DerivedFrom - The destination is a modification of the source. For example, a digest output of a channel input for a processing job is derived from the original inputs.</p></li>
131 /// <li>
132 /// <p>Produced - The source generated the destination. For example, a training job produced a model artifact.</p></li>
133 /// </ul>
134 pub fn get_association_type(&self) -> &::std::option::Option<crate::types::AssociationEdgeType> {
135 &self.association_type
136 }
137 /// Consumes the builder and constructs a [`AddAssociationInput`](crate::operation::add_association::AddAssociationInput).
138 pub fn build(
139 self,
140 ) -> ::std::result::Result<crate::operation::add_association::AddAssociationInput, ::aws_smithy_types::error::operation::BuildError> {
141 ::std::result::Result::Ok(crate::operation::add_association::AddAssociationInput {
142 source_arn: self.source_arn,
143 destination_arn: self.destination_arn,
144 association_type: self.association_type,
145 })
146 }
147}