/* * 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.transfer.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Specifies the error message and type, for an error that occurs during the execution of the workflow. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ExecutionError implements Serializable, Cloneable, StructuredPojo { /** ** Specifies the error type. *
*
* ALREADY_EXISTS
: occurs for a copy step, if the overwrite option is not selected and a file with the
* same name already exists in the target location.
*
* BAD_REQUEST
: a general bad request: for example, a step that attempts to tag an EFS file returns
* BAD_REQUEST
, as only S3 files can be tagged.
*
* CUSTOM_STEP_FAILED
: occurs when the custom step provided a callback that indicates failure.
*
* INTERNAL_SERVER_ERROR
: a catch-all error that can occur for a variety of reasons.
*
* NOT_FOUND
: occurs when a requested entity, for example a source file for a copy step, does not
* exist.
*
* PERMISSION_DENIED
: occurs if your policy does not contain the correct permissions to complete one or
* more of the steps in the workflow.
*
* TIMEOUT
: occurs when the execution times out.
*
* You can set the TimeoutSeconds
for a custom step, anywhere from 1 second to 1800 seconds (30
* minutes).
*
* THROTTLED
: occurs if you exceed the new execution refill rate of one workflow per second.
*
* Specifies the descriptive message that corresponds to the ErrorType
.
*
* Specifies the error type. *
*
* ALREADY_EXISTS
: occurs for a copy step, if the overwrite option is not selected and a file with the
* same name already exists in the target location.
*
* BAD_REQUEST
: a general bad request: for example, a step that attempts to tag an EFS file returns
* BAD_REQUEST
, as only S3 files can be tagged.
*
* CUSTOM_STEP_FAILED
: occurs when the custom step provided a callback that indicates failure.
*
* INTERNAL_SERVER_ERROR
: a catch-all error that can occur for a variety of reasons.
*
* NOT_FOUND
: occurs when a requested entity, for example a source file for a copy step, does not
* exist.
*
* PERMISSION_DENIED
: occurs if your policy does not contain the correct permissions to complete one or
* more of the steps in the workflow.
*
* TIMEOUT
: occurs when the execution times out.
*
* You can set the TimeoutSeconds
for a custom step, anywhere from 1 second to 1800 seconds (30
* minutes).
*
* THROTTLED
: occurs if you exceed the new execution refill rate of one workflow per second.
*
* ALREADY_EXISTS
: occurs for a copy step, if the overwrite option is not selected and a file
* with the same name already exists in the target location.
*
* BAD_REQUEST
: a general bad request: for example, a step that attempts to tag an EFS file
* returns BAD_REQUEST
, as only S3 files can be tagged.
*
* CUSTOM_STEP_FAILED
: occurs when the custom step provided a callback that indicates failure.
*
* INTERNAL_SERVER_ERROR
: a catch-all error that can occur for a variety of reasons.
*
* NOT_FOUND
: occurs when a requested entity, for example a source file for a copy step, does
* not exist.
*
* PERMISSION_DENIED
: occurs if your policy does not contain the correct permissions to complete
* one or more of the steps in the workflow.
*
* TIMEOUT
: occurs when the execution times out.
*
* You can set the TimeoutSeconds
for a custom step, anywhere from 1 second to 1800 seconds (30
* minutes).
*
* THROTTLED
: occurs if you exceed the new execution refill rate of one workflow per second.
*
* Specifies the error type. *
*
* ALREADY_EXISTS
: occurs for a copy step, if the overwrite option is not selected and a file with the
* same name already exists in the target location.
*
* BAD_REQUEST
: a general bad request: for example, a step that attempts to tag an EFS file returns
* BAD_REQUEST
, as only S3 files can be tagged.
*
* CUSTOM_STEP_FAILED
: occurs when the custom step provided a callback that indicates failure.
*
* INTERNAL_SERVER_ERROR
: a catch-all error that can occur for a variety of reasons.
*
* NOT_FOUND
: occurs when a requested entity, for example a source file for a copy step, does not
* exist.
*
* PERMISSION_DENIED
: occurs if your policy does not contain the correct permissions to complete one or
* more of the steps in the workflow.
*
* TIMEOUT
: occurs when the execution times out.
*
* You can set the TimeoutSeconds
for a custom step, anywhere from 1 second to 1800 seconds (30
* minutes).
*
* THROTTLED
: occurs if you exceed the new execution refill rate of one workflow per second.
*
* ALREADY_EXISTS
: occurs for a copy step, if the overwrite option is not selected and a file
* with the same name already exists in the target location.
*
* BAD_REQUEST
: a general bad request: for example, a step that attempts to tag an EFS file
* returns BAD_REQUEST
, as only S3 files can be tagged.
*
* CUSTOM_STEP_FAILED
: occurs when the custom step provided a callback that indicates failure.
*
* INTERNAL_SERVER_ERROR
: a catch-all error that can occur for a variety of reasons.
*
* NOT_FOUND
: occurs when a requested entity, for example a source file for a copy step, does
* not exist.
*
* PERMISSION_DENIED
: occurs if your policy does not contain the correct permissions to
* complete one or more of the steps in the workflow.
*
* TIMEOUT
: occurs when the execution times out.
*
* You can set the TimeoutSeconds
for a custom step, anywhere from 1 second to 1800 seconds (30
* minutes).
*
* THROTTLED
: occurs if you exceed the new execution refill rate of one workflow per second.
*
* Specifies the error type. *
*
* ALREADY_EXISTS
: occurs for a copy step, if the overwrite option is not selected and a file with the
* same name already exists in the target location.
*
* BAD_REQUEST
: a general bad request: for example, a step that attempts to tag an EFS file returns
* BAD_REQUEST
, as only S3 files can be tagged.
*
* CUSTOM_STEP_FAILED
: occurs when the custom step provided a callback that indicates failure.
*
* INTERNAL_SERVER_ERROR
: a catch-all error that can occur for a variety of reasons.
*
* NOT_FOUND
: occurs when a requested entity, for example a source file for a copy step, does not
* exist.
*
* PERMISSION_DENIED
: occurs if your policy does not contain the correct permissions to complete one or
* more of the steps in the workflow.
*
* TIMEOUT
: occurs when the execution times out.
*
* You can set the TimeoutSeconds
for a custom step, anywhere from 1 second to 1800 seconds (30
* minutes).
*
* THROTTLED
: occurs if you exceed the new execution refill rate of one workflow per second.
*
* ALREADY_EXISTS
: occurs for a copy step, if the overwrite option is not selected and a file
* with the same name already exists in the target location.
*
* BAD_REQUEST
: a general bad request: for example, a step that attempts to tag an EFS file
* returns BAD_REQUEST
, as only S3 files can be tagged.
*
* CUSTOM_STEP_FAILED
: occurs when the custom step provided a callback that indicates failure.
*
* INTERNAL_SERVER_ERROR
: a catch-all error that can occur for a variety of reasons.
*
* NOT_FOUND
: occurs when a requested entity, for example a source file for a copy step, does
* not exist.
*
* PERMISSION_DENIED
: occurs if your policy does not contain the correct permissions to complete
* one or more of the steps in the workflow.
*
* TIMEOUT
: occurs when the execution times out.
*
* You can set the TimeoutSeconds
for a custom step, anywhere from 1 second to 1800 seconds (30
* minutes).
*
* THROTTLED
: occurs if you exceed the new execution refill rate of one workflow per second.
*
* Specifies the error type. *
*
* ALREADY_EXISTS
: occurs for a copy step, if the overwrite option is not selected and a file with the
* same name already exists in the target location.
*
* BAD_REQUEST
: a general bad request: for example, a step that attempts to tag an EFS file returns
* BAD_REQUEST
, as only S3 files can be tagged.
*
* CUSTOM_STEP_FAILED
: occurs when the custom step provided a callback that indicates failure.
*
* INTERNAL_SERVER_ERROR
: a catch-all error that can occur for a variety of reasons.
*
* NOT_FOUND
: occurs when a requested entity, for example a source file for a copy step, does not
* exist.
*
* PERMISSION_DENIED
: occurs if your policy does not contain the correct permissions to complete one or
* more of the steps in the workflow.
*
* TIMEOUT
: occurs when the execution times out.
*
* You can set the TimeoutSeconds
for a custom step, anywhere from 1 second to 1800 seconds (30
* minutes).
*
* THROTTLED
: occurs if you exceed the new execution refill rate of one workflow per second.
*
* ALREADY_EXISTS
: occurs for a copy step, if the overwrite option is not selected and a file
* with the same name already exists in the target location.
*
* BAD_REQUEST
: a general bad request: for example, a step that attempts to tag an EFS file
* returns BAD_REQUEST
, as only S3 files can be tagged.
*
* CUSTOM_STEP_FAILED
: occurs when the custom step provided a callback that indicates failure.
*
* INTERNAL_SERVER_ERROR
: a catch-all error that can occur for a variety of reasons.
*
* NOT_FOUND
: occurs when a requested entity, for example a source file for a copy step, does
* not exist.
*
* PERMISSION_DENIED
: occurs if your policy does not contain the correct permissions to complete
* one or more of the steps in the workflow.
*
* TIMEOUT
: occurs when the execution times out.
*
* You can set the TimeoutSeconds
for a custom step, anywhere from 1 second to 1800 seconds (30
* minutes).
*
* THROTTLED
: occurs if you exceed the new execution refill rate of one workflow per second.
*
* Specifies the descriptive message that corresponds to the ErrorType
.
*
ErrorType
.
*/
public void setMessage(String message) {
this.message = message;
}
/**
*
* Specifies the descriptive message that corresponds to the ErrorType
.
*
ErrorType
.
*/
public String getMessage() {
return this.message;
}
/**
*
* Specifies the descriptive message that corresponds to the ErrorType
.
*
ErrorType
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ExecutionError withMessage(String message) {
setMessage(message);
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 (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getMessage() != null)
sb.append("Message: ").append(getMessage());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ExecutionError == false)
return false;
ExecutionError other = (ExecutionError) obj;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
if (other.getMessage() == null ^ this.getMessage() == null)
return false;
if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode());
return hashCode;
}
@Override
public ExecutionError clone() {
try {
return (ExecutionError) 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.ExecutionErrorMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}