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.redshift.model;
 
 
Container for the parameters to the PurchaseReservedNodeOffering operation.

Allows you to purchase reserved nodes. Amazon Redshift offers a predefined set of reserved node offerings. You can purchase one or more of the offerings. You can call the DescribeReservedNodeOfferings API to obtain the available reserved node offerings. You can call this API by providing a specific reserved node offering and the number of nodes you want to reserve.

For more information about reserved node offerings, go to Purchasing Reserved Nodes in the Amazon Redshift Cluster Management Guide .

 
 public class PurchaseReservedNodeOfferingRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The unique identifier of the reserved node offering you want to purchase.
 
     private String reservedNodeOfferingId;

    
The number of reserved nodes you want to purchase.

Default: 1

 
     private Integer nodeCount;

    
The unique identifier of the reserved node offering you want to purchase.

Returns:
The unique identifier of the reserved node offering you want to purchase.
 
     public String getReservedNodeOfferingId() {
         return ;
     }
    
    
The unique identifier of the reserved node offering you want to purchase.

Parameters:
reservedNodeOfferingId The unique identifier of the reserved node offering you want to purchase.
 
     public void setReservedNodeOfferingId(String reservedNodeOfferingId) {
         this. = reservedNodeOfferingId;
     }
    
    
The unique identifier of the reserved node offering you want to purchase.

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

Parameters:
reservedNodeOfferingId The unique identifier of the reserved node offering you want to purchase.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public PurchaseReservedNodeOfferingRequest withReservedNodeOfferingId(String reservedNodeOfferingId) {
         this. = reservedNodeOfferingId;
         return this;
     }

    
The number of reserved nodes you want to purchase.

Default: 1

Returns:
The number of reserved nodes you want to purchase.

Default: 1

 
    public Integer getNodeCount() {
        return ;
    }
    
    
The number of reserved nodes you want to purchase.

Default: 1

Parameters:
nodeCount The number of reserved nodes you want to purchase.

Default: 1

    public void setNodeCount(Integer nodeCount) {
        this. = nodeCount;
    }
    
    
The number of reserved nodes you want to purchase.

Default: 1

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

Parameters:
nodeCount The number of reserved nodes you want to purchase.

Default: 1

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = nodeCount;
        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 (getReservedNodeOfferingId() != nullsb.append("ReservedNodeOfferingId: " + getReservedNodeOfferingId() + ",");
        if (getNodeCount() != nullsb.append("NodeCount: " + getNodeCount() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getReservedNodeOfferingId() == null) ? 0 : getReservedNodeOfferingId().hashCode()); 
        hashCode = prime * hashCode + ((getNodeCount() == null) ? 0 : getNodeCount().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof PurchaseReservedNodeOfferingRequest == falsereturn false;
        
        if (other.getReservedNodeOfferingId() == null ^ this.getReservedNodeOfferingId() == nullreturn false;
        if (other.getReservedNodeOfferingId() != null && other.getReservedNodeOfferingId().equals(this.getReservedNodeOfferingId()) == falsereturn false
        if (other.getNodeCount() == null ^ this.getNodeCount() == nullreturn false;
        if (other.getNodeCount() != null && other.getNodeCount().equals(this.getNodeCount()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (PurchaseReservedNodeOfferingRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X