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;
 

Describes an event in the history of the Spot fleet request.

 
 public class HistoryRecord implements SerializableCloneable {

    
The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
 
     private java.util.Date timestamp;

    
The event type.
  • error - Indicates an error with the Spot fleet request.

  • fleetRequestChange - Indicates a change in the status or configuration of the Spot fleet request.

  • instanceChange - Indicates that an instance was launched or terminated.

Constraints:
Allowed Values: instanceChange, fleetRequestChange, error

 
     private String eventType;

    
Information about the event.
 
     private EventInformation eventInformation;

    
The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

Returns:
The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
 
     public java.util.Date getTimestamp() {
         return ;
     }
    
    
The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

Parameters:
timestamp The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
 
     public void setTimestamp(java.util.Date timestamp) {
         this. = timestamp;
     }
    
    
The date and time of the event, 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:
timestamp The date and time of the event, 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 HistoryRecord withTimestamp(java.util.Date timestamp) {
         this. = timestamp;
         return this;
     }

    
The event type.
  • error - Indicates an error with the Spot fleet request.

  • fleetRequestChange - Indicates a change in the status or configuration of the Spot fleet request.

  • instanceChange - Indicates that an instance was launched or terminated.

Constraints:
Allowed Values: instanceChange, fleetRequestChange, error

Returns:
The event type.
  • error - Indicates an error with the Spot fleet request.

  • fleetRequestChange - Indicates a change in the status or configuration of the Spot fleet request.

  • instanceChange - Indicates that an instance was launched or terminated.

See also:
EventType
    public String getEventType() {
        return ;
    }
    
    
The event type.
  • error - Indicates an error with the Spot fleet request.

  • fleetRequestChange - Indicates a change in the status or configuration of the Spot fleet request.

  • instanceChange - Indicates that an instance was launched or terminated.

Constraints:
Allowed Values: instanceChange, fleetRequestChange, error

Parameters:
eventType The event type.
  • error - Indicates an error with the Spot fleet request.

  • fleetRequestChange - Indicates a change in the status or configuration of the Spot fleet request.

  • instanceChange - Indicates that an instance was launched or terminated.

See also:
EventType
    public void setEventType(String eventType) {
        this. = eventType;
    }
    
    
The event type.
  • error - Indicates an error with the Spot fleet request.

  • fleetRequestChange - Indicates a change in the status or configuration of the Spot fleet request.

  • instanceChange - Indicates that an instance was launched or terminated.

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

Constraints:
Allowed Values: instanceChange, fleetRequestChange, error

Parameters:
eventType The event type.
  • error - Indicates an error with the Spot fleet request.

  • fleetRequestChange - Indicates a change in the status or configuration of the Spot fleet request.

  • instanceChange - Indicates that an instance was launched or terminated.

Returns:
A reference to this updated object so that method calls can be chained together.
See also:
EventType
    public HistoryRecord withEventType(String eventType) {
        this. = eventType;
        return this;
    }

    
The event type.
  • error - Indicates an error with the Spot fleet request.

  • fleetRequestChange - Indicates a change in the status or configuration of the Spot fleet request.

  • instanceChange - Indicates that an instance was launched or terminated.

Constraints:
Allowed Values: instanceChange, fleetRequestChange, error

Parameters:
eventType The event type.
  • error - Indicates an error with the Spot fleet request.

  • fleetRequestChange - Indicates a change in the status or configuration of the Spot fleet request.

  • instanceChange - Indicates that an instance was launched or terminated.

See also:
EventType
    public void setEventType(EventType eventType) {
        this. = eventType.toString();
    }
    
    
The event type.
  • error - Indicates an error with the Spot fleet request.

  • fleetRequestChange - Indicates a change in the status or configuration of the Spot fleet request.

  • instanceChange - Indicates that an instance was launched or terminated.

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

Constraints:
Allowed Values: instanceChange, fleetRequestChange, error

Parameters:
eventType The event type.
  • error - Indicates an error with the Spot fleet request.

  • fleetRequestChange - Indicates a change in the status or configuration of the Spot fleet request.

  • instanceChange - Indicates that an instance was launched or terminated.

Returns:
A reference to this updated object so that method calls can be chained together.
See also:
EventType
    public HistoryRecord withEventType(EventType eventType) {
        this. = eventType.toString();
        return this;
    }

    
Information about the event.

Returns:
Information about the event.
        return ;
    }
    
    
Information about the event.

Parameters:
eventInformation Information about the event.
    public void setEventInformation(EventInformation eventInformation) {
        this. = eventInformation;
    }
    
    
Information about the event.

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

Parameters:
eventInformation Information about the event.
Returns:
A reference to this updated object so that method calls can be chained together.
    public HistoryRecord withEventInformation(EventInformation eventInformation) {
        this. = eventInformation;
        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 (getTimestamp() != nullsb.append("Timestamp: " + getTimestamp() + ",");
        if (getEventType() != nullsb.append("EventType: " + getEventType() + ",");
        if (getEventInformation() != nullsb.append("EventInformation: " + getEventInformation() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); 
        hashCode = prime * hashCode + ((getEventType() == null) ? 0 : getEventType().hashCode()); 
        hashCode = prime * hashCode + ((getEventInformation() == null) ? 0 : getEventInformation().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof HistoryRecord == falsereturn false;
        HistoryRecord other = (HistoryRecord)obj;
        
        if (other.getTimestamp() == null ^ this.getTimestamp() == nullreturn false;
        if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == falsereturn false
        if (other.getEventType() == null ^ this.getEventType() == nullreturn false;
        if (other.getEventType() != null && other.getEventType().equals(this.getEventType()) == falsereturn false
        if (other.getEventInformation() == null ^ this.getEventInformation() == nullreturn false;
        if (other.getEventInformation() != null && other.getEventInformation().equals(this.getEventInformation()) == falsereturn false
        return true;
    }
    
    @Override
    public HistoryRecord clone() {
        try {
            return (HistoryRecordsuper.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