All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.datapipeline.model.SetTaskStatusRequest Maven / Gradle / Ivy

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 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 com.amazonaws.AmazonWebServiceRequest;

/**
 * 

* Contains the parameters for SetTaskStatus. *

*/ public class SetTaskStatusRequest extends AmazonWebServiceRequest implements Serializable, Cloneable { /** *

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

*/ private String taskId; /** *

* If FINISHED, the task successfully completed. If * FAILED, the task ended unsuccessfully. Preconditions use * 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. *

*/ 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. *

*/ private String errorStackTrace; /** *

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

* * @param 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 = taskId; } /** *

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

* * @return The ID of the task assigned to the task runner. This value is * provided in the response for PollForTask. */ public String getTaskId() { return this.taskId; } /** *

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

* * @param taskId * The ID of the task assigned to the task runner. This value is * provided in the response for PollForTask. * @return Returns a reference to this object so that method calls can be * chained together. */ public SetTaskStatusRequest withTaskId(String taskId) { setTaskId(taskId); return this; } /** *

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

* * @param taskStatus * If FINISHED, the task successfully completed. If * FAILED, the task ended unsuccessfully. Preconditions * use false. * @see TaskStatus */ public void setTaskStatus(String taskStatus) { this.taskStatus = taskStatus; } /** *

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

* * @return If FINISHED, the task successfully completed. If * FAILED, the task ended unsuccessfully. Preconditions * use false. * @see TaskStatus */ public String getTaskStatus() { return this.taskStatus; } /** *

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

* * @param taskStatus * If FINISHED, the task successfully completed. If * FAILED, the task ended unsuccessfully. Preconditions * use false. * @return Returns a reference to this object so that method calls can be * chained together. * @see TaskStatus */ public SetTaskStatusRequest withTaskStatus(String taskStatus) { setTaskStatus(taskStatus); return this; } /** *

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

* * @param taskStatus * If FINISHED, the task successfully completed. If * FAILED, the task ended unsuccessfully. Preconditions * use false. * @see TaskStatus */ public void setTaskStatus(TaskStatus taskStatus) { this.taskStatus = taskStatus.toString(); } /** *

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

* * @param taskStatus * If FINISHED, the task successfully completed. If * FAILED, the task ended unsuccessfully. Preconditions * use false. * @return Returns a reference to this object so that method calls can be * chained together. * @see TaskStatus */ public SetTaskStatusRequest withTaskStatus(TaskStatus taskStatus) { setTaskStatus(taskStatus); 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. *

* * @param 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 = 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. *

* * @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. */ public String getErrorId() { return 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. *

* * @param 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. * @return Returns a reference to this object so that method calls can be * chained together. */ public SetTaskStatusRequest withErrorId(String errorId) { setErrorId(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. *

* * @param 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 = 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. *

* * @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. */ public String getErrorMessage() { return 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. *

* * @param 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. * @return Returns a reference to this object so that method calls can be * chained together. */ public SetTaskStatusRequest withErrorMessage(String errorMessage) { setErrorMessage(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. *

* * @param 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 = 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. *

* * @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. */ public String getErrorStackTrace() { return 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. *

* * @param 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. * @return Returns a reference to this object so that method calls can be * chained together. */ public SetTaskStatusRequest withErrorStackTrace(String errorStackTrace) { setErrorStackTrace(errorStackTrace); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTaskId() != null) sb.append("TaskId: " + getTaskId() + ","); if (getTaskStatus() != null) sb.append("TaskStatus: " + getTaskStatus() + ","); if (getErrorId() != null) sb.append("ErrorId: " + getErrorId() + ","); if (getErrorMessage() != null) sb.append("ErrorMessage: " + getErrorMessage() + ","); if (getErrorStackTrace() != null) sb.append("ErrorStackTrace: " + getErrorStackTrace()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SetTaskStatusRequest == false) return false; SetTaskStatusRequest other = (SetTaskStatusRequest) obj; if (other.getTaskId() == null ^ this.getTaskId() == null) return false; if (other.getTaskId() != null && other.getTaskId().equals(this.getTaskId()) == false) return false; if (other.getTaskStatus() == null ^ this.getTaskStatus() == null) return false; if (other.getTaskStatus() != null && other.getTaskStatus().equals(this.getTaskStatus()) == false) return false; if (other.getErrorId() == null ^ this.getErrorId() == null) return false; if (other.getErrorId() != null && other.getErrorId().equals(this.getErrorId()) == false) return false; if (other.getErrorMessage() == null ^ this.getErrorMessage() == null) return false; if (other.getErrorMessage() != null && other.getErrorMessage().equals(this.getErrorMessage()) == false) return false; if (other.getErrorStackTrace() == null ^ this.getErrorStackTrace() == null) return false; if (other.getErrorStackTrace() != null && other.getErrorStackTrace().equals(this.getErrorStackTrace()) == false) return false; return true; } @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 SetTaskStatusRequest clone() { return (SetTaskStatusRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy