All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ec2.model.HistoryRecord Maven / Gradle / Ivy

/*
 * Copyright 2014-2019 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;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* Describes an event in the history of the Spot Fleet request. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class HistoryRecord implements Serializable, Cloneable { /** *

* Information about the event. *

*/ private EventInformation eventInformation; /** *

* The event type. *

*
    *
  • *

    * error - An error with the Spot Fleet request. *

    *
  • *
  • *

    * fleetRequestChange - A change in the status or configuration of the Spot Fleet request. *

    *
  • *
  • *

    * instanceChange - An instance was launched or terminated. *

    *
  • *
  • *

    * Information - An informational event. *

    *
  • *
*/ private String eventType; /** *

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

*/ private java.util.Date timestamp; /** *

* Information about the event. *

* * @param eventInformation * Information about the event. */ public void setEventInformation(EventInformation eventInformation) { this.eventInformation = eventInformation; } /** *

* Information about the event. *

* * @return Information about the event. */ public EventInformation getEventInformation() { return this.eventInformation; } /** *

* Information about the event. *

* * @param eventInformation * Information about the event. * @return Returns a reference to this object so that method calls can be chained together. */ public HistoryRecord withEventInformation(EventInformation eventInformation) { setEventInformation(eventInformation); return this; } /** *

* The event type. *

*
    *
  • *

    * error - An error with the Spot Fleet request. *

    *
  • *
  • *

    * fleetRequestChange - A change in the status or configuration of the Spot Fleet request. *

    *
  • *
  • *

    * instanceChange - An instance was launched or terminated. *

    *
  • *
  • *

    * Information - An informational event. *

    *
  • *
* * @param eventType * The event type.

*
    *
  • *

    * error - An error with the Spot Fleet request. *

    *
  • *
  • *

    * fleetRequestChange - A change in the status or configuration of the Spot Fleet request. *

    *
  • *
  • *

    * instanceChange - An instance was launched or terminated. *

    *
  • *
  • *

    * Information - An informational event. *

    *
  • * @see EventType */ public void setEventType(String eventType) { this.eventType = eventType; } /** *

    * The event type. *

    *
      *
    • *

      * error - An error with the Spot Fleet request. *

      *
    • *
    • *

      * fleetRequestChange - A change in the status or configuration of the Spot Fleet request. *

      *
    • *
    • *

      * instanceChange - An instance was launched or terminated. *

      *
    • *
    • *

      * Information - An informational event. *

      *
    • *
    * * @return The event type.

    *
      *
    • *

      * error - An error with the Spot Fleet request. *

      *
    • *
    • *

      * fleetRequestChange - A change in the status or configuration of the Spot Fleet request. *

      *
    • *
    • *

      * instanceChange - An instance was launched or terminated. *

      *
    • *
    • *

      * Information - An informational event. *

      *
    • * @see EventType */ public String getEventType() { return this.eventType; } /** *

      * The event type. *

      *
        *
      • *

        * error - An error with the Spot Fleet request. *

        *
      • *
      • *

        * fleetRequestChange - A change in the status or configuration of the Spot Fleet request. *

        *
      • *
      • *

        * instanceChange - An instance was launched or terminated. *

        *
      • *
      • *

        * Information - An informational event. *

        *
      • *
      * * @param eventType * The event type.

      *
        *
      • *

        * error - An error with the Spot Fleet request. *

        *
      • *
      • *

        * fleetRequestChange - A change in the status or configuration of the Spot Fleet request. *

        *
      • *
      • *

        * instanceChange - An instance was launched or terminated. *

        *
      • *
      • *

        * Information - An informational event. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see EventType */ public HistoryRecord withEventType(String eventType) { setEventType(eventType); return this; } /** *

        * The event type. *

        *
          *
        • *

          * error - An error with the Spot Fleet request. *

          *
        • *
        • *

          * fleetRequestChange - A change in the status or configuration of the Spot Fleet request. *

          *
        • *
        • *

          * instanceChange - An instance was launched or terminated. *

          *
        • *
        • *

          * Information - An informational event. *

          *
        • *
        * * @param eventType * The event type.

        *
          *
        • *

          * error - An error with the Spot Fleet request. *

          *
        • *
        • *

          * fleetRequestChange - A change in the status or configuration of the Spot Fleet request. *

          *
        • *
        • *

          * instanceChange - An instance was launched or terminated. *

          *
        • *
        • *

          * Information - An informational event. *

          *
        • * @see EventType */ public void setEventType(EventType eventType) { withEventType(eventType); } /** *

          * The event type. *

          *
            *
          • *

            * error - An error with the Spot Fleet request. *

            *
          • *
          • *

            * fleetRequestChange - A change in the status or configuration of the Spot Fleet request. *

            *
          • *
          • *

            * instanceChange - An instance was launched or terminated. *

            *
          • *
          • *

            * Information - An informational event. *

            *
          • *
          * * @param eventType * The event type.

          *
            *
          • *

            * error - An error with the Spot Fleet request. *

            *
          • *
          • *

            * fleetRequestChange - A change in the status or configuration of the Spot Fleet request. *

            *
          • *
          • *

            * instanceChange - An instance was launched or terminated. *

            *
          • *
          • *

            * Information - An informational event. *

            *
          • * @return Returns a reference to this object so that method calls can be chained together. * @see EventType */ public HistoryRecord withEventType(EventType eventType) { this.eventType = eventType.toString(); return this; } /** *

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

            * * @param 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 = timestamp; } /** *

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

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

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

            * * @param timestamp * The date and time of the event, in UTC format (for example, * YYYY-MM-DDTHH:MM:SSZ). * @return Returns a reference to this object so that method calls can be chained together. */ public HistoryRecord withTimestamp(java.util.Date timestamp) { setTimestamp(timestamp); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getEventInformation() != null) sb.append("EventInformation: ").append(getEventInformation()).append(","); if (getEventType() != null) sb.append("EventType: ").append(getEventType()).append(","); if (getTimestamp() != null) sb.append("Timestamp: ").append(getTimestamp()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof HistoryRecord == false) return false; HistoryRecord other = (HistoryRecord) obj; if (other.getEventInformation() == null ^ this.getEventInformation() == null) return false; if (other.getEventInformation() != null && other.getEventInformation().equals(this.getEventInformation()) == false) return false; if (other.getEventType() == null ^ this.getEventType() == null) return false; if (other.getEventType() != null && other.getEventType().equals(this.getEventType()) == false) return false; if (other.getTimestamp() == null ^ this.getTimestamp() == null) return false; if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEventInformation() == null) ? 0 : getEventInformation().hashCode()); hashCode = prime * hashCode + ((getEventType() == null) ? 0 : getEventType().hashCode()); hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); return hashCode; } @Override public HistoryRecord clone() { try { return (HistoryRecord) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy