Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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;
 
 
Container for the parameters to the SetTaskStatus operation.

Task runners call SetTaskStatus to notify AWS Data Pipeline that a task is completed and provide information about the final status. A task runner makes this call regardless of whether the task was sucessful. A task runner does not need to call SetTaskStatus for tasks that are canceled by the web service during a call to ReportTaskProgress.

 
 public class SetTaskStatusRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The ID of the task assigned to the task runner. This value is provided in the response for PollForTask.

Constraints:
Length: 1 - 2048
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String taskId;

    
If FINISHED, the task successfully completed. If FAILED, the task ended unsuccessfully. Preconditions use false.

Constraints:
Allowed Values: FINISHED, FAILED, FALSE

 
     private String taskStatus;

    
If an error occurred during the task, this value specifies the error code. This value is set on the physical attempt object. It is used to display error information to the user. It should not start with string "Service_" which is reserved by the system.

Constraints:
Length: 0 - 1024
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String errorId;

    
If an error occurred during the task, this value specifies a text description of the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.
 
     private String errorMessage;

    
If an error occurred during the task, this value specifies the stack trace associated with the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.

Constraints:
Length: 0 - 1024
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String errorStackTrace;

    
The ID of the task assigned to the task runner. This value is provided in the response for PollForTask.

Constraints:
Length: 1 - 2048
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The ID of the task assigned to the task runner. This value is provided in the response for PollForTask.
 
     public String getTaskId() {
        return ;
    }
    
    
The ID of the task assigned to the task runner. This value is provided in the response for PollForTask.

Constraints:
Length: 1 - 2048
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
taskId The ID of the task assigned to the task runner. This value is provided in the response for PollForTask.
    public void setTaskId(String taskId) {
        this. = taskId;
    }
    
    
The ID of the task assigned to the task runner. This value is provided in the response for PollForTask.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 2048
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
taskId The ID of the task assigned to the task runner. This value is provided in the response for PollForTask.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SetTaskStatusRequest withTaskId(String taskId) {
        this. = taskId;
        return this;
    }

    
If FINISHED, the task successfully completed. If FAILED, the task ended unsuccessfully. Preconditions use false.

Constraints:
Allowed Values: FINISHED, FAILED, FALSE

Returns:
If FINISHED, the task successfully completed. If FAILED, the task ended unsuccessfully. Preconditions use false.
See also:
TaskStatus
    public String getTaskStatus() {
        return ;
    }
    
    
If FINISHED, the task successfully completed. If FAILED, the task ended unsuccessfully. Preconditions use false.

Constraints:
Allowed Values: FINISHED, FAILED, FALSE

Parameters:
taskStatus If FINISHED, the task successfully completed. If FAILED, the task ended unsuccessfully. Preconditions use false.
See also:
TaskStatus
    public void setTaskStatus(String taskStatus) {
        this. = taskStatus;
    }
    
    
If FINISHED, the task successfully completed. If FAILED, the task ended unsuccessfully. Preconditions use false.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: FINISHED, FAILED, FALSE

Parameters:
taskStatus If FINISHED, the task successfully completed. If FAILED, the task ended unsuccessfully. Preconditions use false.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
TaskStatus
    public SetTaskStatusRequest withTaskStatus(String taskStatus) {
        this. = taskStatus;
        return this;
    }

    
If FINISHED, the task successfully completed. If FAILED, the task ended unsuccessfully. Preconditions use false.

Constraints:
Allowed Values: FINISHED, FAILED, FALSE

Parameters:
taskStatus If FINISHED, the task successfully completed. If FAILED, the task ended unsuccessfully. Preconditions use false.
See also:
TaskStatus
    public void setTaskStatus(TaskStatus taskStatus) {
        this. = taskStatus.toString();
    }
    
    
If FINISHED, the task successfully completed. If FAILED, the task ended unsuccessfully. Preconditions use false.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: FINISHED, FAILED, FALSE

Parameters:
taskStatus If FINISHED, the task successfully completed. If FAILED, the task ended unsuccessfully. Preconditions use false.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
TaskStatus
    public SetTaskStatusRequest withTaskStatus(TaskStatus taskStatus) {
        this. = taskStatus.toString();
        return this;
    }

    
If an error occurred during the task, this value specifies the error code. This value is set on the physical attempt object. It is used to display error information to the user. It should not start with string "Service_" which is reserved by the system.

Constraints:
Length: 0 - 1024
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
If an error occurred during the task, this value specifies the error code. This value is set on the physical attempt object. It is used to display error information to the user. It should not start with string "Service_" which is reserved by the system.
    public String getErrorId() {
        return ;
    }
    
    
If an error occurred during the task, this value specifies the error code. This value is set on the physical attempt object. It is used to display error information to the user. It should not start with string "Service_" which is reserved by the system.

Constraints:
Length: 0 - 1024
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
errorId If an error occurred during the task, this value specifies the error code. This value is set on the physical attempt object. It is used to display error information to the user. It should not start with string "Service_" which is reserved by the system.
    public void setErrorId(String errorId) {
        this. = errorId;
    }
    
    
If an error occurred during the task, this value specifies the error code. This value is set on the physical attempt object. It is used to display error information to the user. It should not start with string "Service_" which is reserved by the system.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 1024
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
errorId If an error occurred during the task, this value specifies the error code. This value is set on the physical attempt object. It is used to display error information to the user. It should not start with string "Service_" which is reserved by the system.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SetTaskStatusRequest withErrorId(String errorId) {
        this. = errorId;
        return this;
    }

    
If an error occurred during the task, this value specifies a text description of the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.

Returns:
If an error occurred during the task, this value specifies a text description of the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.
    public String getErrorMessage() {
        return ;
    }
    
    
If an error occurred during the task, this value specifies a text description of the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.

Parameters:
errorMessage If an error occurred during the task, this value specifies a text description of the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.
    public void setErrorMessage(String errorMessage) {
        this. = errorMessage;
    }
    
    
If an error occurred during the task, this value specifies a text description of the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.

Returns a reference to this object so that method calls can be chained together.

Parameters:
errorMessage If an error occurred during the task, this value specifies a text description of the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SetTaskStatusRequest withErrorMessage(String errorMessage) {
        this. = errorMessage;
        return this;
    }

    
If an error occurred during the task, this value specifies the stack trace associated with the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.

Constraints:
Length: 0 - 1024
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
If an error occurred during the task, this value specifies the stack trace associated with the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.
    public String getErrorStackTrace() {
        return ;
    }
    
    
If an error occurred during the task, this value specifies the stack trace associated with the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.

Constraints:
Length: 0 - 1024
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
errorStackTrace If an error occurred during the task, this value specifies the stack trace associated with the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.
    public void setErrorStackTrace(String errorStackTrace) {
        this. = errorStackTrace;
    }
    
    
If an error occurred during the task, this value specifies the stack trace associated with the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 1024
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
errorStackTrace If an error occurred during the task, this value specifies the stack trace associated with the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SetTaskStatusRequest withErrorStackTrace(String errorStackTrace) {
        this. = errorStackTrace;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getTaskId() != nullsb.append("TaskId: " + getTaskId() + ",");
        if (getTaskStatus() != nullsb.append("TaskStatus: " + getTaskStatus() + ",");
        if (getErrorId() != nullsb.append("ErrorId: " + getErrorId() + ",");
        if (getErrorMessage() != nullsb.append("ErrorMessage: " + getErrorMessage() + ",");
        if (getErrorStackTrace() != nullsb.append("ErrorStackTrace: " + getErrorStackTrace() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getTaskId() == null) ? 0 : getTaskId().hashCode()); 
        hashCode = prime * hashCode + ((getTaskStatus() == null) ? 0 : getTaskStatus().hashCode()); 
        hashCode = prime * hashCode + ((getErrorId() == null) ? 0 : getErrorId().hashCode()); 
        hashCode = prime * hashCode + ((getErrorMessage() == null) ? 0 : getErrorMessage().hashCode()); 
        hashCode = prime * hashCode + ((getErrorStackTrace() == null) ? 0 : getErrorStackTrace().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof SetTaskStatusRequest == falsereturn false;
        SetTaskStatusRequest other = (SetTaskStatusRequest)obj;
        
        if (other.getTaskId() == null ^ this.getTaskId() == nullreturn false;
        if (other.getTaskId() != null && other.getTaskId().equals(this.getTaskId()) == falsereturn false
        if (other.getTaskStatus() == null ^ this.getTaskStatus() == nullreturn false;
        if (other.getTaskStatus() != null && other.getTaskStatus().equals(this.getTaskStatus()) == falsereturn false
        if (other.getErrorId() == null ^ this.getErrorId() == nullreturn false;
        if (other.getErrorId() != null && other.getErrorId().equals(this.getErrorId()) == falsereturn false
        if (other.getErrorMessage() == null ^ this.getErrorMessage() == nullreturn false;
        if (other.getErrorMessage() != null && other.getErrorMessage().equals(this.getErrorMessage()) == falsereturn false
        if (other.getErrorStackTrace() == null ^ this.getErrorStackTrace() == nullreturn false;
        if (other.getErrorStackTrace() != null && other.getErrorStackTrace().equals(this.getErrorStackTrace()) == falsereturn false
        return true;
    }
    
    @Override
    public SetTaskStatusRequest clone() {
        
            return (SetTaskStatusRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X