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;
  

Describe a Spot Instance request.

  
  public class SpotInstanceRequest implements SerializableCloneable {

    
The ID of the Spot Instance request.
  
      private String spotInstanceRequestId;

    
The maximum hourly price (bid) for any Spot Instance launched to fulfill the request.
  
      private String spotPrice;

    
The Spot Instance request type.

Constraints:
Allowed Values: one-time, persistent

  
      private String type;

    
The state of the Spot Instance request. Spot bid status information can help you track your Spot Instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide for Linux.

Constraints:
Allowed Values: open, active, closed, cancelled, failed

  
      private String state;

    
The fault codes for the Spot Instance request, if any.
  
      private SpotInstanceStateFault fault;

    
The status code and status message describing the Spot Instance request.
  
      private SpotInstanceStatus status;

    
The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.
  
      private java.util.Date validFrom;

    
The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.
  
      private java.util.Date validUntil;

    
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
  
      private String launchGroup;

    
The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.
 
     private String availabilityZoneGroup;

    
Additional information for launching instances.
 
     private LaunchSpecification launchSpecification;

    
The instance ID, if an instance has been launched to fulfill the Spot Instance request.
 
     private String instanceId;

    
The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
 
     private java.util.Date createTime;

    
The product description associated with the Spot Instance.

Constraints:
Allowed Values: Linux/UNIX, Linux/UNIX (Amazon VPC), Windows, Windows (Amazon VPC)

 
     private String productDescription;

    
Any tags assigned to the resource.
 
The Availability Zone in which the bid is launched.
 
     private String launchedAvailabilityZone;

    
The ID of the Spot Instance request.

Returns:
The ID of the Spot Instance request.
 
     public String getSpotInstanceRequestId() {
         return ;
     }
    
    
The ID of the Spot Instance request.

Parameters:
spotInstanceRequestId The ID of the Spot Instance request.
 
     public void setSpotInstanceRequestId(String spotInstanceRequestId) {
         this. = spotInstanceRequestId;
     }
    
    
The ID of the Spot Instance request.

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

Parameters:
spotInstanceRequestId The ID of the Spot Instance request.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public SpotInstanceRequest withSpotInstanceRequestId(String spotInstanceRequestId) {
         this. = spotInstanceRequestId;
         return this;
     }

    
The maximum hourly price (bid) for any Spot Instance launched to fulfill the request.

Returns:
The maximum hourly price (bid) for any Spot Instance launched to fulfill the request.
 
     public String getSpotPrice() {
         return ;
     }
    
    
The maximum hourly price (bid) for any Spot Instance launched to fulfill the request.

Parameters:
spotPrice The maximum hourly price (bid) for any Spot Instance launched to fulfill the request.
 
     public void setSpotPrice(String spotPrice) {
         this. = spotPrice;
     }
    
    
The maximum hourly price (bid) for any Spot Instance launched to fulfill the request.

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

Parameters:
spotPrice The maximum hourly price (bid) for any Spot Instance launched to fulfill the request.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public SpotInstanceRequest withSpotPrice(String spotPrice) {
         this. = spotPrice;
         return this;
     }

    
The Spot Instance request type.

Constraints:
Allowed Values: one-time, persistent

Returns:
The Spot Instance request type.
See also:
SpotInstanceType
 
     public String getType() {
         return ;
     }
    
    
The Spot Instance request type.

Constraints:
Allowed Values: one-time, persistent

Parameters:
type The Spot Instance request type.
See also:
SpotInstanceType
 
     public void setType(String type) {
         this. = type;
     }
    
    
The Spot Instance request type.

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

Constraints:
Allowed Values: one-time, persistent

Parameters:
type The Spot Instance request type.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
SpotInstanceType
 
     public SpotInstanceRequest withType(String type) {
         this. = type;
         return this;
     }

    
The Spot Instance request type.

Constraints:
Allowed Values: one-time, persistent

Parameters:
type The Spot Instance request type.
See also:
SpotInstanceType
 
     public void setType(SpotInstanceType type) {
         this. = type.toString();
     }
    
    
The Spot Instance request type.

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

Constraints:
Allowed Values: one-time, persistent

Parameters:
type The Spot Instance request type.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
SpotInstanceType
 
     public SpotInstanceRequest withType(SpotInstanceType type) {
         this. = type.toString();
         return this;
     }

    
The state of the Spot Instance request. Spot bid status information can help you track your Spot Instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide for Linux.

Constraints:
Allowed Values: open, active, closed, cancelled, failed

Returns:
The state of the Spot Instance request. Spot bid status information can help you track your Spot Instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide for Linux.
See also:
SpotInstanceState
 
     public String getState() {
         return ;
     }
    
    
The state of the Spot Instance request. Spot bid status information can help you track your Spot Instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide for Linux.

Constraints:
Allowed Values: open, active, closed, cancelled, failed

Parameters:
state The state of the Spot Instance request. Spot bid status information can help you track your Spot Instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide for Linux.
See also:
SpotInstanceState
 
     public void setState(String state) {
         this. = state;
     }
    
    
The state of the Spot Instance request. Spot bid status information can help you track your Spot Instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide for Linux.

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

Constraints:
Allowed Values: open, active, closed, cancelled, failed

Parameters:
state The state of the Spot Instance request. Spot bid status information can help you track your Spot Instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide for Linux.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
SpotInstanceState
 
     public SpotInstanceRequest withState(String state) {
         this. = state;
         return this;
     }

    
The state of the Spot Instance request. Spot bid status information can help you track your Spot Instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide for Linux.

Constraints:
Allowed Values: open, active, closed, cancelled, failed

Parameters:
state The state of the Spot Instance request. Spot bid status information can help you track your Spot Instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide for Linux.
See also:
SpotInstanceState
 
     public void setState(SpotInstanceState state) {
         this. = state.toString();
     }
    
    
The state of the Spot Instance request. Spot bid status information can help you track your Spot Instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide for Linux.

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

Constraints:
Allowed Values: open, active, closed, cancelled, failed

Parameters:
state The state of the Spot Instance request. Spot bid status information can help you track your Spot Instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide for Linux.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
SpotInstanceState
 
     public SpotInstanceRequest withState(SpotInstanceState state) {
         this. = state.toString();
         return this;
     }

    
The fault codes for the Spot Instance request, if any.

Returns:
The fault codes for the Spot Instance request, if any.
 
     public SpotInstanceStateFault getFault() {
         return ;
     }
    
    
The fault codes for the Spot Instance request, if any.

Parameters:
fault The fault codes for the Spot Instance request, if any.
 
     public void setFault(SpotInstanceStateFault fault) {
         this. = fault;
     }
    
    
The fault codes for the Spot Instance request, if any.

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

Parameters:
fault The fault codes for the Spot Instance request, if any.
Returns:
A reference to this updated object so that method calls can be chained together.
 
         this. = fault;
         return this;
     }

    
The status code and status message describing the Spot Instance request.

Returns:
The status code and status message describing the Spot Instance request.
 
     public SpotInstanceStatus getStatus() {
         return ;
     }
    
    
The status code and status message describing the Spot Instance request.

Parameters:
status The status code and status message describing the Spot Instance request.
 
     public void setStatus(SpotInstanceStatus status) {
         this. = status;
     }
    
    
The status code and status message describing the Spot Instance request.

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

Parameters:
status The status code and status message describing the Spot Instance request.
Returns:
A reference to this updated object so that method calls can be chained together.
 
         this. = status;
         return this;
     }

    
The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

Returns:
The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.
 
     public java.util.Date getValidFrom() {
         return ;
     }
    
    
The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

Parameters:
validFrom The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.
 
     public void setValidFrom(java.util.Date validFrom) {
         this. = validFrom;
     }
    
    
The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

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

Parameters:
validFrom The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public SpotInstanceRequest withValidFrom(java.util.Date validFrom) {
         this. = validFrom;
         return this;
     }

    
The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.

Returns:
The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.
 
     public java.util.Date getValidUntil() {
         return ;
     }
    
    
The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.

Parameters:
validUntil The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.
 
     public void setValidUntil(java.util.Date validUntil) {
         this. = validUntil;
     }
    
    
The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.

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

Parameters:
validUntil The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public SpotInstanceRequest withValidUntil(java.util.Date validUntil) {
         this. = validUntil;
         return this;
     }

    
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.

Returns:
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
 
     public String getLaunchGroup() {
         return ;
     }
    
    
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.

Parameters:
launchGroup The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
 
     public void setLaunchGroup(String launchGroup) {
         this. = launchGroup;
     }
    
    
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.

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

Parameters:
launchGroup The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public SpotInstanceRequest withLaunchGroup(String launchGroup) {
         this. = launchGroup;
         return this;
     }

    
The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

Returns:
The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.
 
     public String getAvailabilityZoneGroup() {
         return ;
     }
    
    
The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

Parameters:
availabilityZoneGroup The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.
 
     public void setAvailabilityZoneGroup(String availabilityZoneGroup) {
         this. = availabilityZoneGroup;
     }
    
    
The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

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

Parameters:
availabilityZoneGroup The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public SpotInstanceRequest withAvailabilityZoneGroup(String availabilityZoneGroup) {
         this. = availabilityZoneGroup;
         return this;
     }

    
Additional information for launching instances.

Returns:
Additional information for launching instances.
 
         return ;
     }
    
    
Additional information for launching instances.

Parameters:
launchSpecification Additional information for launching instances.
 
     public void setLaunchSpecification(LaunchSpecification launchSpecification) {
         this. = launchSpecification;
     }
    
    
Additional information for launching instances.

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

Parameters:
launchSpecification Additional information for launching instances.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public SpotInstanceRequest withLaunchSpecification(LaunchSpecification launchSpecification) {
         this. = launchSpecification;
         return this;
     }

    
The instance ID, if an instance has been launched to fulfill the Spot Instance request.

Returns:
The instance ID, if an instance has been launched to fulfill the Spot Instance request.
 
     public String getInstanceId() {
         return ;
     }
    
    
The instance ID, if an instance has been launched to fulfill the Spot Instance request.

Parameters:
instanceId The instance ID, if an instance has been launched to fulfill the Spot Instance request.
 
     public void setInstanceId(String instanceId) {
         this. = instanceId;
     }
    
    
The instance ID, if an instance has been launched to fulfill the Spot Instance request.

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

Parameters:
instanceId The instance ID, if an instance has been launched to fulfill the Spot Instance request.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public SpotInstanceRequest withInstanceId(String instanceId) {
         this. = instanceId;
         return this;
     }

    
The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

Returns:
The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
 
     public java.util.Date getCreateTime() {
         return ;
     }
    
    
The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

Parameters:
createTime The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
 
     public void setCreateTime(java.util.Date createTime) {
         this. = createTime;
     }
    
    
The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

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

Parameters:
createTime The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public SpotInstanceRequest withCreateTime(java.util.Date createTime) {
         this. = createTime;
         return this;
     }

    
The product description associated with the Spot Instance.

Constraints:
Allowed Values: Linux/UNIX, Linux/UNIX (Amazon VPC), Windows, Windows (Amazon VPC)

Returns:
The product description associated with the Spot Instance.
See also:
RIProductDescription
 
     public String getProductDescription() {
         return ;
     }
    
    
The product description associated with the Spot Instance.

Constraints:
Allowed Values: Linux/UNIX, Linux/UNIX (Amazon VPC), Windows, Windows (Amazon VPC)

Parameters:
productDescription The product description associated with the Spot Instance.
See also:
RIProductDescription
 
     public void setProductDescription(String productDescription) {
         this. = productDescription;
     }
    
    
The product description associated with the Spot Instance.

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

Constraints:
Allowed Values: Linux/UNIX, Linux/UNIX (Amazon VPC), Windows, Windows (Amazon VPC)

Parameters:
productDescription The product description associated with the Spot Instance.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
RIProductDescription
 
     public SpotInstanceRequest withProductDescription(String productDescription) {
         this. = productDescription;
         return this;
     }

    
The product description associated with the Spot Instance.

Constraints:
Allowed Values: Linux/UNIX, Linux/UNIX (Amazon VPC), Windows, Windows (Amazon VPC)

Parameters:
productDescription The product description associated with the Spot Instance.
See also:
RIProductDescription
 
     public void setProductDescription(RIProductDescription productDescription) {
         this. = productDescription.toString();
     }
    
    
The product description associated with the Spot Instance.

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

Constraints:
Allowed Values: Linux/UNIX, Linux/UNIX (Amazon VPC), Windows, Windows (Amazon VPC)

Parameters:
productDescription The product description associated with the Spot Instance.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
RIProductDescription
 
     public SpotInstanceRequest withProductDescription(RIProductDescription productDescription) {
         this. = productDescription.toString();
         return this;
     }

    
Any tags assigned to the resource.

Returns:
Any tags assigned to the resource.
 
     public java.util.List<TaggetTags() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<Tag>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
Any tags assigned to the resource.

Parameters:
tags Any tags assigned to the resource.
 
     public void setTags(java.util.Collection<Tagtags) {
         if (tags == null) {
             this. = null;
             return;
         }
         tagsCopy.addAll(tags);
         this. = tagsCopy;
     }
    
    
Any tags assigned to the resource.

NOTE: This method appends the values to the existing list (if any). Use setTags(java.util.Collection) or withTags(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:
tags Any tags assigned to the resource.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public SpotInstanceRequest withTags(Tag... tags) {
         if (getTags() == nullsetTags(new java.util.ArrayList<Tag>(tags.length));
         for (Tag value : tags) {
             getTags().add(value);
         }
         return this;
     }
    
    
Any tags assigned to the resource.

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

Parameters:
tags Any tags assigned to the resource.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public SpotInstanceRequest withTags(java.util.Collection<Tagtags) {
         if (tags == null) {
             this. = null;
         } else {
             tagsCopy.addAll(tags);
             this. = tagsCopy;
         }
 
         return this;
     }

    
The Availability Zone in which the bid is launched.

Returns:
The Availability Zone in which the bid is launched.
 
     public String getLaunchedAvailabilityZone() {
         return ;
     }
    
    
The Availability Zone in which the bid is launched.

Parameters:
launchedAvailabilityZone The Availability Zone in which the bid is launched.
 
     public void setLaunchedAvailabilityZone(String launchedAvailabilityZone) {
        this. = launchedAvailabilityZone;
    }
    
    
The Availability Zone in which the bid is launched.

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

Parameters:
launchedAvailabilityZone The Availability Zone in which the bid is launched.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SpotInstanceRequest withLaunchedAvailabilityZone(String launchedAvailabilityZone) {
        this. = launchedAvailabilityZone;
        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 (getSpotInstanceRequestId() != nullsb.append("SpotInstanceRequestId: " + getSpotInstanceRequestId() + ",");
        if (getSpotPrice() != nullsb.append("SpotPrice: " + getSpotPrice() + ",");
        if (getType() != nullsb.append("Type: " + getType() + ",");
        if (getState() != nullsb.append("State: " + getState() + ",");
        if (getFault() != nullsb.append("Fault: " + getFault() + ",");
        if (getStatus() != nullsb.append("Status: " + getStatus() + ",");
        if (getValidFrom() != nullsb.append("ValidFrom: " + getValidFrom() + ",");
        if (getValidUntil() != nullsb.append("ValidUntil: " + getValidUntil() + ",");
        if (getLaunchGroup() != nullsb.append("LaunchGroup: " + getLaunchGroup() + ",");
        if (getAvailabilityZoneGroup() != nullsb.append("AvailabilityZoneGroup: " + getAvailabilityZoneGroup() + ",");
        if (getLaunchSpecification() != nullsb.append("LaunchSpecification: " + getLaunchSpecification() + ",");
        if (getInstanceId() != nullsb.append("InstanceId: " + getInstanceId() + ",");
        if (getCreateTime() != nullsb.append("CreateTime: " + getCreateTime() + ",");
        if (getProductDescription() != nullsb.append("ProductDescription: " + getProductDescription() + ",");
        if (getTags() != nullsb.append("Tags: " + getTags() + ",");
        if (getLaunchedAvailabilityZone() != nullsb.append("LaunchedAvailabilityZone: " + getLaunchedAvailabilityZone() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getSpotInstanceRequestId() == null) ? 0 : getSpotInstanceRequestId().hashCode()); 
        hashCode = prime * hashCode + ((getSpotPrice() == null) ? 0 : getSpotPrice().hashCode()); 
        hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); 
        hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); 
        hashCode = prime * hashCode + ((getFault() == null) ? 0 : getFault().hashCode()); 
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        hashCode = prime * hashCode + ((getValidFrom() == null) ? 0 : getValidFrom().hashCode()); 
        hashCode = prime * hashCode + ((getValidUntil() == null) ? 0 : getValidUntil().hashCode()); 
        hashCode = prime * hashCode + ((getLaunchGroup() == null) ? 0 : getLaunchGroup().hashCode()); 
        hashCode = prime * hashCode + ((getAvailabilityZoneGroup() == null) ? 0 : getAvailabilityZoneGroup().hashCode()); 
        hashCode = prime * hashCode + ((getLaunchSpecification() == null) ? 0 : getLaunchSpecification().hashCode()); 
        hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); 
        hashCode = prime * hashCode + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); 
        hashCode = prime * hashCode + ((getProductDescription() == null) ? 0 : getProductDescription().hashCode()); 
        hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); 
        hashCode = prime * hashCode + ((getLaunchedAvailabilityZone() == null) ? 0 : getLaunchedAvailabilityZone().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof SpotInstanceRequest == falsereturn false;
        SpotInstanceRequest other = (SpotInstanceRequest)obj;
        
        if (other.getSpotInstanceRequestId() == null ^ this.getSpotInstanceRequestId() == nullreturn false;
        if (other.getSpotInstanceRequestId() != null && other.getSpotInstanceRequestId().equals(this.getSpotInstanceRequestId()) == falsereturn false
        if (other.getSpotPrice() == null ^ this.getSpotPrice() == nullreturn false;
        if (other.getSpotPrice() != null && other.getSpotPrice().equals(this.getSpotPrice()) == falsereturn false
        if (other.getType() == null ^ this.getType() == nullreturn false;
        if (other.getType() != null && other.getType().equals(this.getType()) == falsereturn false
        if (other.getState() == null ^ this.getState() == nullreturn false;
        if (other.getState() != null && other.getState().equals(this.getState()) == falsereturn false
        if (other.getFault() == null ^ this.getFault() == nullreturn false;
        if (other.getFault() != null && other.getFault().equals(this.getFault()) == falsereturn false
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        if (other.getValidFrom() == null ^ this.getValidFrom() == nullreturn false;
        if (other.getValidFrom() != null && other.getValidFrom().equals(this.getValidFrom()) == falsereturn false
        if (other.getValidUntil() == null ^ this.getValidUntil() == nullreturn false;
        if (other.getValidUntil() != null && other.getValidUntil().equals(this.getValidUntil()) == falsereturn false
        if (other.getLaunchGroup() == null ^ this.getLaunchGroup() == nullreturn false;
        if (other.getLaunchGroup() != null && other.getLaunchGroup().equals(this.getLaunchGroup()) == falsereturn false
        if (other.getAvailabilityZoneGroup() == null ^ this.getAvailabilityZoneGroup() == nullreturn false;
        if (other.getAvailabilityZoneGroup() != null && other.getAvailabilityZoneGroup().equals(this.getAvailabilityZoneGroup()) == falsereturn false
        if (other.getLaunchSpecification() == null ^ this.getLaunchSpecification() == nullreturn false;
        if (other.getLaunchSpecification() != null && other.getLaunchSpecification().equals(this.getLaunchSpecification()) == falsereturn false
        if (other.getInstanceId() == null ^ this.getInstanceId() == nullreturn false;
        if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == falsereturn false
        if (other.getCreateTime() == null ^ this.getCreateTime() == nullreturn false;
        if (other.getCreateTime() != null && other.getCreateTime().equals(this.getCreateTime()) == falsereturn false
        if (other.getProductDescription() == null ^ this.getProductDescription() == nullreturn false;
        if (other.getProductDescription() != null && other.getProductDescription().equals(this.getProductDescription()) == falsereturn false
        if (other.getTags() == null ^ this.getTags() == nullreturn false;
        if (other.getTags() != null && other.getTags().equals(this.getTags()) == falsereturn false
        if (other.getLaunchedAvailabilityZone() == null ^ this.getLaunchedAvailabilityZone() == nullreturn false;
        if (other.getLaunchedAvailabilityZone() != null && other.getLaunchedAvailabilityZone().equals(this.getLaunchedAvailabilityZone()) == falsereturn false
        return true;
    }
    
    @Override
    public SpotInstanceRequest clone() {
        try {
            return (SpotInstanceRequestsuper.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