aws_sdk_sagemaker/operation/update_pipeline/
_update_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 UpdatePipelineInput {
6    /// <p>The name of the pipeline to update.</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 JSON pipeline definition.</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>The description of the pipeline.</p>
15    pub pipeline_description: ::std::option::Option<::std::string::String>,
16    /// <p>The Amazon Resource Name (ARN) that the pipeline uses to execute.</p>
17    pub role_arn: ::std::option::Option<::std::string::String>,
18    /// <p>If specified, it applies to all executions of this pipeline by default.</p>
19    pub parallelism_configuration: ::std::option::Option<crate::types::ParallelismConfiguration>,
20}
21impl UpdatePipelineInput {
22    /// <p>The name of the pipeline to update.</p>
23    pub fn pipeline_name(&self) -> ::std::option::Option<&str> {
24        self.pipeline_name.as_deref()
25    }
26    /// <p>The display name of the pipeline.</p>
27    pub fn pipeline_display_name(&self) -> ::std::option::Option<&str> {
28        self.pipeline_display_name.as_deref()
29    }
30    /// <p>The JSON pipeline definition.</p>
31    pub fn pipeline_definition(&self) -> ::std::option::Option<&str> {
32        self.pipeline_definition.as_deref()
33    }
34    /// <p>The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the pipeline definition from this location.</p>
35    pub fn pipeline_definition_s3_location(&self) -> ::std::option::Option<&crate::types::PipelineDefinitionS3Location> {
36        self.pipeline_definition_s3_location.as_ref()
37    }
38    /// <p>The description of the pipeline.</p>
39    pub fn pipeline_description(&self) -> ::std::option::Option<&str> {
40        self.pipeline_description.as_deref()
41    }
42    /// <p>The Amazon Resource Name (ARN) that the pipeline uses to execute.</p>
43    pub fn role_arn(&self) -> ::std::option::Option<&str> {
44        self.role_arn.as_deref()
45    }
46    /// <p>If specified, it applies to all executions of this pipeline by default.</p>
47    pub fn parallelism_configuration(&self) -> ::std::option::Option<&crate::types::ParallelismConfiguration> {
48        self.parallelism_configuration.as_ref()
49    }
50}
51impl UpdatePipelineInput {
52    /// Creates a new builder-style object to manufacture [`UpdatePipelineInput`](crate::operation::update_pipeline::UpdatePipelineInput).
53    pub fn builder() -> crate::operation::update_pipeline::builders::UpdatePipelineInputBuilder {
54        crate::operation::update_pipeline::builders::UpdatePipelineInputBuilder::default()
55    }
56}
57
58/// A builder for [`UpdatePipelineInput`](crate::operation::update_pipeline::UpdatePipelineInput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct UpdatePipelineInputBuilder {
62    pub(crate) pipeline_name: ::std::option::Option<::std::string::String>,
63    pub(crate) pipeline_display_name: ::std::option::Option<::std::string::String>,
64    pub(crate) pipeline_definition: ::std::option::Option<::std::string::String>,
65    pub(crate) pipeline_definition_s3_location: ::std::option::Option<crate::types::PipelineDefinitionS3Location>,
66    pub(crate) pipeline_description: ::std::option::Option<::std::string::String>,
67    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
68    pub(crate) parallelism_configuration: ::std::option::Option<crate::types::ParallelismConfiguration>,
69}
70impl UpdatePipelineInputBuilder {
71    /// <p>The name of the pipeline to update.</p>
72    /// This field is required.
73    pub fn pipeline_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.pipeline_name = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The name of the pipeline to update.</p>
78    pub fn set_pipeline_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.pipeline_name = input;
80        self
81    }
82    /// <p>The name of the pipeline to update.</p>
83    pub fn get_pipeline_name(&self) -> &::std::option::Option<::std::string::String> {
84        &self.pipeline_name
85    }
86    /// <p>The display name of the pipeline.</p>
87    pub fn pipeline_display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.pipeline_display_name = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>The display name of the pipeline.</p>
92    pub fn set_pipeline_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.pipeline_display_name = input;
94        self
95    }
96    /// <p>The display name of the pipeline.</p>
97    pub fn get_pipeline_display_name(&self) -> &::std::option::Option<::std::string::String> {
98        &self.pipeline_display_name
99    }
100    /// <p>The JSON pipeline definition.</p>
101    pub fn pipeline_definition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.pipeline_definition = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The JSON pipeline definition.</p>
106    pub fn set_pipeline_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.pipeline_definition = input;
108        self
109    }
110    /// <p>The JSON pipeline definition.</p>
111    pub fn get_pipeline_definition(&self) -> &::std::option::Option<::std::string::String> {
112        &self.pipeline_definition
113    }
114    /// <p>The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the pipeline definition from this location.</p>
115    pub fn pipeline_definition_s3_location(mut self, input: crate::types::PipelineDefinitionS3Location) -> Self {
116        self.pipeline_definition_s3_location = ::std::option::Option::Some(input);
117        self
118    }
119    /// <p>The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the pipeline definition from this location.</p>
120    pub fn set_pipeline_definition_s3_location(mut self, input: ::std::option::Option<crate::types::PipelineDefinitionS3Location>) -> Self {
121        self.pipeline_definition_s3_location = input;
122        self
123    }
124    /// <p>The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the pipeline definition from this location.</p>
125    pub fn get_pipeline_definition_s3_location(&self) -> &::std::option::Option<crate::types::PipelineDefinitionS3Location> {
126        &self.pipeline_definition_s3_location
127    }
128    /// <p>The description of the pipeline.</p>
129    pub fn pipeline_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        self.pipeline_description = ::std::option::Option::Some(input.into());
131        self
132    }
133    /// <p>The description of the pipeline.</p>
134    pub fn set_pipeline_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.pipeline_description = input;
136        self
137    }
138    /// <p>The description of the pipeline.</p>
139    pub fn get_pipeline_description(&self) -> &::std::option::Option<::std::string::String> {
140        &self.pipeline_description
141    }
142    /// <p>The Amazon Resource Name (ARN) that the pipeline uses to execute.</p>
143    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144        self.role_arn = ::std::option::Option::Some(input.into());
145        self
146    }
147    /// <p>The Amazon Resource Name (ARN) that the pipeline uses to execute.</p>
148    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149        self.role_arn = input;
150        self
151    }
152    /// <p>The Amazon Resource Name (ARN) that the pipeline uses to execute.</p>
153    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
154        &self.role_arn
155    }
156    /// <p>If specified, it applies to all executions of this pipeline by default.</p>
157    pub fn parallelism_configuration(mut self, input: crate::types::ParallelismConfiguration) -> Self {
158        self.parallelism_configuration = ::std::option::Option::Some(input);
159        self
160    }
161    /// <p>If specified, it applies to all executions of this pipeline by default.</p>
162    pub fn set_parallelism_configuration(mut self, input: ::std::option::Option<crate::types::ParallelismConfiguration>) -> Self {
163        self.parallelism_configuration = input;
164        self
165    }
166    /// <p>If specified, it applies to all executions of this pipeline by default.</p>
167    pub fn get_parallelism_configuration(&self) -> &::std::option::Option<crate::types::ParallelismConfiguration> {
168        &self.parallelism_configuration
169    }
170    /// Consumes the builder and constructs a [`UpdatePipelineInput`](crate::operation::update_pipeline::UpdatePipelineInput).
171    pub fn build(
172        self,
173    ) -> ::std::result::Result<crate::operation::update_pipeline::UpdatePipelineInput, ::aws_smithy_types::error::operation::BuildError> {
174        ::std::result::Result::Ok(crate::operation::update_pipeline::UpdatePipelineInput {
175            pipeline_name: self.pipeline_name,
176            pipeline_display_name: self.pipeline_display_name,
177            pipeline_definition: self.pipeline_definition,
178            pipeline_definition_s3_location: self.pipeline_definition_s3_location,
179            pipeline_description: self.pipeline_description,
180            role_arn: self.role_arn,
181            parallelism_configuration: self.parallelism_configuration,
182        })
183    }
184}