com.amazonaws.services.iotanalytics.model.Pipeline Maven / Gradle / Ivy
Show all versions of aws-java-sdk-iotanalytics Show documentation
/*
* Copyright 2018-2023 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.iotanalytics.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Contains information about a pipeline.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Pipeline implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the pipeline.
*
*/
private String name;
/**
*
* The ARN of the pipeline.
*
*/
private String arn;
/**
*
* The activities that perform transformations on the messages.
*
*/
private java.util.List activities;
/**
*
* A summary of information about the pipeline reprocessing.
*
*/
private java.util.List reprocessingSummaries;
/**
*
* When the pipeline was created.
*
*/
private java.util.Date creationTime;
/**
*
* The last time the pipeline was updated.
*
*/
private java.util.Date lastUpdateTime;
/**
*
* The name of the pipeline.
*
*
* @param name
* The name of the pipeline.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the pipeline.
*
*
* @return The name of the pipeline.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the pipeline.
*
*
* @param name
* The name of the pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Pipeline withName(String name) {
setName(name);
return this;
}
/**
*
* The ARN of the pipeline.
*
*
* @param arn
* The ARN of the pipeline.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The ARN of the pipeline.
*
*
* @return The ARN of the pipeline.
*/
public String getArn() {
return this.arn;
}
/**
*
* The ARN of the pipeline.
*
*
* @param arn
* The ARN of the pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Pipeline withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The activities that perform transformations on the messages.
*
*
* @return The activities that perform transformations on the messages.
*/
public java.util.List getActivities() {
return activities;
}
/**
*
* The activities that perform transformations on the messages.
*
*
* @param activities
* The activities that perform transformations on the messages.
*/
public void setActivities(java.util.Collection activities) {
if (activities == null) {
this.activities = null;
return;
}
this.activities = new java.util.ArrayList(activities);
}
/**
*
* The activities that perform transformations on the messages.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setActivities(java.util.Collection)} or {@link #withActivities(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param activities
* The activities that perform transformations on the messages.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Pipeline withActivities(PipelineActivity... activities) {
if (this.activities == null) {
setActivities(new java.util.ArrayList(activities.length));
}
for (PipelineActivity ele : activities) {
this.activities.add(ele);
}
return this;
}
/**
*
* The activities that perform transformations on the messages.
*
*
* @param activities
* The activities that perform transformations on the messages.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Pipeline withActivities(java.util.Collection activities) {
setActivities(activities);
return this;
}
/**
*
* A summary of information about the pipeline reprocessing.
*
*
* @return A summary of information about the pipeline reprocessing.
*/
public java.util.List getReprocessingSummaries() {
return reprocessingSummaries;
}
/**
*
* A summary of information about the pipeline reprocessing.
*
*
* @param reprocessingSummaries
* A summary of information about the pipeline reprocessing.
*/
public void setReprocessingSummaries(java.util.Collection reprocessingSummaries) {
if (reprocessingSummaries == null) {
this.reprocessingSummaries = null;
return;
}
this.reprocessingSummaries = new java.util.ArrayList(reprocessingSummaries);
}
/**
*
* A summary of information about the pipeline reprocessing.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setReprocessingSummaries(java.util.Collection)} or
* {@link #withReprocessingSummaries(java.util.Collection)} if you want to override the existing values.
*
*
* @param reprocessingSummaries
* A summary of information about the pipeline reprocessing.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Pipeline withReprocessingSummaries(ReprocessingSummary... reprocessingSummaries) {
if (this.reprocessingSummaries == null) {
setReprocessingSummaries(new java.util.ArrayList(reprocessingSummaries.length));
}
for (ReprocessingSummary ele : reprocessingSummaries) {
this.reprocessingSummaries.add(ele);
}
return this;
}
/**
*
* A summary of information about the pipeline reprocessing.
*
*
* @param reprocessingSummaries
* A summary of information about the pipeline reprocessing.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Pipeline withReprocessingSummaries(java.util.Collection reprocessingSummaries) {
setReprocessingSummaries(reprocessingSummaries);
return this;
}
/**
*
* When the pipeline was created.
*
*
* @param creationTime
* When the pipeline was created.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* When the pipeline was created.
*
*
* @return When the pipeline was created.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* When the pipeline was created.
*
*
* @param creationTime
* When the pipeline was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Pipeline withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* The last time the pipeline was updated.
*
*
* @param lastUpdateTime
* The last time the pipeline was updated.
*/
public void setLastUpdateTime(java.util.Date lastUpdateTime) {
this.lastUpdateTime = lastUpdateTime;
}
/**
*
* The last time the pipeline was updated.
*
*
* @return The last time the pipeline was updated.
*/
public java.util.Date getLastUpdateTime() {
return this.lastUpdateTime;
}
/**
*
* The last time the pipeline was updated.
*
*
* @param lastUpdateTime
* The last time the pipeline was updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Pipeline withLastUpdateTime(java.util.Date lastUpdateTime) {
setLastUpdateTime(lastUpdateTime);
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 (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getActivities() != null)
sb.append("Activities: ").append(getActivities()).append(",");
if (getReprocessingSummaries() != null)
sb.append("ReprocessingSummaries: ").append(getReprocessingSummaries()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getLastUpdateTime() != null)
sb.append("LastUpdateTime: ").append(getLastUpdateTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Pipeline == false)
return false;
Pipeline other = (Pipeline) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getActivities() == null ^ this.getActivities() == null)
return false;
if (other.getActivities() != null && other.getActivities().equals(this.getActivities()) == false)
return false;
if (other.getReprocessingSummaries() == null ^ this.getReprocessingSummaries() == null)
return false;
if (other.getReprocessingSummaries() != null && other.getReprocessingSummaries().equals(this.getReprocessingSummaries()) == false)
return false;
if (other.getCreationTime() == null ^ this.getCreationTime() == null)
return false;
if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false)
return false;
if (other.getLastUpdateTime() == null ^ this.getLastUpdateTime() == null)
return false;
if (other.getLastUpdateTime() != null && other.getLastUpdateTime().equals(this.getLastUpdateTime()) == 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 + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getActivities() == null) ? 0 : getActivities().hashCode());
hashCode = prime * hashCode + ((getReprocessingSummaries() == null) ? 0 : getReprocessingSummaries().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getLastUpdateTime() == null) ? 0 : getLastUpdateTime().hashCode());
return hashCode;
}
@Override
public Pipeline clone() {
try {
return (Pipeline) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.iotanalytics.model.transform.PipelineMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}