com.amazonaws.services.ssmincidents.model.GetResponsePlanResult 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;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetResponsePlanResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The actions that this response plan takes at the beginning of the incident.
*
*/
private java.util.List actions;
/**
*
* The ARN of the response plan.
*
*/
private String arn;
/**
*
* The Chatbot chat channel used for collaboration during an incident.
*
*/
private ChatChannel chatChannel;
/**
*
* The long format name of the response plan. Can contain spaces.
*
*/
private String displayName;
/**
*
* The Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages during an
* incident.
*
*/
private java.util.List engagements;
/**
*
* Details used to create the incident when using this response plan.
*
*/
private IncidentTemplate incidentTemplate;
/**
*
* Information about third-party services integrated into the Incident Manager response plan.
*
*/
private java.util.List integrations;
/**
*
* The short format name of the response plan. The name can't contain spaces.
*
*/
private String name;
/**
*
* The actions that this response plan takes at the beginning of the incident.
*
*
* @return The actions that this response plan takes at the beginning of the incident.
*/
public java.util.List getActions() {
return actions;
}
/**
*
* The actions that this response plan takes at the beginning of the incident.
*
*
* @param actions
* The actions that this response plan takes at the beginning of the incident.
*/
public void setActions(java.util.Collection actions) {
if (actions == null) {
this.actions = null;
return;
}
this.actions = new java.util.ArrayList(actions);
}
/**
*
* The actions that this response plan takes at the beginning of the incident.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setActions(java.util.Collection)} or {@link #withActions(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param actions
* The actions that this response plan takes at the beginning of the incident.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetResponsePlanResult withActions(Action... actions) {
if (this.actions == null) {
setActions(new java.util.ArrayList(actions.length));
}
for (Action ele : actions) {
this.actions.add(ele);
}
return this;
}
/**
*
* The actions that this response plan takes at the beginning of the incident.
*
*
* @param actions
* The actions that this response plan takes at the beginning of the incident.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetResponsePlanResult withActions(java.util.Collection actions) {
setActions(actions);
return this;
}
/**
*
* The ARN of the response plan.
*
*
* @param arn
* The ARN of the response plan.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The ARN of the response plan.
*
*
* @return The ARN of the response plan.
*/
public String getArn() {
return this.arn;
}
/**
*
* The ARN of the response plan.
*
*
* @param arn
* The ARN of the response plan.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetResponsePlanResult withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The Chatbot chat channel used for collaboration during an incident.
*
*
* @param chatChannel
* The Chatbot chat channel used for collaboration during an incident.
*/
public void setChatChannel(ChatChannel chatChannel) {
this.chatChannel = chatChannel;
}
/**
*
* The Chatbot chat channel used for collaboration during an incident.
*
*
* @return The Chatbot chat channel used for collaboration during an incident.
*/
public ChatChannel getChatChannel() {
return this.chatChannel;
}
/**
*
* The Chatbot chat channel used for collaboration during an incident.
*
*
* @param chatChannel
* The Chatbot chat channel used for collaboration during an incident.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetResponsePlanResult withChatChannel(ChatChannel chatChannel) {
setChatChannel(chatChannel);
return this;
}
/**
*
* The long format name of the response plan. Can contain spaces.
*
*
* @param displayName
* The long format name of the response plan. Can contain spaces.
*/
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
/**
*
* The long format name of the response plan. Can contain spaces.
*
*
* @return The long format name of the response plan. Can contain spaces.
*/
public String getDisplayName() {
return this.displayName;
}
/**
*
* The long format name of the response plan. Can contain spaces.
*
*
* @param displayName
* The long format name of the response plan. Can contain spaces.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetResponsePlanResult withDisplayName(String displayName) {
setDisplayName(displayName);
return this;
}
/**
*
* The Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages during an
* incident.
*
*
* @return The Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages
* during an incident.
*/
public java.util.List getEngagements() {
return engagements;
}
/**
*
* The Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages during an
* incident.
*
*
* @param engagements
* The Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages during
* an incident.
*/
public void setEngagements(java.util.Collection engagements) {
if (engagements == null) {
this.engagements = null;
return;
}
this.engagements = new java.util.ArrayList(engagements);
}
/**
*
* The Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages during an
* incident.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setEngagements(java.util.Collection)} or {@link #withEngagements(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param engagements
* The Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages during
* an incident.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetResponsePlanResult withEngagements(String... engagements) {
if (this.engagements == null) {
setEngagements(new java.util.ArrayList(engagements.length));
}
for (String ele : engagements) {
this.engagements.add(ele);
}
return this;
}
/**
*
* The Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages during an
* incident.
*
*
* @param engagements
* The Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages during
* an incident.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetResponsePlanResult withEngagements(java.util.Collection engagements) {
setEngagements(engagements);
return this;
}
/**
*
* Details used to create the incident when using this response plan.
*
*
* @param incidentTemplate
* Details used to create the incident when using this response plan.
*/
public void setIncidentTemplate(IncidentTemplate incidentTemplate) {
this.incidentTemplate = incidentTemplate;
}
/**
*
* Details used to create the incident when using this response plan.
*
*
* @return Details used to create the incident when using this response plan.
*/
public IncidentTemplate getIncidentTemplate() {
return this.incidentTemplate;
}
/**
*
* Details used to create the incident when using this response plan.
*
*
* @param incidentTemplate
* Details used to create the incident when using this response plan.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetResponsePlanResult withIncidentTemplate(IncidentTemplate incidentTemplate) {
setIncidentTemplate(incidentTemplate);
return this;
}
/**
*
* Information about third-party services integrated into the Incident Manager response plan.
*
*
* @return Information about third-party services integrated into the Incident Manager response plan.
*/
public java.util.List getIntegrations() {
return integrations;
}
/**
*
* Information about third-party services integrated into the Incident Manager response plan.
*
*
* @param integrations
* Information about third-party services integrated into the Incident Manager response plan.
*/
public void setIntegrations(java.util.Collection integrations) {
if (integrations == null) {
this.integrations = null;
return;
}
this.integrations = new java.util.ArrayList(integrations);
}
/**
*
* Information about third-party services integrated into the Incident Manager response plan.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setIntegrations(java.util.Collection)} or {@link #withIntegrations(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param integrations
* Information about third-party services integrated into the Incident Manager response plan.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetResponsePlanResult withIntegrations(Integration... integrations) {
if (this.integrations == null) {
setIntegrations(new java.util.ArrayList(integrations.length));
}
for (Integration ele : integrations) {
this.integrations.add(ele);
}
return this;
}
/**
*
* Information about third-party services integrated into the Incident Manager response plan.
*
*
* @param integrations
* Information about third-party services integrated into the Incident Manager response plan.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetResponsePlanResult withIntegrations(java.util.Collection integrations) {
setIntegrations(integrations);
return this;
}
/**
*
* The short format name of the response plan. The name can't contain spaces.
*
*
* @param name
* The short format name of the response plan. The name can't contain spaces.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The short format name of the response plan. The name can't contain spaces.
*
*
* @return The short format name of the response plan. The name can't contain spaces.
*/
public String getName() {
return this.name;
}
/**
*
* The short format name of the response plan. The name can't contain spaces.
*
*
* @param name
* The short format name of the response plan. The name can't contain spaces.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetResponsePlanResult withName(String name) {
setName(name);
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 (getActions() != null)
sb.append("Actions: ").append(getActions()).append(",");
if (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getChatChannel() != null)
sb.append("ChatChannel: ").append(getChatChannel()).append(",");
if (getDisplayName() != null)
sb.append("DisplayName: ").append(getDisplayName()).append(",");
if (getEngagements() != null)
sb.append("Engagements: ").append(getEngagements()).append(",");
if (getIncidentTemplate() != null)
sb.append("IncidentTemplate: ").append(getIncidentTemplate()).append(",");
if (getIntegrations() != null)
sb.append("Integrations: ").append(getIntegrations()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetResponsePlanResult == false)
return false;
GetResponsePlanResult other = (GetResponsePlanResult) obj;
if (other.getActions() == null ^ this.getActions() == null)
return false;
if (other.getActions() != null && other.getActions().equals(this.getActions()) == false)
return false;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getChatChannel() == null ^ this.getChatChannel() == null)
return false;
if (other.getChatChannel() != null && other.getChatChannel().equals(this.getChatChannel()) == false)
return false;
if (other.getDisplayName() == null ^ this.getDisplayName() == null)
return false;
if (other.getDisplayName() != null && other.getDisplayName().equals(this.getDisplayName()) == false)
return false;
if (other.getEngagements() == null ^ this.getEngagements() == null)
return false;
if (other.getEngagements() != null && other.getEngagements().equals(this.getEngagements()) == false)
return false;
if (other.getIncidentTemplate() == null ^ this.getIncidentTemplate() == null)
return false;
if (other.getIncidentTemplate() != null && other.getIncidentTemplate().equals(this.getIncidentTemplate()) == false)
return false;
if (other.getIntegrations() == null ^ this.getIntegrations() == null)
return false;
if (other.getIntegrations() != null && other.getIntegrations().equals(this.getIntegrations()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getActions() == null) ? 0 : getActions().hashCode());
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getChatChannel() == null) ? 0 : getChatChannel().hashCode());
hashCode = prime * hashCode + ((getDisplayName() == null) ? 0 : getDisplayName().hashCode());
hashCode = prime * hashCode + ((getEngagements() == null) ? 0 : getEngagements().hashCode());
hashCode = prime * hashCode + ((getIncidentTemplate() == null) ? 0 : getIncidentTemplate().hashCode());
hashCode = prime * hashCode + ((getIntegrations() == null) ? 0 : getIntegrations().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
return hashCode;
}
@Override
public GetResponsePlanResult clone() {
try {
return (GetResponsePlanResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}