com.amazonaws.services.ssmcontacts.model.Engagement Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ssmcontacts 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.ssmcontacts.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Incident Manager reaching out to a contact or escalation plan to engage contact during an incident.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Engagement implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Resource Name (ARN) of the engagement.
*
*/
private String engagementArn;
/**
*
* The ARN of the escalation plan or contact that Incident Manager is engaging.
*
*/
private String contactArn;
/**
*
* The user that started the engagement.
*
*/
private String sender;
/**
*
* The ARN of the incident that's engaging the contact.
*
*/
private String incidentId;
/**
*
* The time that the engagement began.
*
*/
private java.util.Date startTime;
/**
*
* The time that the engagement ended.
*
*/
private java.util.Date stopTime;
/**
*
* The Amazon Resource Name (ARN) of the engagement.
*
*
* @param engagementArn
* The Amazon Resource Name (ARN) of the engagement.
*/
public void setEngagementArn(String engagementArn) {
this.engagementArn = engagementArn;
}
/**
*
* The Amazon Resource Name (ARN) of the engagement.
*
*
* @return The Amazon Resource Name (ARN) of the engagement.
*/
public String getEngagementArn() {
return this.engagementArn;
}
/**
*
* The Amazon Resource Name (ARN) of the engagement.
*
*
* @param engagementArn
* The Amazon Resource Name (ARN) of the engagement.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Engagement withEngagementArn(String engagementArn) {
setEngagementArn(engagementArn);
return this;
}
/**
*
* The ARN of the escalation plan or contact that Incident Manager is engaging.
*
*
* @param contactArn
* The ARN of the escalation plan or contact that Incident Manager is engaging.
*/
public void setContactArn(String contactArn) {
this.contactArn = contactArn;
}
/**
*
* The ARN of the escalation plan or contact that Incident Manager is engaging.
*
*
* @return The ARN of the escalation plan or contact that Incident Manager is engaging.
*/
public String getContactArn() {
return this.contactArn;
}
/**
*
* The ARN of the escalation plan or contact that Incident Manager is engaging.
*
*
* @param contactArn
* The ARN of the escalation plan or contact that Incident Manager is engaging.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Engagement withContactArn(String contactArn) {
setContactArn(contactArn);
return this;
}
/**
*
* The user that started the engagement.
*
*
* @param sender
* The user that started the engagement.
*/
public void setSender(String sender) {
this.sender = sender;
}
/**
*
* The user that started the engagement.
*
*
* @return The user that started the engagement.
*/
public String getSender() {
return this.sender;
}
/**
*
* The user that started the engagement.
*
*
* @param sender
* The user that started the engagement.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Engagement withSender(String sender) {
setSender(sender);
return this;
}
/**
*
* The ARN of the incident that's engaging the contact.
*
*
* @param incidentId
* The ARN of the incident that's engaging the contact.
*/
public void setIncidentId(String incidentId) {
this.incidentId = incidentId;
}
/**
*
* The ARN of the incident that's engaging the contact.
*
*
* @return The ARN of the incident that's engaging the contact.
*/
public String getIncidentId() {
return this.incidentId;
}
/**
*
* The ARN of the incident that's engaging the contact.
*
*
* @param incidentId
* The ARN of the incident that's engaging the contact.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Engagement withIncidentId(String incidentId) {
setIncidentId(incidentId);
return this;
}
/**
*
* The time that the engagement began.
*
*
* @param startTime
* The time that the engagement began.
*/
public void setStartTime(java.util.Date startTime) {
this.startTime = startTime;
}
/**
*
* The time that the engagement began.
*
*
* @return The time that the engagement began.
*/
public java.util.Date getStartTime() {
return this.startTime;
}
/**
*
* The time that the engagement began.
*
*
* @param startTime
* The time that the engagement began.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Engagement withStartTime(java.util.Date startTime) {
setStartTime(startTime);
return this;
}
/**
*
* The time that the engagement ended.
*
*
* @param stopTime
* The time that the engagement ended.
*/
public void setStopTime(java.util.Date stopTime) {
this.stopTime = stopTime;
}
/**
*
* The time that the engagement ended.
*
*
* @return The time that the engagement ended.
*/
public java.util.Date getStopTime() {
return this.stopTime;
}
/**
*
* The time that the engagement ended.
*
*
* @param stopTime
* The time that the engagement ended.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Engagement withStopTime(java.util.Date stopTime) {
setStopTime(stopTime);
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 (getEngagementArn() != null)
sb.append("EngagementArn: ").append(getEngagementArn()).append(",");
if (getContactArn() != null)
sb.append("ContactArn: ").append(getContactArn()).append(",");
if (getSender() != null)
sb.append("Sender: ").append(getSender()).append(",");
if (getIncidentId() != null)
sb.append("IncidentId: ").append(getIncidentId()).append(",");
if (getStartTime() != null)
sb.append("StartTime: ").append(getStartTime()).append(",");
if (getStopTime() != null)
sb.append("StopTime: ").append(getStopTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Engagement == false)
return false;
Engagement other = (Engagement) obj;
if (other.getEngagementArn() == null ^ this.getEngagementArn() == null)
return false;
if (other.getEngagementArn() != null && other.getEngagementArn().equals(this.getEngagementArn()) == false)
return false;
if (other.getContactArn() == null ^ this.getContactArn() == null)
return false;
if (other.getContactArn() != null && other.getContactArn().equals(this.getContactArn()) == false)
return false;
if (other.getSender() == null ^ this.getSender() == null)
return false;
if (other.getSender() != null && other.getSender().equals(this.getSender()) == false)
return false;
if (other.getIncidentId() == null ^ this.getIncidentId() == null)
return false;
if (other.getIncidentId() != null && other.getIncidentId().equals(this.getIncidentId()) == false)
return false;
if (other.getStartTime() == null ^ this.getStartTime() == null)
return false;
if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false)
return false;
if (other.getStopTime() == null ^ this.getStopTime() == null)
return false;
if (other.getStopTime() != null && other.getStopTime().equals(this.getStopTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEngagementArn() == null) ? 0 : getEngagementArn().hashCode());
hashCode = prime * hashCode + ((getContactArn() == null) ? 0 : getContactArn().hashCode());
hashCode = prime * hashCode + ((getSender() == null) ? 0 : getSender().hashCode());
hashCode = prime * hashCode + ((getIncidentId() == null) ? 0 : getIncidentId().hashCode());
hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
hashCode = prime * hashCode + ((getStopTime() == null) ? 0 : getStopTime().hashCode());
return hashCode;
}
@Override
public Engagement clone() {
try {
return (Engagement) 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.ssmcontacts.model.transform.EngagementMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}