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

Describes your account's Reserved Instance listings in the Reserved Instance Marketplace.

The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.

As a seller, you choose to list some or all of your Reserved Instances, and you specify the upfront price to receive for them. Your Reserved Instances are then listed in the Reserved Instance Marketplace and are available for purchase.

As a buyer, you specify the configuration of the Reserved Instance to purchase, and the Marketplace matches what you're searching for with what's available. The Marketplace first sells the lowest priced Reserved Instances to you, and continues to sell available Reserved Instance listings to you until your demand is met. You are charged based on the total price of all of the listings that you purchase.

For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide for Linux .

 
One or more Reserved Instance IDs.
 
     private String reservedInstancesId;

    
One or more Reserved Instance Listing IDs.
 
     private String reservedInstancesListingId;

    
One or more filters.
  • reserved-instances-id - The ID of the Reserved Instances.

  • reserved-instances-listing-id - The ID of the Reserved Instances listing.

  • status - The status of the Reserved Instance listing (pending | active | cancelled | closed).

  • status-message - The reason for the status.

 
One or more Reserved Instance IDs.

Returns:
One or more Reserved Instance IDs.
 
     public String getReservedInstancesId() {
         return ;
     }
    
    
One or more Reserved Instance IDs.

Parameters:
reservedInstancesId One or more Reserved Instance IDs.
 
     public void setReservedInstancesId(String reservedInstancesId) {
         this. = reservedInstancesId;
     }
    
    
One or more Reserved Instance IDs.

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

Parameters:
reservedInstancesId One or more Reserved Instance IDs.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = reservedInstancesId;
        return this;
    }

    
One or more Reserved Instance Listing IDs.

Returns:
One or more Reserved Instance Listing IDs.
        return ;
    }
    
    
One or more Reserved Instance Listing IDs.

Parameters:
reservedInstancesListingId One or more Reserved Instance Listing IDs.
    public void setReservedInstancesListingId(String reservedInstancesListingId) {
        this. = reservedInstancesListingId;
    }
    
    
One or more Reserved Instance Listing IDs.

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

Parameters:
reservedInstancesListingId One or more Reserved Instance Listing IDs.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = reservedInstancesListingId;
        return this;
    }

    
One or more filters.
  • reserved-instances-id - The ID of the Reserved Instances.

  • reserved-instances-listing-id - The ID of the Reserved Instances listing.

  • status - The status of the Reserved Instance listing (pending | active | cancelled | closed).

  • status-message - The reason for the status.

Returns:
One or more filters.
  • reserved-instances-id - The ID of the Reserved Instances.

  • reserved-instances-listing-id - The ID of the Reserved Instances listing.

  • status - The status of the Reserved Instance listing (pending | active | cancelled | closed).

  • status-message - The reason for the status.

    public java.util.List<FiltergetFilters() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<Filter>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
One or more filters.
  • reserved-instances-id - The ID of the Reserved Instances.

  • reserved-instances-listing-id - The ID of the Reserved Instances listing.

  • status - The status of the Reserved Instance listing (pending | active | cancelled | closed).

  • status-message - The reason for the status.

Parameters:
filters One or more filters.
  • reserved-instances-id - The ID of the Reserved Instances.

  • reserved-instances-listing-id - The ID of the Reserved Instances listing.

  • status - The status of the Reserved Instance listing (pending | active | cancelled | closed).

  • status-message - The reason for the status.

    public void setFilters(java.util.Collection<Filterfilters) {
        if (filters == null) {
            this. = null;
            return;
        }
        filtersCopy.addAll(filters);
        this. = filtersCopy;
    }
    
    
One or more filters.
  • reserved-instances-id - The ID of the Reserved Instances.

  • reserved-instances-listing-id - The ID of the Reserved Instances listing.

  • status - The status of the Reserved Instance listing (pending | active | cancelled | closed).

  • status-message - The reason for the status.

NOTE: This method appends the values to the existing list (if any). Use setFilters(java.util.Collection) or withFilters(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:
filters One or more filters.
  • reserved-instances-id - The ID of the Reserved Instances.

  • reserved-instances-listing-id - The ID of the Reserved Instances listing.

  • status - The status of the Reserved Instance listing (pending | active | cancelled | closed).

  • status-message - The reason for the status.

Returns:
A reference to this updated object so that method calls can be chained together.
        if (getFilters() == nullsetFilters(new java.util.ArrayList<Filter>(filters.length));
        for (Filter value : filters) {
            getFilters().add(value);
        }
        return this;
    }
    
    
One or more filters.
  • reserved-instances-id - The ID of the Reserved Instances.

  • reserved-instances-listing-id - The ID of the Reserved Instances listing.

  • status - The status of the Reserved Instance listing (pending | active | cancelled | closed).

  • status-message - The reason for the status.

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

Parameters:
filters One or more filters.
  • reserved-instances-id - The ID of the Reserved Instances.

  • reserved-instances-listing-id - The ID of the Reserved Instances listing.

  • status - The status of the Reserved Instance listing (pending | active | cancelled | closed).

  • status-message - The reason for the status.

Returns:
A reference to this updated object so that method calls can be chained together.
        if (filters == null) {
            this. = null;
        } else {
            filtersCopy.addAll(filters);
            this. = filtersCopy;
        }
        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 (getReservedInstancesId() != nullsb.append("ReservedInstancesId: " + getReservedInstancesId() + ",");
        if (getReservedInstancesListingId() != nullsb.append("ReservedInstancesListingId: " + getReservedInstancesListingId() + ",");
        if (getFilters() != nullsb.append("Filters: " + getFilters() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getReservedInstancesId() == null) ? 0 : getReservedInstancesId().hashCode()); 
        hashCode = prime * hashCode + ((getReservedInstancesListingId() == null) ? 0 : getReservedInstancesListingId().hashCode()); 
        hashCode = prime * hashCode + ((getFilters() == null) ? 0 : getFilters().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DescribeReservedInstancesListingsRequest == falsereturn false;
        
        if (other.getReservedInstancesId() == null ^ this.getReservedInstancesId() == nullreturn false;
        if (other.getReservedInstancesId() != null && other.getReservedInstancesId().equals(this.getReservedInstancesId()) == falsereturn false
        if (other.getReservedInstancesListingId() == null ^ this.getReservedInstancesListingId() == nullreturn false;
        if (other.getReservedInstancesListingId() != null && other.getReservedInstancesListingId().equals(this.getReservedInstancesListingId()) == falsereturn false
        if (other.getFilters() == null ^ this.getFilters() == nullreturn false;
        if (other.getFilters() != null && other.getFilters().equals(this.getFilters()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (DescribeReservedInstancesListingsRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X