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 SetStatus operation.

Requests that the status of the specified physical or logical pipeline objects be updated in the specified pipeline. This update might not occur immediately, but is eventually consistent. The status that can be set depends on the type of object (for example, DataNode or Activity). You cannot perform this operation on FINISHED pipelines and attempting to do so returns InvalidRequestException .

 
 public class SetStatusRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The ID of the pipeline that contains the objects.

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

 
     private String pipelineId;

    
The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.
 
The status to be set on all the objects specified in objectIds. For components, use PAUSE or RESUME. For instances, use TRY_CANCEL, RERUN, or MARK_FINISHED.

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

 
     private String status;

    
The ID of the pipeline that contains the objects.

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

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

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

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

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 contains the objects.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SetStatusRequest withPipelineId(String pipelineId) {
        this. = pipelineId;
        return this;
    }

    
The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.

Returns:
The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.
    public java.util.List<StringgetObjectIds() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.

Parameters:
objectIds The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.
    public void setObjectIds(java.util.Collection<StringobjectIds) {
        if (objectIds == null) {
            this. = null;
            return;
        }
        objectIdsCopy.addAll(objectIds);
        this. = objectIdsCopy;
    }
    
    
The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.

NOTE: This method appends the values to the existing list (if any). Use setObjectIds(java.util.Collection) or withObjectIds(java.util.Collection) if you want to override the existing values.

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

Parameters:
objectIds The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SetStatusRequest withObjectIds(String... objectIds) {
        if (getObjectIds() == nullsetObjectIds(new java.util.ArrayList<String>(objectIds.length));
        for (String value : objectIds) {
            getObjectIds().add(value);
        }
        return this;
    }
    
    
The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.

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

Parameters:
objectIds The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SetStatusRequest withObjectIds(java.util.Collection<StringobjectIds) {
        if (objectIds == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringobjectIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(objectIds.size());
            objectIdsCopy.addAll(objectIds);
            this. = objectIdsCopy;
        }
        return this;
    }

    
The status to be set on all the objects specified in objectIds. For components, use PAUSE or RESUME. For instances, use TRY_CANCEL, RERUN, or MARK_FINISHED.

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

Returns:
The status to be set on all the objects specified in objectIds. For components, use PAUSE or RESUME. For instances, use TRY_CANCEL, RERUN, or MARK_FINISHED.
    public String getStatus() {
        return ;
    }
    
    
The status to be set on all the objects specified in objectIds. For components, use PAUSE or RESUME. For instances, use TRY_CANCEL, RERUN, or MARK_FINISHED.

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

Parameters:
status The status to be set on all the objects specified in objectIds. For components, use PAUSE or RESUME. For instances, use TRY_CANCEL, RERUN, or MARK_FINISHED.
    public void setStatus(String status) {
        this. = status;
    }
    
    
The status to be set on all the objects specified in objectIds. For components, use PAUSE or RESUME. For instances, use TRY_CANCEL, RERUN, or MARK_FINISHED.

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:
status The status to be set on all the objects specified in objectIds. For components, use PAUSE or RESUME. For instances, use TRY_CANCEL, RERUN, or MARK_FINISHED.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SetStatusRequest withStatus(String status) {
        this. = status;
        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 (getPipelineId() != nullsb.append("PipelineId: " + getPipelineId() + ",");
        if (getObjectIds() != nullsb.append("ObjectIds: " + getObjectIds() + ",");
        if (getStatus() != nullsb.append("Status: " + getStatus() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getPipelineId() == null) ? 0 : getPipelineId().hashCode()); 
        hashCode = prime * hashCode + ((getObjectIds() == null) ? 0 : getObjectIds().hashCode()); 
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof SetStatusRequest == falsereturn false;
        SetStatusRequest other = (SetStatusRequest)obj;
        
        if (other.getPipelineId() == null ^ this.getPipelineId() == nullreturn false;
        if (other.getPipelineId() != null && other.getPipelineId().equals(this.getPipelineId()) == falsereturn false
        if (other.getObjectIds() == null ^ this.getObjectIds() == nullreturn false;
        if (other.getObjectIds() != null && other.getObjectIds().equals(this.getObjectIds()) == falsereturn false
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        return true;
    }
    
    @Override
    public SetStatusRequest clone() {
        
            return (SetStatusRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X