aws_sdk_sagemaker/operation/create_pipeline/
_create_pipeline_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 CreatePipelineInput {
6    /// <p>The name of the pipeline.</p>
7    pub pipeline_name: ::std::option::Option<::std::string::String>,
8    /// <p>The display name of the pipeline.</p>
9    pub pipeline_display_name: ::std::option::Option<::std::string::String>,
10    /// <p>The <a href="https://aws-sagemaker-mlops.github.io/sagemaker-model-building-pipeline-definition-JSON-schema/">JSON pipeline definition</a> of the pipeline.</p>
11    pub pipeline_definition: ::std::option::Option<::std::string::String>,
12    /// <p>The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the pipeline definition from this location.</p>
13    pub pipeline_definition_s3_location: ::std::option::Option<crate::types::PipelineDefinitionS3Location>,
14    /// <p>A description of the pipeline.</p>
15    pub pipeline_description: ::std::option::Option<::std::string::String>,
16    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time.</p>
17    pub client_request_token: ::std::option::Option<::std::string::String>,
18    /// <p>The Amazon Resource Name (ARN) of the role used by the pipeline to access and create resources.</p>
19    pub role_arn: ::std::option::Option<::std::string::String>,
20    /// <p>A list of tags to apply to the created pipeline.</p>
21    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
22    /// <p>This is the configuration that controls the parallelism of the pipeline. If specified, it applies to all runs of this pipeline by default.</p>
23    pub parallelism_configuration: ::std::option::Option<crate::types::ParallelismConfiguration>,
24}
25impl CreatePipelineInput {
26    /// <p>The name of the pipeline.</p>
27    pub fn pipeline_name(&self) -> ::std::option::Option<&str> {
28        self.pipeline_name.as_deref()
29    }
30    /// <p>The display name of the pipeline.</p>
31    pub fn pipeline_display_name(&self) -> ::std::option::Option<&str> {
32        self.pipeline_display_name.as_deref()
33    }
34    /// <p>The <a href="https://aws-sagemaker-mlops.github.io/sagemaker-model-building-pipeline-definition-JSON-schema/">JSON pipeline definition</a> of the pipeline.</p>
35    pub fn pipeline_definition(&self) -> ::std::option::Option<&str> {
36        self.pipeline_definition.as_deref()
37    }
38    /// <p>The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the pipeline definition from this location.</p>
39    pub fn pipeline_definition_s3_location(&self) -> ::std::option::Option<&crate::types::PipelineDefinitionS3Location> {
40        self.pipeline_definition_s3_location.as_ref()
41    }
42    /// <p>A description of the pipeline.</p>
43    pub fn pipeline_description(&self) -> ::std::option::Option<&str> {
44        self.pipeline_description.as_deref()
45    }
46    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time.</p>
47    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
48        self.client_request_token.as_deref()
49    }
50    /// <p>The Amazon Resource Name (ARN) of the role used by the pipeline to access and create resources.</p>
51    pub fn role_arn(&self) -> ::std::option::Option<&str> {
52        self.role_arn.as_deref()
53    }
54    /// <p>A list of tags to apply to the created pipeline.</p>
55    ///
56    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
57    pub fn tags(&self) -> &[crate::types::Tag] {
58        self.tags.as_deref().unwrap_or_default()
59    }
60    /// <p>This is the configuration that controls the parallelism of the pipeline. If specified, it applies to all runs of this pipeline by default.</p>
61    pub fn parallelism_configuration(&self) -> ::std::option::Option<&crate::types::ParallelismConfiguration> {
62        self.parallelism_configuration.as_ref()
63    }
64}
65impl CreatePipelineInput {
66    /// Creates a new builder-style object to manufacture [`CreatePipelineInput`](crate::operation::create_pipeline::CreatePipelineInput).
67    pub fn builder() -> crate::operation::create_pipeline::builders::CreatePipelineInputBuilder {
68        crate::operation::create_pipeline::builders::CreatePipelineInputBuilder::default()
69    }
70}
71
72/// A builder for [`CreatePipelineInput`](crate::operation::create_pipeline::CreatePipelineInput).
73#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
74#[non_exhaustive]
75pub struct CreatePipelineInputBuilder {
76    pub(crate) pipeline_name: ::std::option::Option<::std::string::String>,
77    pub(crate) pipeline_display_name: ::std::option::Option<::std::string::String>,
78    pub(crate) pipeline_definition: ::std::option::Option<::std::string::String>,
79    pub(crate) pipeline_definition_s3_location: ::std::option::Option<crate::types::PipelineDefinitionS3Location>,
80    pub(crate) pipeline_description: ::std::option::Option<::std::string::String>,
81    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
82    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
83    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
84    pub(crate) parallelism_configuration: ::std::option::Option<crate::types::ParallelismConfiguration>,
85}
86impl CreatePipelineInputBuilder {
87    /// <p>The name of the pipeline.</p>
88    /// This field is required.
89    pub fn pipeline_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.pipeline_name = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>The name of the pipeline.</p>
94    pub fn set_pipeline_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.pipeline_name = input;
96        self
97    }
98    /// <p>The name of the pipeline.</p>
99    pub fn get_pipeline_name(&self) -> &::std::option::Option<::std::string::String> {
100        &self.pipeline_name
101    }
102    /// <p>The display name of the pipeline.</p>
103    pub fn pipeline_display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104        self.pipeline_display_name = ::std::option::Option::Some(input.into());
105        self
106    }
107    /// <p>The display name of the pipeline.</p>
108    pub fn set_pipeline_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109        self.pipeline_display_name = input;
110        self
111    }
112    /// <p>The display name of the pipeline.</p>
113    pub fn get_pipeline_display_name(&self) -> &::std::option::Option<::std::string::String> {
114        &self.pipeline_display_name
115    }
116    /// <p>The <a href="https://aws-sagemaker-mlops.github.io/sagemaker-model-building-pipeline-definition-JSON-schema/">JSON pipeline definition</a> of the pipeline.</p>
117    pub fn pipeline_definition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.pipeline_definition = ::std::option::Option::Some(input.into());
119        self
120    }
121    /// <p>The <a href="https://aws-sagemaker-mlops.github.io/sagemaker-model-building-pipeline-definition-JSON-schema/">JSON pipeline definition</a> of the pipeline.</p>
122    pub fn set_pipeline_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123        self.pipeline_definition = input;
124        self
125    }
126    /// <p>The <a href="https://aws-sagemaker-mlops.github.io/sagemaker-model-building-pipeline-definition-JSON-schema/">JSON pipeline definition</a> of the pipeline.</p>
127    pub fn get_pipeline_definition(&self) -> &::std::option::Option<::std::string::String> {
128        &self.pipeline_definition
129    }
130    /// <p>The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the pipeline definition from this location.</p>
131    pub fn pipeline_definition_s3_location(mut self, input: crate::types::PipelineDefinitionS3Location) -> Self {
132        self.pipeline_definition_s3_location = ::std::option::Option::Some(input);
133        self
134    }
135    /// <p>The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the pipeline definition from this location.</p>
136    pub fn set_pipeline_definition_s3_location(mut self, input: ::std::option::Option<crate::types::PipelineDefinitionS3Location>) -> Self {
137        self.pipeline_definition_s3_location = input;
138        self
139    }
140    /// <p>The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the pipeline definition from this location.</p>
141    pub fn get_pipeline_definition_s3_location(&self) -> &::std::option::Option<crate::types::PipelineDefinitionS3Location> {
142        &self.pipeline_definition_s3_location
143    }
144    /// <p>A description of the pipeline.</p>
145    pub fn pipeline_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.pipeline_description = ::std::option::Option::Some(input.into());
147        self
148    }
149    /// <p>A description of the pipeline.</p>
150    pub fn set_pipeline_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.pipeline_description = input;
152        self
153    }
154    /// <p>A description of the pipeline.</p>
155    pub fn get_pipeline_description(&self) -> &::std::option::Option<::std::string::String> {
156        &self.pipeline_description
157    }
158    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time.</p>
159    /// This field is required.
160    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161        self.client_request_token = ::std::option::Option::Some(input.into());
162        self
163    }
164    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time.</p>
165    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166        self.client_request_token = input;
167        self
168    }
169    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time.</p>
170    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
171        &self.client_request_token
172    }
173    /// <p>The Amazon Resource Name (ARN) of the role used by the pipeline to access and create resources.</p>
174    /// This field is required.
175    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176        self.role_arn = ::std::option::Option::Some(input.into());
177        self
178    }
179    /// <p>The Amazon Resource Name (ARN) of the role used by the pipeline to access and create resources.</p>
180    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
181        self.role_arn = input;
182        self
183    }
184    /// <p>The Amazon Resource Name (ARN) of the role used by the pipeline to access and create resources.</p>
185    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
186        &self.role_arn
187    }
188    /// Appends an item to `tags`.
189    ///
190    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
191    ///
192    /// <p>A list of tags to apply to the created pipeline.</p>
193    pub fn tags(mut self, input: crate::types::Tag) -> Self {
194        let mut v = self.tags.unwrap_or_default();
195        v.push(input);
196        self.tags = ::std::option::Option::Some(v);
197        self
198    }
199    /// <p>A list of tags to apply to the created pipeline.</p>
200    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
201        self.tags = input;
202        self
203    }
204    /// <p>A list of tags to apply to the created pipeline.</p>
205    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
206        &self.tags
207    }
208    /// <p>This is the configuration that controls the parallelism of the pipeline. If specified, it applies to all runs of this pipeline by default.</p>
209    pub fn parallelism_configuration(mut self, input: crate::types::ParallelismConfiguration) -> Self {
210        self.parallelism_configuration = ::std::option::Option::Some(input);
211        self
212    }
213    /// <p>This is the configuration that controls the parallelism of the pipeline. If specified, it applies to all runs of this pipeline by default.</p>
214    pub fn set_parallelism_configuration(mut self, input: ::std::option::Option<crate::types::ParallelismConfiguration>) -> Self {
215        self.parallelism_configuration = input;
216        self
217    }
218    /// <p>This is the configuration that controls the parallelism of the pipeline. If specified, it applies to all runs of this pipeline by default.</p>
219    pub fn get_parallelism_configuration(&self) -> &::std::option::Option<crate::types::ParallelismConfiguration> {
220        &self.parallelism_configuration
221    }
222    /// Consumes the builder and constructs a [`CreatePipelineInput`](crate::operation::create_pipeline::CreatePipelineInput).
223    pub fn build(
224        self,
225    ) -> ::std::result::Result<crate::operation::create_pipeline::CreatePipelineInput, ::aws_smithy_types::error::operation::BuildError> {
226        ::std::result::Result::Ok(crate::operation::create_pipeline::CreatePipelineInput {
227            pipeline_name: self.pipeline_name,
228            pipeline_display_name: self.pipeline_display_name,
229            pipeline_definition: self.pipeline_definition,
230            pipeline_definition_s3_location: self.pipeline_definition_s3_location,
231            pipeline_description: self.pipeline_description,
232            client_request_token: self.client_request_token,
233            role_arn: self.role_arn,
234            tags: self.tags,
235            parallelism_configuration: self.parallelism_configuration,
236        })
237    }
238}