com.amazonaws.services.ssmincidents.model.StartIncidentRequest 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 StartIncidentRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* A token ensuring that the operation is called only once with the specified details.
*
*/
private String clientToken;
/**
*
* Defines the impact to the customers. Providing an impact overwrites the impact provided by a response plan.
*
*
* Supported impact codes
*
*
* -
*
* 1
- Critical
*
*
* -
*
* 2
- High
*
*
* -
*
* 3
- Medium
*
*
* -
*
* 4
- Low
*
*
* -
*
* 5
- No Impact
*
*
*
*/
private Integer impact;
/**
*
* Add related items to the incident for other responders to use. Related items are Amazon Web Services resources,
* external links, or files uploaded to an Amazon S3 bucket.
*
*/
private java.util.List relatedItems;
/**
*
* The Amazon Resource Name (ARN) of the response plan that pre-defines summary, chat channels, Amazon SNS topics,
* runbooks, title, and impact of the incident.
*
*/
private String responsePlanArn;
/**
*
* Provide a title for the incident. Providing a title overwrites the title provided by the response plan.
*
*/
private String title;
/**
*
* Details of what created the incident record in Incident Manager.
*
*/
private TriggerDetails triggerDetails;
/**
*
* A token ensuring that the operation is called only once with the specified details.
*
*
* @param clientToken
* A token ensuring that the operation is called only once with the specified details.
*/
public void setClientToken(String clientToken) {
this.clientToken = clientToken;
}
/**
*
* A token ensuring that the operation is called only once with the specified details.
*
*
* @return A token ensuring that the operation is called only once with the specified details.
*/
public String getClientToken() {
return this.clientToken;
}
/**
*
* A token ensuring that the operation is called only once with the specified details.
*
*
* @param clientToken
* A token ensuring that the operation is called only once with the specified details.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartIncidentRequest withClientToken(String clientToken) {
setClientToken(clientToken);
return this;
}
/**
*
* Defines the impact to the customers. Providing an impact overwrites the impact provided by a response plan.
*
*
* Supported impact codes
*
*
* -
*
* 1
- Critical
*
*
* -
*
* 2
- High
*
*
* -
*
* 3
- Medium
*
*
* -
*
* 4
- Low
*
*
* -
*
* 5
- No Impact
*
*
*
*
* @param impact
* Defines the impact to the customers. Providing an impact overwrites the impact provided by a response
* plan.
*
* Supported impact codes
*
*
* -
*
* 1
- Critical
*
*
* -
*
* 2
- High
*
*
* -
*
* 3
- Medium
*
*
* -
*
* 4
- Low
*
*
* -
*
* 5
- No Impact
*
*
*/
public void setImpact(Integer impact) {
this.impact = impact;
}
/**
*
* Defines the impact to the customers. Providing an impact overwrites the impact provided by a response plan.
*
*
* Supported impact codes
*
*
* -
*
* 1
- Critical
*
*
* -
*
* 2
- High
*
*
* -
*
* 3
- Medium
*
*
* -
*
* 4
- Low
*
*
* -
*
* 5
- No Impact
*
*
*
*
* @return Defines the impact to the customers. Providing an impact overwrites the impact provided by a response
* plan.
*
* Supported impact codes
*
*
* -
*
* 1
- Critical
*
*
* -
*
* 2
- High
*
*
* -
*
* 3
- Medium
*
*
* -
*
* 4
- Low
*
*
* -
*
* 5
- No Impact
*
*
*/
public Integer getImpact() {
return this.impact;
}
/**
*
* Defines the impact to the customers. Providing an impact overwrites the impact provided by a response plan.
*
*
* Supported impact codes
*
*
* -
*
* 1
- Critical
*
*
* -
*
* 2
- High
*
*
* -
*
* 3
- Medium
*
*
* -
*
* 4
- Low
*
*
* -
*
* 5
- No Impact
*
*
*
*
* @param impact
* Defines the impact to the customers. Providing an impact overwrites the impact provided by a response
* plan.
*
* Supported impact codes
*
*
* -
*
* 1
- Critical
*
*
* -
*
* 2
- High
*
*
* -
*
* 3
- Medium
*
*
* -
*
* 4
- Low
*
*
* -
*
* 5
- No Impact
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartIncidentRequest withImpact(Integer impact) {
setImpact(impact);
return this;
}
/**
*
* Add related items to the incident for other responders to use. Related items are Amazon Web Services resources,
* external links, or files uploaded to an Amazon S3 bucket.
*
*
* @return Add related items to the incident for other responders to use. Related items are Amazon Web Services
* resources, external links, or files uploaded to an Amazon S3 bucket.
*/
public java.util.List getRelatedItems() {
return relatedItems;
}
/**
*
* Add related items to the incident for other responders to use. Related items are Amazon Web Services resources,
* external links, or files uploaded to an Amazon S3 bucket.
*
*
* @param relatedItems
* Add related items to the incident for other responders to use. Related items are Amazon Web Services
* resources, external links, or files uploaded to an Amazon S3 bucket.
*/
public void setRelatedItems(java.util.Collection relatedItems) {
if (relatedItems == null) {
this.relatedItems = null;
return;
}
this.relatedItems = new java.util.ArrayList(relatedItems);
}
/**
*
* Add related items to the incident for other responders to use. Related items are Amazon Web Services resources,
* external links, or files uploaded to an Amazon S3 bucket.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setRelatedItems(java.util.Collection)} or {@link #withRelatedItems(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param relatedItems
* Add related items to the incident for other responders to use. Related items are Amazon Web Services
* resources, external links, or files uploaded to an Amazon S3 bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartIncidentRequest withRelatedItems(RelatedItem... relatedItems) {
if (this.relatedItems == null) {
setRelatedItems(new java.util.ArrayList(relatedItems.length));
}
for (RelatedItem ele : relatedItems) {
this.relatedItems.add(ele);
}
return this;
}
/**
*
* Add related items to the incident for other responders to use. Related items are Amazon Web Services resources,
* external links, or files uploaded to an Amazon S3 bucket.
*
*
* @param relatedItems
* Add related items to the incident for other responders to use. Related items are Amazon Web Services
* resources, external links, or files uploaded to an Amazon S3 bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartIncidentRequest withRelatedItems(java.util.Collection relatedItems) {
setRelatedItems(relatedItems);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the response plan that pre-defines summary, chat channels, Amazon SNS topics,
* runbooks, title, and impact of the incident.
*
*
* @param responsePlanArn
* The Amazon Resource Name (ARN) of the response plan that pre-defines summary, chat channels, Amazon SNS
* topics, runbooks, title, and impact of the incident.
*/
public void setResponsePlanArn(String responsePlanArn) {
this.responsePlanArn = responsePlanArn;
}
/**
*
* The Amazon Resource Name (ARN) of the response plan that pre-defines summary, chat channels, Amazon SNS topics,
* runbooks, title, and impact of the incident.
*
*
* @return The Amazon Resource Name (ARN) of the response plan that pre-defines summary, chat channels, Amazon SNS
* topics, runbooks, title, and impact of the incident.
*/
public String getResponsePlanArn() {
return this.responsePlanArn;
}
/**
*
* The Amazon Resource Name (ARN) of the response plan that pre-defines summary, chat channels, Amazon SNS topics,
* runbooks, title, and impact of the incident.
*
*
* @param responsePlanArn
* The Amazon Resource Name (ARN) of the response plan that pre-defines summary, chat channels, Amazon SNS
* topics, runbooks, title, and impact of the incident.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartIncidentRequest withResponsePlanArn(String responsePlanArn) {
setResponsePlanArn(responsePlanArn);
return this;
}
/**
*
* Provide a title for the incident. Providing a title overwrites the title provided by the response plan.
*
*
* @param title
* Provide a title for the incident. Providing a title overwrites the title provided by the response plan.
*/
public void setTitle(String title) {
this.title = title;
}
/**
*
* Provide a title for the incident. Providing a title overwrites the title provided by the response plan.
*
*
* @return Provide a title for the incident. Providing a title overwrites the title provided by the response plan.
*/
public String getTitle() {
return this.title;
}
/**
*
* Provide a title for the incident. Providing a title overwrites the title provided by the response plan.
*
*
* @param title
* Provide a title for the incident. Providing a title overwrites the title provided by the response plan.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartIncidentRequest withTitle(String title) {
setTitle(title);
return this;
}
/**
*
* Details of what created the incident record in Incident Manager.
*
*
* @param triggerDetails
* Details of what created the incident record in Incident Manager.
*/
public void setTriggerDetails(TriggerDetails triggerDetails) {
this.triggerDetails = triggerDetails;
}
/**
*
* Details of what created the incident record in Incident Manager.
*
*
* @return Details of what created the incident record in Incident Manager.
*/
public TriggerDetails getTriggerDetails() {
return this.triggerDetails;
}
/**
*
* Details of what created the incident record in Incident Manager.
*
*
* @param triggerDetails
* Details of what created the incident record in Incident Manager.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartIncidentRequest withTriggerDetails(TriggerDetails triggerDetails) {
setTriggerDetails(triggerDetails);
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 (getImpact() != null)
sb.append("Impact: ").append(getImpact()).append(",");
if (getRelatedItems() != null)
sb.append("RelatedItems: ").append(getRelatedItems()).append(",");
if (getResponsePlanArn() != null)
sb.append("ResponsePlanArn: ").append(getResponsePlanArn()).append(",");
if (getTitle() != null)
sb.append("Title: ").append(getTitle()).append(",");
if (getTriggerDetails() != null)
sb.append("TriggerDetails: ").append(getTriggerDetails());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof StartIncidentRequest == false)
return false;
StartIncidentRequest other = (StartIncidentRequest) obj;
if (other.getClientToken() == null ^ this.getClientToken() == null)
return false;
if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false)
return false;
if (other.getImpact() == null ^ this.getImpact() == null)
return false;
if (other.getImpact() != null && other.getImpact().equals(this.getImpact()) == false)
return false;
if (other.getRelatedItems() == null ^ this.getRelatedItems() == null)
return false;
if (other.getRelatedItems() != null && other.getRelatedItems().equals(this.getRelatedItems()) == false)
return false;
if (other.getResponsePlanArn() == null ^ this.getResponsePlanArn() == null)
return false;
if (other.getResponsePlanArn() != null && other.getResponsePlanArn().equals(this.getResponsePlanArn()) == false)
return false;
if (other.getTitle() == null ^ this.getTitle() == null)
return false;
if (other.getTitle() != null && other.getTitle().equals(this.getTitle()) == false)
return false;
if (other.getTriggerDetails() == null ^ this.getTriggerDetails() == null)
return false;
if (other.getTriggerDetails() != null && other.getTriggerDetails().equals(this.getTriggerDetails()) == 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 + ((getImpact() == null) ? 0 : getImpact().hashCode());
hashCode = prime * hashCode + ((getRelatedItems() == null) ? 0 : getRelatedItems().hashCode());
hashCode = prime * hashCode + ((getResponsePlanArn() == null) ? 0 : getResponsePlanArn().hashCode());
hashCode = prime * hashCode + ((getTitle() == null) ? 0 : getTitle().hashCode());
hashCode = prime * hashCode + ((getTriggerDetails() == null) ? 0 : getTriggerDetails().hashCode());
return hashCode;
}
@Override
public StartIncidentRequest clone() {
return (StartIncidentRequest) super.clone();
}
}