com.amazonaws.services.datapipeline.model.CreatePipelineRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-datapipeline Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.datapipeline.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* Contains the parameters for CreatePipeline.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreatePipelineRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* 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.
*
*/
private String name;
/**
*
* 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 CreatePipeline
. For example, if the first
* call to CreatePipeline
does not succeed, you can pass in the same unique identifier and pipeline
* name combination on a subsequent call to CreatePipeline
. CreatePipeline
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.
*
*/
private String uniqueId;
/**
*
* The description for the pipeline.
*
*/
private String description;
/**
*
* A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For more
* information, see Controlling User
* Access to Pipelines in the AWS Data Pipeline Developer Guide.
*
*/
private com.amazonaws.internal.SdkInternalList tags;
/**
*
* 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.
*
*
* @param name
* 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.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* 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.
*
*
* @return 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.
*/
public String getName() {
return this.name;
}
/**
*
* 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.
*
*
* @param name
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreatePipelineRequest withName(String name) {
setName(name);
return this;
}
/**
*
* 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 CreatePipeline
. For example, if the first
* call to CreatePipeline
does not succeed, you can pass in the same unique identifier and pipeline
* name combination on a subsequent call to CreatePipeline
. CreatePipeline
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.
*
*
* @param uniqueId
* 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 CreatePipeline
. For
* example, if the first call to CreatePipeline
does not succeed, you can pass in the same
* unique identifier and pipeline name combination on a subsequent call to CreatePipeline
.
* CreatePipeline
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.
*/
public void setUniqueId(String uniqueId) {
this.uniqueId = uniqueId;
}
/**
*
* 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 CreatePipeline
. For example, if the first
* call to CreatePipeline
does not succeed, you can pass in the same unique identifier and pipeline
* name combination on a subsequent call to CreatePipeline
. CreatePipeline
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.
*
*
* @return 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 CreatePipeline
. For
* example, if the first call to CreatePipeline
does not succeed, you can pass in the same
* unique identifier and pipeline name combination on a subsequent call to CreatePipeline
.
* CreatePipeline
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.
*/
public String getUniqueId() {
return this.uniqueId;
}
/**
*
* 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 CreatePipeline
. For example, if the first
* call to CreatePipeline
does not succeed, you can pass in the same unique identifier and pipeline
* name combination on a subsequent call to CreatePipeline
. CreatePipeline
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.
*
*
* @param uniqueId
* 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 CreatePipeline
. For
* example, if the first call to CreatePipeline
does not succeed, you can pass in the same
* unique identifier and pipeline name combination on a subsequent call to CreatePipeline
.
* CreatePipeline
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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreatePipelineRequest withUniqueId(String uniqueId) {
setUniqueId(uniqueId);
return this;
}
/**
*
* The description for the pipeline.
*
*
* @param description
* The description for the pipeline.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The description for the pipeline.
*
*
* @return The description for the pipeline.
*/
public String getDescription() {
return this.description;
}
/**
*
* The description for the pipeline.
*
*
* @param description
* The description for the pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreatePipelineRequest withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For more
* information, see Controlling User
* Access to Pipelines in the AWS Data Pipeline Developer Guide.
*
*
* @return A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For
* more information, see Controlling
* User Access to Pipelines in the AWS Data Pipeline Developer Guide.
*/
public java.util.List getTags() {
if (tags == null) {
tags = new com.amazonaws.internal.SdkInternalList();
}
return tags;
}
/**
*
* A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For more
* information, see Controlling User
* Access to Pipelines in the AWS Data Pipeline Developer Guide.
*
*
* @param tags
* A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For
* more information, see Controlling
* User Access to Pipelines in the AWS Data Pipeline Developer Guide.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new com.amazonaws.internal.SdkInternalList(tags);
}
/**
*
* A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For more
* information, see Controlling User
* Access to Pipelines in the AWS Data Pipeline Developer Guide.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For
* more information, see Controlling
* User Access to Pipelines in the AWS Data Pipeline Developer Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreatePipelineRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new com.amazonaws.internal.SdkInternalList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For more
* information, see Controlling User
* Access to Pipelines in the AWS Data Pipeline Developer Guide.
*
*
* @param tags
* A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For
* more information, see Controlling
* User Access to Pipelines in the AWS Data Pipeline Developer Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreatePipelineRequest withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getUniqueId() != null)
sb.append("UniqueId: ").append(getUniqueId()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreatePipelineRequest == false)
return false;
CreatePipelineRequest other = (CreatePipelineRequest) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getUniqueId() == null ^ this.getUniqueId() == null)
return false;
if (other.getUniqueId() != null && other.getUniqueId().equals(this.getUniqueId()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getUniqueId() == null) ? 0 : getUniqueId().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreatePipelineRequest clone() {
return (CreatePipelineRequest) super.clone();
}
}