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;
 

Contains information about a pipeline task that is assigned to a task runner.

 
 public class TaskObject implements SerializableCloneable {

    
An internal identifier for the task. This ID is passed to the SetTaskStatus and ReportTaskProgress actions.

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

 
     private String taskId;

    
The ID of the pipeline that provided the task.

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

 
     private String pipelineId;

    
The ID of the pipeline task attempt object. AWS Data Pipeline uses this value to track how many times a task is attempted.

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

 
     private String attemptId;

    
Connection information for the location where the task runner will publish the output of the task.
 
     private java.util.Map<String,PipelineObjectobjects;

    
An internal identifier for the task. This ID is passed to the SetTaskStatus and ReportTaskProgress actions.

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

Returns:
An internal identifier for the task. This ID is passed to the SetTaskStatus and ReportTaskProgress actions.
 
     public String getTaskId() {
         return ;
     }
    
    
An internal identifier for the task. This ID is passed to the SetTaskStatus and ReportTaskProgress actions.

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

Parameters:
taskId An internal identifier for the task. This ID is passed to the SetTaskStatus and ReportTaskProgress actions.
 
     public void setTaskId(String taskId) {
         this. = taskId;
     }
    
    
An internal identifier for the task. This ID is passed to the SetTaskStatus and ReportTaskProgress actions.

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 An internal identifier for the task. This ID is passed to the SetTaskStatus and ReportTaskProgress actions.
Returns:
A reference to this updated object so that method calls can be chained together.
    public TaskObject withTaskId(String taskId) {
        this. = taskId;
        return this;
    }

    
The ID of the pipeline that provided the task.

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

Returns:
The ID of the pipeline that provided the task.
    public String getPipelineId() {
        return ;
    }
    
    
The ID of the pipeline that provided the task.

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

Parameters:
pipelineId The ID of the pipeline that provided the task.
    public void setPipelineId(String pipelineId) {
        this. = pipelineId;
    }
    
    
The ID of the pipeline that provided the task.

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

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

Parameters:
pipelineId The ID of the pipeline that provided the task.
Returns:
A reference to this updated object so that method calls can be chained together.
    public TaskObject withPipelineId(String pipelineId) {
        this. = pipelineId;
        return this;
    }

    
The ID of the pipeline task attempt object. AWS Data Pipeline uses this value to track how many times a task is attempted.

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

Returns:
The ID of the pipeline task attempt object. AWS Data Pipeline uses this value to track how many times a task is attempted.
    public String getAttemptId() {
        return ;
    }
    
    
The ID of the pipeline task attempt object. AWS Data Pipeline uses this value to track how many times a task is attempted.

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

Parameters:
attemptId The ID of the pipeline task attempt object. AWS Data Pipeline uses this value to track how many times a task is attempted.
    public void setAttemptId(String attemptId) {
        this. = attemptId;
    }
    
    
The ID of the pipeline task attempt object. AWS Data Pipeline uses this value to track how many times a task is attempted.

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

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

Parameters:
attemptId The ID of the pipeline task attempt object. AWS Data Pipeline uses this value to track how many times a task is attempted.
Returns:
A reference to this updated object so that method calls can be chained together.
    public TaskObject withAttemptId(String attemptId) {
        this. = attemptId;
        return this;
    }

    
Connection information for the location where the task runner will publish the output of the task.

Returns:
Connection information for the location where the task runner will publish the output of the task.
        
        if ( == null) {
             = new java.util.HashMap<String,PipelineObject>();
        }
        return ;
    }
    
    
Connection information for the location where the task runner will publish the output of the task.

Parameters:
objects Connection information for the location where the task runner will publish the output of the task.
    public void setObjects(java.util.Map<String,PipelineObjectobjects) {
        this. = objects;
    }
    
    
Connection information for the location where the task runner will publish the output of the task.

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

Parameters:
objects Connection information for the location where the task runner will publish the output of the task.
Returns:
A reference to this updated object so that method calls can be chained together.
    public TaskObject withObjects(java.util.Map<String,PipelineObjectobjects) {
        setObjects(objects);
        return this;
    }

    
Connection information for the location where the task runner will publish the output of the task.

The method adds a new key-value pair into Objects parameter, and returns a reference to this object so that method calls can be chained together.

Parameters:
key The key of the entry to be added into Objects.
value The corresponding value of the entry to be added into Objects.
  public TaskObject addObjectsEntry(String keyPipelineObject value) {
    if (null == this.) {
      this. = new java.util.HashMap<String,PipelineObject>();
    }
    if (this..containsKey(key))
      throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
    this..put(keyvalue);
    return this;
  }

  
Removes all the entries added into Objects.

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

    this. = null;
    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 (getPipelineId() != nullsb.append("PipelineId: " + getPipelineId() + ",");
        if (getAttemptId() != nullsb.append("AttemptId: " + getAttemptId() + ",");
        if (getObjects() != nullsb.append("Objects: " + getObjects() );
        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 + ((getPipelineId() == null) ? 0 : getPipelineId().hashCode()); 
        hashCode = prime * hashCode + ((getAttemptId() == null) ? 0 : getAttemptId().hashCode()); 
        hashCode = prime * hashCode + ((getObjects() == null) ? 0 : getObjects().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof TaskObject == falsereturn false;
        TaskObject other = (TaskObject)obj;
        
        if (other.getTaskId() == null ^ this.getTaskId() == nullreturn false;
        if (other.getTaskId() != null && other.getTaskId().equals(this.getTaskId()) == falsereturn false
        if (other.getPipelineId() == null ^ this.getPipelineId() == nullreturn false;
        if (other.getPipelineId() != null && other.getPipelineId().equals(this.getPipelineId()) == falsereturn false
        if (other.getAttemptId() == null ^ this.getAttemptId() == nullreturn false;
        if (other.getAttemptId() != null && other.getAttemptId().equals(this.getAttemptId()) == falsereturn false
        if (other.getObjects() == null ^ this.getObjects() == nullreturn false;
        if (other.getObjects() != null && other.getObjects().equals(this.getObjects()) == falsereturn false
        return true;
    }
    
    @Override
    public TaskObject clone() {
        try {
            return (TaskObjectsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X