aws_sdk_datapipeline/operation/create_pipeline/_create_pipeline_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains the parameters for CreatePipeline.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreatePipelineInput {
7 /// <p>The name for the pipeline. You can use the same name for multiple pipelines associated with your AWS account, because AWS Data Pipeline assigns each pipeline a unique pipeline identifier.</p>
8 pub name: ::std::option::Option<::std::string::String>,
9 /// <p>A unique identifier. This identifier is not the same as the pipeline identifier assigned by AWS Data Pipeline. You are responsible for defining the format and ensuring the uniqueness of this identifier. You use this parameter to ensure idempotency during repeated calls to <code>CreatePipeline</code>. For example, if the first call to <code>CreatePipeline</code> does not succeed, you can pass in the same unique identifier and pipeline name combination on a subsequent call to <code>CreatePipeline</code>. <code>CreatePipeline</code> ensures that if a pipeline already exists with the same name and unique identifier, a new pipeline is not created. Instead, you'll receive the pipeline identifier from the previous attempt. The uniqueness of the name and unique identifier combination is scoped to the AWS account or IAM user credentials.</p>
10 pub unique_id: ::std::option::Option<::std::string::String>,
11 /// <p>The description for the pipeline.</p>
12 pub description: ::std::option::Option<::std::string::String>,
13 /// <p>A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For more information, see <a href="http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>
14 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
15}
16impl CreatePipelineInput {
17 /// <p>The name for the pipeline. You can use the same name for multiple pipelines associated with your AWS account, because AWS Data Pipeline assigns each pipeline a unique pipeline identifier.</p>
18 pub fn name(&self) -> ::std::option::Option<&str> {
19 self.name.as_deref()
20 }
21 /// <p>A unique identifier. This identifier is not the same as the pipeline identifier assigned by AWS Data Pipeline. You are responsible for defining the format and ensuring the uniqueness of this identifier. You use this parameter to ensure idempotency during repeated calls to <code>CreatePipeline</code>. For example, if the first call to <code>CreatePipeline</code> does not succeed, you can pass in the same unique identifier and pipeline name combination on a subsequent call to <code>CreatePipeline</code>. <code>CreatePipeline</code> ensures that if a pipeline already exists with the same name and unique identifier, a new pipeline is not created. Instead, you'll receive the pipeline identifier from the previous attempt. The uniqueness of the name and unique identifier combination is scoped to the AWS account or IAM user credentials.</p>
22 pub fn unique_id(&self) -> ::std::option::Option<&str> {
23 self.unique_id.as_deref()
24 }
25 /// <p>The description for the pipeline.</p>
26 pub fn description(&self) -> ::std::option::Option<&str> {
27 self.description.as_deref()
28 }
29 /// <p>A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For more information, see <a href="http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>
30 ///
31 /// 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()`.
32 pub fn tags(&self) -> &[crate::types::Tag] {
33 self.tags.as_deref().unwrap_or_default()
34 }
35}
36impl CreatePipelineInput {
37 /// Creates a new builder-style object to manufacture [`CreatePipelineInput`](crate::operation::create_pipeline::CreatePipelineInput).
38 pub fn builder() -> crate::operation::create_pipeline::builders::CreatePipelineInputBuilder {
39 crate::operation::create_pipeline::builders::CreatePipelineInputBuilder::default()
40 }
41}
42
43/// A builder for [`CreatePipelineInput`](crate::operation::create_pipeline::CreatePipelineInput).
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
45#[non_exhaustive]
46pub struct CreatePipelineInputBuilder {
47 pub(crate) name: ::std::option::Option<::std::string::String>,
48 pub(crate) unique_id: ::std::option::Option<::std::string::String>,
49 pub(crate) description: ::std::option::Option<::std::string::String>,
50 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
51}
52impl CreatePipelineInputBuilder {
53 /// <p>The name for the pipeline. You can use the same name for multiple pipelines associated with your AWS account, because AWS Data Pipeline assigns each pipeline a unique pipeline identifier.</p>
54 /// This field is required.
55 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
56 self.name = ::std::option::Option::Some(input.into());
57 self
58 }
59 /// <p>The name for the pipeline. You can use the same name for multiple pipelines associated with your AWS account, because AWS Data Pipeline assigns each pipeline a unique pipeline identifier.</p>
60 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
61 self.name = input;
62 self
63 }
64 /// <p>The name for the pipeline. You can use the same name for multiple pipelines associated with your AWS account, because AWS Data Pipeline assigns each pipeline a unique pipeline identifier.</p>
65 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
66 &self.name
67 }
68 /// <p>A unique identifier. This identifier is not the same as the pipeline identifier assigned by AWS Data Pipeline. You are responsible for defining the format and ensuring the uniqueness of this identifier. You use this parameter to ensure idempotency during repeated calls to <code>CreatePipeline</code>. For example, if the first call to <code>CreatePipeline</code> does not succeed, you can pass in the same unique identifier and pipeline name combination on a subsequent call to <code>CreatePipeline</code>. <code>CreatePipeline</code> ensures that if a pipeline already exists with the same name and unique identifier, a new pipeline is not created. Instead, you'll receive the pipeline identifier from the previous attempt. The uniqueness of the name and unique identifier combination is scoped to the AWS account or IAM user credentials.</p>
69 /// This field is required.
70 pub fn unique_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71 self.unique_id = ::std::option::Option::Some(input.into());
72 self
73 }
74 /// <p>A unique identifier. This identifier is not the same as the pipeline identifier assigned by AWS Data Pipeline. You are responsible for defining the format and ensuring the uniqueness of this identifier. You use this parameter to ensure idempotency during repeated calls to <code>CreatePipeline</code>. For example, if the first call to <code>CreatePipeline</code> does not succeed, you can pass in the same unique identifier and pipeline name combination on a subsequent call to <code>CreatePipeline</code>. <code>CreatePipeline</code> ensures that if a pipeline already exists with the same name and unique identifier, a new pipeline is not created. Instead, you'll receive the pipeline identifier from the previous attempt. The uniqueness of the name and unique identifier combination is scoped to the AWS account or IAM user credentials.</p>
75 pub fn set_unique_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76 self.unique_id = input;
77 self
78 }
79 /// <p>A unique identifier. This identifier is not the same as the pipeline identifier assigned by AWS Data Pipeline. You are responsible for defining the format and ensuring the uniqueness of this identifier. You use this parameter to ensure idempotency during repeated calls to <code>CreatePipeline</code>. For example, if the first call to <code>CreatePipeline</code> does not succeed, you can pass in the same unique identifier and pipeline name combination on a subsequent call to <code>CreatePipeline</code>. <code>CreatePipeline</code> ensures that if a pipeline already exists with the same name and unique identifier, a new pipeline is not created. Instead, you'll receive the pipeline identifier from the previous attempt. The uniqueness of the name and unique identifier combination is scoped to the AWS account or IAM user credentials.</p>
80 pub fn get_unique_id(&self) -> &::std::option::Option<::std::string::String> {
81 &self.unique_id
82 }
83 /// <p>The description for the pipeline.</p>
84 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85 self.description = ::std::option::Option::Some(input.into());
86 self
87 }
88 /// <p>The description for the pipeline.</p>
89 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90 self.description = input;
91 self
92 }
93 /// <p>The description for the pipeline.</p>
94 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
95 &self.description
96 }
97 /// Appends an item to `tags`.
98 ///
99 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
100 ///
101 /// <p>A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For more information, see <a href="http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>
102 pub fn tags(mut self, input: crate::types::Tag) -> Self {
103 let mut v = self.tags.unwrap_or_default();
104 v.push(input);
105 self.tags = ::std::option::Option::Some(v);
106 self
107 }
108 /// <p>A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For more information, see <a href="http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>
109 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
110 self.tags = input;
111 self
112 }
113 /// <p>A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For more information, see <a href="http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>
114 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
115 &self.tags
116 }
117 /// Consumes the builder and constructs a [`CreatePipelineInput`](crate::operation::create_pipeline::CreatePipelineInput).
118 pub fn build(
119 self,
120 ) -> ::std::result::Result<crate::operation::create_pipeline::CreatePipelineInput, ::aws_smithy_types::error::operation::BuildError> {
121 ::std::result::Result::Ok(crate::operation::create_pipeline::CreatePipelineInput {
122 name: self.name,
123 unique_id: self.unique_id,
124 description: self.description,
125 tags: self.tags,
126 })
127 }
128}