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

com.amazonaws.services.ssmincidents.model.TimelineEvent Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Systems Manager Incident Manager module holds the client classes that are used for communicating with AWS Systems Manager Incident Manager Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 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.ssmincidents.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* A significant event that happened during the incident. *

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

* A short description of the event. *

*/ private String eventData; /** *

* The ID of the timeline event. *

*/ private String eventId; /** *

* A list of references in a TimelineEvent. *

*/ private java.util.List eventReferences; /** *

* The timestamp for when the event occurred. *

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

* The type of event that occurred. Currently Incident Manager supports only the Custom Event and * Note types. *

*/ private String eventType; /** *

* The timestamp for when the timeline event was last updated. *

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

* The Amazon Resource Name (ARN) of the incident that the event occurred during. *

*/ private String incidentRecordArn; /** *

* A short description of the event. *

* * @param eventData * A short description of the event. */ public void setEventData(String eventData) { this.eventData = eventData; } /** *

* A short description of the event. *

* * @return A short description of the event. */ public String getEventData() { return this.eventData; } /** *

* A short description of the event. *

* * @param eventData * A short description of the event. * @return Returns a reference to this object so that method calls can be chained together. */ public TimelineEvent withEventData(String eventData) { setEventData(eventData); return this; } /** *

* The ID of the timeline event. *

* * @param eventId * The ID of the timeline event. */ public void setEventId(String eventId) { this.eventId = eventId; } /** *

* The ID of the timeline event. *

* * @return The ID of the timeline event. */ public String getEventId() { return this.eventId; } /** *

* The ID of the timeline event. *

* * @param eventId * The ID of the timeline event. * @return Returns a reference to this object so that method calls can be chained together. */ public TimelineEvent withEventId(String eventId) { setEventId(eventId); return this; } /** *

* A list of references in a TimelineEvent. *

* * @return A list of references in a TimelineEvent. */ public java.util.List getEventReferences() { return eventReferences; } /** *

* A list of references in a TimelineEvent. *

* * @param eventReferences * A list of references in a TimelineEvent. */ public void setEventReferences(java.util.Collection eventReferences) { if (eventReferences == null) { this.eventReferences = null; return; } this.eventReferences = new java.util.ArrayList(eventReferences); } /** *

* A list of references in a TimelineEvent. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setEventReferences(java.util.Collection)} or {@link #withEventReferences(java.util.Collection)} if you * want to override the existing values. *

* * @param eventReferences * A list of references in a TimelineEvent. * @return Returns a reference to this object so that method calls can be chained together. */ public TimelineEvent withEventReferences(EventReference... eventReferences) { if (this.eventReferences == null) { setEventReferences(new java.util.ArrayList(eventReferences.length)); } for (EventReference ele : eventReferences) { this.eventReferences.add(ele); } return this; } /** *

* A list of references in a TimelineEvent. *

* * @param eventReferences * A list of references in a TimelineEvent. * @return Returns a reference to this object so that method calls can be chained together. */ public TimelineEvent withEventReferences(java.util.Collection eventReferences) { setEventReferences(eventReferences); return this; } /** *

* The timestamp for when the event occurred. *

* * @param eventTime * The timestamp for when the event occurred. */ public void setEventTime(java.util.Date eventTime) { this.eventTime = eventTime; } /** *

* The timestamp for when the event occurred. *

* * @return The timestamp for when the event occurred. */ public java.util.Date getEventTime() { return this.eventTime; } /** *

* The timestamp for when the event occurred. *

* * @param eventTime * The timestamp for when the event occurred. * @return Returns a reference to this object so that method calls can be chained together. */ public TimelineEvent withEventTime(java.util.Date eventTime) { setEventTime(eventTime); return this; } /** *

* The type of event that occurred. Currently Incident Manager supports only the Custom Event and * Note types. *

* * @param eventType * The type of event that occurred. Currently Incident Manager supports only the Custom Event * and Note types. */ public void setEventType(String eventType) { this.eventType = eventType; } /** *

* The type of event that occurred. Currently Incident Manager supports only the Custom Event and * Note types. *

* * @return The type of event that occurred. Currently Incident Manager supports only the Custom Event * and Note types. */ public String getEventType() { return this.eventType; } /** *

* The type of event that occurred. Currently Incident Manager supports only the Custom Event and * Note types. *

* * @param eventType * The type of event that occurred. Currently Incident Manager supports only the Custom Event * and Note types. * @return Returns a reference to this object so that method calls can be chained together. */ public TimelineEvent withEventType(String eventType) { setEventType(eventType); return this; } /** *

* The timestamp for when the timeline event was last updated. *

* * @param eventUpdatedTime * The timestamp for when the timeline event was last updated. */ public void setEventUpdatedTime(java.util.Date eventUpdatedTime) { this.eventUpdatedTime = eventUpdatedTime; } /** *

* The timestamp for when the timeline event was last updated. *

* * @return The timestamp for when the timeline event was last updated. */ public java.util.Date getEventUpdatedTime() { return this.eventUpdatedTime; } /** *

* The timestamp for when the timeline event was last updated. *

* * @param eventUpdatedTime * The timestamp for when the timeline event was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public TimelineEvent withEventUpdatedTime(java.util.Date eventUpdatedTime) { setEventUpdatedTime(eventUpdatedTime); return this; } /** *

* The Amazon Resource Name (ARN) of the incident that the event occurred during. *

* * @param incidentRecordArn * The Amazon Resource Name (ARN) of the incident that the event occurred during. */ public void setIncidentRecordArn(String incidentRecordArn) { this.incidentRecordArn = incidentRecordArn; } /** *

* The Amazon Resource Name (ARN) of the incident that the event occurred during. *

* * @return The Amazon Resource Name (ARN) of the incident that the event occurred during. */ public String getIncidentRecordArn() { return this.incidentRecordArn; } /** *

* The Amazon Resource Name (ARN) of the incident that the event occurred during. *

* * @param incidentRecordArn * The Amazon Resource Name (ARN) of the incident that the event occurred during. * @return Returns a reference to this object so that method calls can be chained together. */ public TimelineEvent withIncidentRecordArn(String incidentRecordArn) { setIncidentRecordArn(incidentRecordArn); 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 (getEventData() != null) sb.append("EventData: ").append(getEventData()).append(","); if (getEventId() != null) sb.append("EventId: ").append(getEventId()).append(","); if (getEventReferences() != null) sb.append("EventReferences: ").append(getEventReferences()).append(","); if (getEventTime() != null) sb.append("EventTime: ").append(getEventTime()).append(","); if (getEventType() != null) sb.append("EventType: ").append(getEventType()).append(","); if (getEventUpdatedTime() != null) sb.append("EventUpdatedTime: ").append(getEventUpdatedTime()).append(","); if (getIncidentRecordArn() != null) sb.append("IncidentRecordArn: ").append(getIncidentRecordArn()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TimelineEvent == false) return false; TimelineEvent other = (TimelineEvent) obj; if (other.getEventData() == null ^ this.getEventData() == null) return false; if (other.getEventData() != null && other.getEventData().equals(this.getEventData()) == false) return false; if (other.getEventId() == null ^ this.getEventId() == null) return false; if (other.getEventId() != null && other.getEventId().equals(this.getEventId()) == false) return false; if (other.getEventReferences() == null ^ this.getEventReferences() == null) return false; if (other.getEventReferences() != null && other.getEventReferences().equals(this.getEventReferences()) == false) return false; if (other.getEventTime() == null ^ this.getEventTime() == null) return false; if (other.getEventTime() != null && other.getEventTime().equals(this.getEventTime()) == 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.getEventUpdatedTime() == null ^ this.getEventUpdatedTime() == null) return false; if (other.getEventUpdatedTime() != null && other.getEventUpdatedTime().equals(this.getEventUpdatedTime()) == false) return false; if (other.getIncidentRecordArn() == null ^ this.getIncidentRecordArn() == null) return false; if (other.getIncidentRecordArn() != null && other.getIncidentRecordArn().equals(this.getIncidentRecordArn()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEventData() == null) ? 0 : getEventData().hashCode()); hashCode = prime * hashCode + ((getEventId() == null) ? 0 : getEventId().hashCode()); hashCode = prime * hashCode + ((getEventReferences() == null) ? 0 : getEventReferences().hashCode()); hashCode = prime * hashCode + ((getEventTime() == null) ? 0 : getEventTime().hashCode()); hashCode = prime * hashCode + ((getEventType() == null) ? 0 : getEventType().hashCode()); hashCode = prime * hashCode + ((getEventUpdatedTime() == null) ? 0 : getEventUpdatedTime().hashCode()); hashCode = prime * hashCode + ((getIncidentRecordArn() == null) ? 0 : getIncidentRecordArn().hashCode()); return hashCode; } @Override public TimelineEvent clone() { try { return (TimelineEvent) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.ssmincidents.model.transform.TimelineEventMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy