com.amazonaws.services.ssmincidents.model.UpdateTimelineEventRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ssmincidents Show documentation
/*
* 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.AmazonWebServiceRequest;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateTimelineEventRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* A token that ensures that a client calls the operation only once with the specified details.
*
*/
private String clientToken;
/**
*
* A short description of the event.
*
*/
private String eventData;
/**
*
* The ID of the event to update. You can use ListTimelineEvents
to find an event's ID.
*
*/
private String eventId;
/**
*
* Updates all existing references in a TimelineEvent
. A reference is an Amazon Web Services resource
* involved or associated with the incident. To specify a reference, enter its Amazon Resource Name (ARN). You can
* also specify a related item associated with that resource. For example, to specify an Amazon DynamoDB (DynamoDB)
* table as a resource, use its ARN. You can also specify an Amazon CloudWatch metric associated with the DynamoDB
* table as a related item.
*
*
*
* This update action overrides all existing references. If you want to keep existing references, you must specify
* them in the call. If you don't, this action removes any existing references and enters only new references.
*
*
*/
private java.util.List eventReferences;
/**
*
* The timestamp for when the event occurred.
*
*/
private java.util.Date eventTime;
/**
*
* The type of event. You can update events of type Custom Event
and Note
.
*
*/
private String eventType;
/**
*
* The Amazon Resource Name (ARN) of the incident that includes the timeline event.
*
*/
private String incidentRecordArn;
/**
*
* A token that ensures that a client calls the operation only once with the specified details.
*
*
* @param clientToken
* A token that ensures that a client calls the operation only once with the specified details.
*/
public void setClientToken(String clientToken) {
this.clientToken = clientToken;
}
/**
*
* A token that ensures that a client calls the operation only once with the specified details.
*
*
* @return A token that ensures that a client calls the operation only once with the specified details.
*/
public String getClientToken() {
return this.clientToken;
}
/**
*
* A token that ensures that a client calls the operation only once with the specified details.
*
*
* @param clientToken
* A token that ensures that a client calls the operation only once with the specified details.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTimelineEventRequest withClientToken(String clientToken) {
setClientToken(clientToken);
return this;
}
/**
*
* 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 UpdateTimelineEventRequest withEventData(String eventData) {
setEventData(eventData);
return this;
}
/**
*
* The ID of the event to update. You can use ListTimelineEvents
to find an event's ID.
*
*
* @param eventId
* The ID of the event to update. You can use ListTimelineEvents
to find an event's ID.
*/
public void setEventId(String eventId) {
this.eventId = eventId;
}
/**
*
* The ID of the event to update. You can use ListTimelineEvents
to find an event's ID.
*
*
* @return The ID of the event to update. You can use ListTimelineEvents
to find an event's ID.
*/
public String getEventId() {
return this.eventId;
}
/**
*
* The ID of the event to update. You can use ListTimelineEvents
to find an event's ID.
*
*
* @param eventId
* The ID of the event to update. You can use ListTimelineEvents
to find an event's ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTimelineEventRequest withEventId(String eventId) {
setEventId(eventId);
return this;
}
/**
*
* Updates all existing references in a TimelineEvent
. A reference is an Amazon Web Services resource
* involved or associated with the incident. To specify a reference, enter its Amazon Resource Name (ARN). You can
* also specify a related item associated with that resource. For example, to specify an Amazon DynamoDB (DynamoDB)
* table as a resource, use its ARN. You can also specify an Amazon CloudWatch metric associated with the DynamoDB
* table as a related item.
*
*
*
* This update action overrides all existing references. If you want to keep existing references, you must specify
* them in the call. If you don't, this action removes any existing references and enters only new references.
*
*
*
* @return Updates all existing references in a TimelineEvent
. A reference is an Amazon Web Services
* resource involved or associated with the incident. To specify a reference, enter its Amazon Resource Name
* (ARN). You can also specify a related item associated with that resource. For example, to specify an
* Amazon DynamoDB (DynamoDB) table as a resource, use its ARN. You can also specify an Amazon CloudWatch
* metric associated with the DynamoDB table as a related item.
*
* This update action overrides all existing references. If you want to keep existing references, you must
* specify them in the call. If you don't, this action removes any existing references and enters only new
* references.
*
*/
public java.util.List getEventReferences() {
return eventReferences;
}
/**
*
* Updates all existing references in a TimelineEvent
. A reference is an Amazon Web Services resource
* involved or associated with the incident. To specify a reference, enter its Amazon Resource Name (ARN). You can
* also specify a related item associated with that resource. For example, to specify an Amazon DynamoDB (DynamoDB)
* table as a resource, use its ARN. You can also specify an Amazon CloudWatch metric associated with the DynamoDB
* table as a related item.
*
*
*
* This update action overrides all existing references. If you want to keep existing references, you must specify
* them in the call. If you don't, this action removes any existing references and enters only new references.
*
*
*
* @param eventReferences
* Updates all existing references in a TimelineEvent
. A reference is an Amazon Web Services
* resource involved or associated with the incident. To specify a reference, enter its Amazon Resource Name
* (ARN). You can also specify a related item associated with that resource. For example, to specify an
* Amazon DynamoDB (DynamoDB) table as a resource, use its ARN. You can also specify an Amazon CloudWatch
* metric associated with the DynamoDB table as a related item.
*
* This update action overrides all existing references. If you want to keep existing references, you must
* specify them in the call. If you don't, this action removes any existing references and enters only new
* references.
*
*/
public void setEventReferences(java.util.Collection eventReferences) {
if (eventReferences == null) {
this.eventReferences = null;
return;
}
this.eventReferences = new java.util.ArrayList(eventReferences);
}
/**
*
* Updates all existing references in a TimelineEvent
. A reference is an Amazon Web Services resource
* involved or associated with the incident. To specify a reference, enter its Amazon Resource Name (ARN). You can
* also specify a related item associated with that resource. For example, to specify an Amazon DynamoDB (DynamoDB)
* table as a resource, use its ARN. You can also specify an Amazon CloudWatch metric associated with the DynamoDB
* table as a related item.
*
*
*
* This update action overrides all existing references. If you want to keep existing references, you must specify
* them in the call. If you don't, this action removes any existing references and enters only new references.
*
*
*
* 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
* Updates all existing references in a TimelineEvent
. A reference is an Amazon Web Services
* resource involved or associated with the incident. To specify a reference, enter its Amazon Resource Name
* (ARN). You can also specify a related item associated with that resource. For example, to specify an
* Amazon DynamoDB (DynamoDB) table as a resource, use its ARN. You can also specify an Amazon CloudWatch
* metric associated with the DynamoDB table as a related item.
*
* This update action overrides all existing references. If you want to keep existing references, you must
* specify them in the call. If you don't, this action removes any existing references and enters only new
* references.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTimelineEventRequest withEventReferences(EventReference... eventReferences) {
if (this.eventReferences == null) {
setEventReferences(new java.util.ArrayList(eventReferences.length));
}
for (EventReference ele : eventReferences) {
this.eventReferences.add(ele);
}
return this;
}
/**
*
* Updates all existing references in a TimelineEvent
. A reference is an Amazon Web Services resource
* involved or associated with the incident. To specify a reference, enter its Amazon Resource Name (ARN). You can
* also specify a related item associated with that resource. For example, to specify an Amazon DynamoDB (DynamoDB)
* table as a resource, use its ARN. You can also specify an Amazon CloudWatch metric associated with the DynamoDB
* table as a related item.
*
*
*
* This update action overrides all existing references. If you want to keep existing references, you must specify
* them in the call. If you don't, this action removes any existing references and enters only new references.
*
*
*
* @param eventReferences
* Updates all existing references in a TimelineEvent
. A reference is an Amazon Web Services
* resource involved or associated with the incident. To specify a reference, enter its Amazon Resource Name
* (ARN). You can also specify a related item associated with that resource. For example, to specify an
* Amazon DynamoDB (DynamoDB) table as a resource, use its ARN. You can also specify an Amazon CloudWatch
* metric associated with the DynamoDB table as a related item.
*
* This update action overrides all existing references. If you want to keep existing references, you must
* specify them in the call. If you don't, this action removes any existing references and enters only new
* references.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTimelineEventRequest 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 UpdateTimelineEventRequest withEventTime(java.util.Date eventTime) {
setEventTime(eventTime);
return this;
}
/**
*
* The type of event. You can update events of type Custom Event
and Note
.
*
*
* @param eventType
* The type of event. You can update events of type Custom Event
and Note
.
*/
public void setEventType(String eventType) {
this.eventType = eventType;
}
/**
*
* The type of event. You can update events of type Custom Event
and Note
.
*
*
* @return The type of event. You can update events of type Custom Event
and Note
.
*/
public String getEventType() {
return this.eventType;
}
/**
*
* The type of event. You can update events of type Custom Event
and Note
.
*
*
* @param eventType
* The type of event. You can update events of type Custom Event
and Note
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTimelineEventRequest withEventType(String eventType) {
setEventType(eventType);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the incident that includes the timeline event.
*
*
* @param incidentRecordArn
* The Amazon Resource Name (ARN) of the incident that includes the timeline event.
*/
public void setIncidentRecordArn(String incidentRecordArn) {
this.incidentRecordArn = incidentRecordArn;
}
/**
*
* The Amazon Resource Name (ARN) of the incident that includes the timeline event.
*
*
* @return The Amazon Resource Name (ARN) of the incident that includes the timeline event.
*/
public String getIncidentRecordArn() {
return this.incidentRecordArn;
}
/**
*
* The Amazon Resource Name (ARN) of the incident that includes the timeline event.
*
*
* @param incidentRecordArn
* The Amazon Resource Name (ARN) of the incident that includes the timeline event.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateTimelineEventRequest 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 (getClientToken() != null)
sb.append("ClientToken: ").append(getClientToken()).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 (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 UpdateTimelineEventRequest == false)
return false;
UpdateTimelineEventRequest other = (UpdateTimelineEventRequest) obj;
if (other.getClientToken() == null ^ this.getClientToken() == null)
return false;
if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false)
return false;
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.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 + ((getClientToken() == null) ? 0 : getClientToken().hashCode());
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 + ((getIncidentRecordArn() == null) ? 0 : getIncidentRecordArn().hashCode());
return hashCode;
}
@Override
public UpdateTimelineEventRequest clone() {
return (UpdateTimelineEventRequest) super.clone();
}
}