com.amazonaws.services.transfer.model.CustomStepDetails Maven / Gradle / Ivy
Show all versions of aws-java-sdk-transfer 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.transfer.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Each step type has its own StepDetails
structure.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CustomStepDetails implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the step, used as an identifier.
*
*/
private String name;
/**
*
* The ARN for the Lambda function that is being called.
*
*/
private String target;
/**
*
* Timeout, in seconds, for the step.
*
*/
private Integer timeoutSeconds;
/**
*
* Specifies which file to use as input to the workflow step: either the output from the previous step, or the
* originally uploaded file for the workflow.
*
*
* -
*
* To use the previous file as the input, enter ${previous.file}
. In this case, this workflow step uses
* the output file from the previous workflow step as input. This is the default value.
*
*
* -
*
* To use the originally uploaded file location as input for this step, enter ${original.file}
.
*
*
*
*/
private String sourceFileLocation;
/**
*
* The name of the step, used as an identifier.
*
*
* @param name
* The name of the step, used as an identifier.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the step, used as an identifier.
*
*
* @return The name of the step, used as an identifier.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the step, used as an identifier.
*
*
* @param name
* The name of the step, used as an identifier.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CustomStepDetails withName(String name) {
setName(name);
return this;
}
/**
*
* The ARN for the Lambda function that is being called.
*
*
* @param target
* The ARN for the Lambda function that is being called.
*/
public void setTarget(String target) {
this.target = target;
}
/**
*
* The ARN for the Lambda function that is being called.
*
*
* @return The ARN for the Lambda function that is being called.
*/
public String getTarget() {
return this.target;
}
/**
*
* The ARN for the Lambda function that is being called.
*
*
* @param target
* The ARN for the Lambda function that is being called.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CustomStepDetails withTarget(String target) {
setTarget(target);
return this;
}
/**
*
* Timeout, in seconds, for the step.
*
*
* @param timeoutSeconds
* Timeout, in seconds, for the step.
*/
public void setTimeoutSeconds(Integer timeoutSeconds) {
this.timeoutSeconds = timeoutSeconds;
}
/**
*
* Timeout, in seconds, for the step.
*
*
* @return Timeout, in seconds, for the step.
*/
public Integer getTimeoutSeconds() {
return this.timeoutSeconds;
}
/**
*
* Timeout, in seconds, for the step.
*
*
* @param timeoutSeconds
* Timeout, in seconds, for the step.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CustomStepDetails withTimeoutSeconds(Integer timeoutSeconds) {
setTimeoutSeconds(timeoutSeconds);
return this;
}
/**
*
* Specifies which file to use as input to the workflow step: either the output from the previous step, or the
* originally uploaded file for the workflow.
*
*
* -
*
* To use the previous file as the input, enter ${previous.file}
. In this case, this workflow step uses
* the output file from the previous workflow step as input. This is the default value.
*
*
* -
*
* To use the originally uploaded file location as input for this step, enter ${original.file}
.
*
*
*
*
* @param sourceFileLocation
* Specifies which file to use as input to the workflow step: either the output from the previous step, or
* the originally uploaded file for the workflow.
*
* -
*
* To use the previous file as the input, enter ${previous.file}
. In this case, this workflow
* step uses the output file from the previous workflow step as input. This is the default value.
*
*
* -
*
* To use the originally uploaded file location as input for this step, enter ${original.file}
.
*
*
*/
public void setSourceFileLocation(String sourceFileLocation) {
this.sourceFileLocation = sourceFileLocation;
}
/**
*
* Specifies which file to use as input to the workflow step: either the output from the previous step, or the
* originally uploaded file for the workflow.
*
*
* -
*
* To use the previous file as the input, enter ${previous.file}
. In this case, this workflow step uses
* the output file from the previous workflow step as input. This is the default value.
*
*
* -
*
* To use the originally uploaded file location as input for this step, enter ${original.file}
.
*
*
*
*
* @return Specifies which file to use as input to the workflow step: either the output from the previous step, or
* the originally uploaded file for the workflow.
*
* -
*
* To use the previous file as the input, enter ${previous.file}
. In this case, this workflow
* step uses the output file from the previous workflow step as input. This is the default value.
*
*
* -
*
* To use the originally uploaded file location as input for this step, enter ${original.file}
.
*
*
*/
public String getSourceFileLocation() {
return this.sourceFileLocation;
}
/**
*
* Specifies which file to use as input to the workflow step: either the output from the previous step, or the
* originally uploaded file for the workflow.
*
*
* -
*
* To use the previous file as the input, enter ${previous.file}
. In this case, this workflow step uses
* the output file from the previous workflow step as input. This is the default value.
*
*
* -
*
* To use the originally uploaded file location as input for this step, enter ${original.file}
.
*
*
*
*
* @param sourceFileLocation
* Specifies which file to use as input to the workflow step: either the output from the previous step, or
* the originally uploaded file for the workflow.
*
* -
*
* To use the previous file as the input, enter ${previous.file}
. In this case, this workflow
* step uses the output file from the previous workflow step as input. This is the default value.
*
*
* -
*
* To use the originally uploaded file location as input for this step, enter ${original.file}
.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CustomStepDetails withSourceFileLocation(String sourceFileLocation) {
setSourceFileLocation(sourceFileLocation);
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 (getTarget() != null)
sb.append("Target: ").append(getTarget()).append(",");
if (getTimeoutSeconds() != null)
sb.append("TimeoutSeconds: ").append(getTimeoutSeconds()).append(",");
if (getSourceFileLocation() != null)
sb.append("SourceFileLocation: ").append(getSourceFileLocation());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CustomStepDetails == false)
return false;
CustomStepDetails other = (CustomStepDetails) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getTarget() == null ^ this.getTarget() == null)
return false;
if (other.getTarget() != null && other.getTarget().equals(this.getTarget()) == false)
return false;
if (other.getTimeoutSeconds() == null ^ this.getTimeoutSeconds() == null)
return false;
if (other.getTimeoutSeconds() != null && other.getTimeoutSeconds().equals(this.getTimeoutSeconds()) == false)
return false;
if (other.getSourceFileLocation() == null ^ this.getSourceFileLocation() == null)
return false;
if (other.getSourceFileLocation() != null && other.getSourceFileLocation().equals(this.getSourceFileLocation()) == 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 + ((getTarget() == null) ? 0 : getTarget().hashCode());
hashCode = prime * hashCode + ((getTimeoutSeconds() == null) ? 0 : getTimeoutSeconds().hashCode());
hashCode = prime * hashCode + ((getSourceFileLocation() == null) ? 0 : getSourceFileLocation().hashCode());
return hashCode;
}
@Override
public CustomStepDetails clone() {
try {
return (CustomStepDetails) 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.transfer.model.transform.CustomStepDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}