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

com.amazonaws.services.ssmincidents.model.IncidentTemplate 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;

/**
 * 

* Basic details used in creating a response plan. The response plan is then used to create an incident record. *

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

* The string Incident Manager uses to prevent the same root cause from creating multiple incidents in the same * account. *

*

* A deduplication string is a term or phrase the system uses to check for duplicate incidents. If you specify a * deduplication string, Incident Manager searches for open incidents that contain the same string in the * dedupeString field when it creates the incident. If a duplicate is detected, Incident Manager * deduplicates the newer incident into the existing incident. *

* *

* By default, Incident Manager automatically deduplicates multiple incidents created by the same Amazon CloudWatch * alarm or Amazon EventBridge event. You don't have to enter your own deduplication string to prevent duplication * for these resource types. *

*
*/ private String dedupeString; /** *

* The impact of the incident on your customers and applications. *

*

* Supported impact codes *

*
    *
  • *

    * 1 - Critical *

    *
  • *
  • *

    * 2 - High *

    *
  • *
  • *

    * 3 - Medium *

    *
  • *
  • *

    * 4 - Low *

    *
  • *
  • *

    * 5 - No Impact *

    *
  • *
*/ private Integer impact; /** *

* Tags to assign to the template. When the StartIncident API action is called, Incident Manager * assigns the tags specified in the template to the incident. *

*/ private java.util.Map incidentTags; /** *

* The Amazon SNS targets that are notified when updates are made to an incident. *

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

* The summary of the incident. The summary is a brief synopsis of what occurred, what's currently happening, and * context. *

*/ private String summary; /** *

* The title of the incident. *

*/ private String title; /** *

* The string Incident Manager uses to prevent the same root cause from creating multiple incidents in the same * account. *

*

* A deduplication string is a term or phrase the system uses to check for duplicate incidents. If you specify a * deduplication string, Incident Manager searches for open incidents that contain the same string in the * dedupeString field when it creates the incident. If a duplicate is detected, Incident Manager * deduplicates the newer incident into the existing incident. *

* *

* By default, Incident Manager automatically deduplicates multiple incidents created by the same Amazon CloudWatch * alarm or Amazon EventBridge event. You don't have to enter your own deduplication string to prevent duplication * for these resource types. *

*
* * @param dedupeString * The string Incident Manager uses to prevent the same root cause from creating multiple incidents in the * same account.

*

* A deduplication string is a term or phrase the system uses to check for duplicate incidents. If you * specify a deduplication string, Incident Manager searches for open incidents that contain the same string * in the dedupeString field when it creates the incident. If a duplicate is detected, Incident * Manager deduplicates the newer incident into the existing incident. *

* *

* By default, Incident Manager automatically deduplicates multiple incidents created by the same Amazon * CloudWatch alarm or Amazon EventBridge event. You don't have to enter your own deduplication string to * prevent duplication for these resource types. *

*/ public void setDedupeString(String dedupeString) { this.dedupeString = dedupeString; } /** *

* The string Incident Manager uses to prevent the same root cause from creating multiple incidents in the same * account. *

*

* A deduplication string is a term or phrase the system uses to check for duplicate incidents. If you specify a * deduplication string, Incident Manager searches for open incidents that contain the same string in the * dedupeString field when it creates the incident. If a duplicate is detected, Incident Manager * deduplicates the newer incident into the existing incident. *

* *

* By default, Incident Manager automatically deduplicates multiple incidents created by the same Amazon CloudWatch * alarm or Amazon EventBridge event. You don't have to enter your own deduplication string to prevent duplication * for these resource types. *

*
* * @return The string Incident Manager uses to prevent the same root cause from creating multiple incidents in the * same account.

*

* A deduplication string is a term or phrase the system uses to check for duplicate incidents. If you * specify a deduplication string, Incident Manager searches for open incidents that contain the same string * in the dedupeString field when it creates the incident. If a duplicate is detected, Incident * Manager deduplicates the newer incident into the existing incident. *

* *

* By default, Incident Manager automatically deduplicates multiple incidents created by the same Amazon * CloudWatch alarm or Amazon EventBridge event. You don't have to enter your own deduplication string to * prevent duplication for these resource types. *

*/ public String getDedupeString() { return this.dedupeString; } /** *

* The string Incident Manager uses to prevent the same root cause from creating multiple incidents in the same * account. *

*

* A deduplication string is a term or phrase the system uses to check for duplicate incidents. If you specify a * deduplication string, Incident Manager searches for open incidents that contain the same string in the * dedupeString field when it creates the incident. If a duplicate is detected, Incident Manager * deduplicates the newer incident into the existing incident. *

* *

* By default, Incident Manager automatically deduplicates multiple incidents created by the same Amazon CloudWatch * alarm or Amazon EventBridge event. You don't have to enter your own deduplication string to prevent duplication * for these resource types. *

*
* * @param dedupeString * The string Incident Manager uses to prevent the same root cause from creating multiple incidents in the * same account.

*

* A deduplication string is a term or phrase the system uses to check for duplicate incidents. If you * specify a deduplication string, Incident Manager searches for open incidents that contain the same string * in the dedupeString field when it creates the incident. If a duplicate is detected, Incident * Manager deduplicates the newer incident into the existing incident. *

* *

* By default, Incident Manager automatically deduplicates multiple incidents created by the same Amazon * CloudWatch alarm or Amazon EventBridge event. You don't have to enter your own deduplication string to * prevent duplication for these resource types. *

* @return Returns a reference to this object so that method calls can be chained together. */ public IncidentTemplate withDedupeString(String dedupeString) { setDedupeString(dedupeString); return this; } /** *

* The impact of the incident on your customers and applications. *

*

* Supported impact codes *

*
    *
  • *

    * 1 - Critical *

    *
  • *
  • *

    * 2 - High *

    *
  • *
  • *

    * 3 - Medium *

    *
  • *
  • *

    * 4 - Low *

    *
  • *
  • *

    * 5 - No Impact *

    *
  • *
* * @param impact * The impact of the incident on your customers and applications.

*

* Supported impact codes *

*
    *
  • *

    * 1 - Critical *

    *
  • *
  • *

    * 2 - High *

    *
  • *
  • *

    * 3 - Medium *

    *
  • *
  • *

    * 4 - Low *

    *
  • *
  • *

    * 5 - No Impact *

    *
  • */ public void setImpact(Integer impact) { this.impact = impact; } /** *

    * The impact of the incident on your customers and applications. *

    *

    * Supported impact codes *

    *
      *
    • *

      * 1 - Critical *

      *
    • *
    • *

      * 2 - High *

      *
    • *
    • *

      * 3 - Medium *

      *
    • *
    • *

      * 4 - Low *

      *
    • *
    • *

      * 5 - No Impact *

      *
    • *
    * * @return The impact of the incident on your customers and applications.

    *

    * Supported impact codes *

    *
      *
    • *

      * 1 - Critical *

      *
    • *
    • *

      * 2 - High *

      *
    • *
    • *

      * 3 - Medium *

      *
    • *
    • *

      * 4 - Low *

      *
    • *
    • *

      * 5 - No Impact *

      *
    • */ public Integer getImpact() { return this.impact; } /** *

      * The impact of the incident on your customers and applications. *

      *

      * Supported impact codes *

      *
        *
      • *

        * 1 - Critical *

        *
      • *
      • *

        * 2 - High *

        *
      • *
      • *

        * 3 - Medium *

        *
      • *
      • *

        * 4 - Low *

        *
      • *
      • *

        * 5 - No Impact *

        *
      • *
      * * @param impact * The impact of the incident on your customers and applications.

      *

      * 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 IncidentTemplate withImpact(Integer impact) { setImpact(impact); return this; } /** *

        * Tags to assign to the template. When the StartIncident API action is called, Incident Manager * assigns the tags specified in the template to the incident. *

        * * @return Tags to assign to the template. When the StartIncident API action is called, Incident * Manager assigns the tags specified in the template to the incident. */ public java.util.Map getIncidentTags() { return incidentTags; } /** *

        * Tags to assign to the template. When the StartIncident API action is called, Incident Manager * assigns the tags specified in the template to the incident. *

        * * @param incidentTags * Tags to assign to the template. When the StartIncident API action is called, Incident Manager * assigns the tags specified in the template to the incident. */ public void setIncidentTags(java.util.Map incidentTags) { this.incidentTags = incidentTags; } /** *

        * Tags to assign to the template. When the StartIncident API action is called, Incident Manager * assigns the tags specified in the template to the incident. *

        * * @param incidentTags * Tags to assign to the template. When the StartIncident API action is called, Incident Manager * assigns the tags specified in the template to the incident. * @return Returns a reference to this object so that method calls can be chained together. */ public IncidentTemplate withIncidentTags(java.util.Map incidentTags) { setIncidentTags(incidentTags); return this; } /** * Add a single IncidentTags entry * * @see IncidentTemplate#withIncidentTags * @returns a reference to this object so that method calls can be chained together. */ public IncidentTemplate addIncidentTagsEntry(String key, String value) { if (null == this.incidentTags) { this.incidentTags = new java.util.HashMap(); } if (this.incidentTags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.incidentTags.put(key, value); return this; } /** * Removes all the entries added into IncidentTags. * * @return Returns a reference to this object so that method calls can be chained together. */ public IncidentTemplate clearIncidentTagsEntries() { this.incidentTags = null; return this; } /** *

        * The Amazon SNS targets that are notified when updates are made to an incident. *

        * * @return The Amazon SNS targets that are notified when updates are made to an incident. */ public java.util.List getNotificationTargets() { return notificationTargets; } /** *

        * The Amazon SNS targets that are notified when updates are made to an incident. *

        * * @param notificationTargets * The Amazon SNS targets that are notified when updates are made to an incident. */ public void setNotificationTargets(java.util.Collection notificationTargets) { if (notificationTargets == null) { this.notificationTargets = null; return; } this.notificationTargets = new java.util.ArrayList(notificationTargets); } /** *

        * The Amazon SNS targets that are notified when updates are made to an incident. *

        *

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

        * * @param notificationTargets * The Amazon SNS targets that are notified when updates are made to an incident. * @return Returns a reference to this object so that method calls can be chained together. */ public IncidentTemplate withNotificationTargets(NotificationTargetItem... notificationTargets) { if (this.notificationTargets == null) { setNotificationTargets(new java.util.ArrayList(notificationTargets.length)); } for (NotificationTargetItem ele : notificationTargets) { this.notificationTargets.add(ele); } return this; } /** *

        * The Amazon SNS targets that are notified when updates are made to an incident. *

        * * @param notificationTargets * The Amazon SNS targets that are notified when updates are made to an incident. * @return Returns a reference to this object so that method calls can be chained together. */ public IncidentTemplate withNotificationTargets(java.util.Collection notificationTargets) { setNotificationTargets(notificationTargets); return this; } /** *

        * The summary of the incident. The summary is a brief synopsis of what occurred, what's currently happening, and * context. *

        * * @param summary * The summary of the incident. The summary is a brief synopsis of what occurred, what's currently happening, * and context. */ public void setSummary(String summary) { this.summary = summary; } /** *

        * The summary of the incident. The summary is a brief synopsis of what occurred, what's currently happening, and * context. *

        * * @return The summary of the incident. The summary is a brief synopsis of what occurred, what's currently * happening, and context. */ public String getSummary() { return this.summary; } /** *

        * The summary of the incident. The summary is a brief synopsis of what occurred, what's currently happening, and * context. *

        * * @param summary * The summary of the incident. The summary is a brief synopsis of what occurred, what's currently happening, * and context. * @return Returns a reference to this object so that method calls can be chained together. */ public IncidentTemplate withSummary(String summary) { setSummary(summary); return this; } /** *

        * The title of the incident. *

        * * @param title * The title of the incident. */ public void setTitle(String title) { this.title = title; } /** *

        * The title of the incident. *

        * * @return The title of the incident. */ public String getTitle() { return this.title; } /** *

        * The title of the incident. *

        * * @param title * The title of the incident. * @return Returns a reference to this object so that method calls can be chained together. */ public IncidentTemplate withTitle(String title) { setTitle(title); 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 (getDedupeString() != null) sb.append("DedupeString: ").append(getDedupeString()).append(","); if (getImpact() != null) sb.append("Impact: ").append(getImpact()).append(","); if (getIncidentTags() != null) sb.append("IncidentTags: ").append(getIncidentTags()).append(","); if (getNotificationTargets() != null) sb.append("NotificationTargets: ").append(getNotificationTargets()).append(","); if (getSummary() != null) sb.append("Summary: ").append(getSummary()).append(","); if (getTitle() != null) sb.append("Title: ").append(getTitle()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof IncidentTemplate == false) return false; IncidentTemplate other = (IncidentTemplate) obj; if (other.getDedupeString() == null ^ this.getDedupeString() == null) return false; if (other.getDedupeString() != null && other.getDedupeString().equals(this.getDedupeString()) == 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.getIncidentTags() == null ^ this.getIncidentTags() == null) return false; if (other.getIncidentTags() != null && other.getIncidentTags().equals(this.getIncidentTags()) == false) return false; if (other.getNotificationTargets() == null ^ this.getNotificationTargets() == null) return false; if (other.getNotificationTargets() != null && other.getNotificationTargets().equals(this.getNotificationTargets()) == false) return false; if (other.getSummary() == null ^ this.getSummary() == null) return false; if (other.getSummary() != null && other.getSummary().equals(this.getSummary()) == false) return false; if (other.getTitle() == null ^ this.getTitle() == null) return false; if (other.getTitle() != null && other.getTitle().equals(this.getTitle()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDedupeString() == null) ? 0 : getDedupeString().hashCode()); hashCode = prime * hashCode + ((getImpact() == null) ? 0 : getImpact().hashCode()); hashCode = prime * hashCode + ((getIncidentTags() == null) ? 0 : getIncidentTags().hashCode()); hashCode = prime * hashCode + ((getNotificationTargets() == null) ? 0 : getNotificationTargets().hashCode()); hashCode = prime * hashCode + ((getSummary() == null) ? 0 : getSummary().hashCode()); hashCode = prime * hashCode + ((getTitle() == null) ? 0 : getTitle().hashCode()); return hashCode; } @Override public IncidentTemplate clone() { try { return (IncidentTemplate) 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.IncidentTemplateMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy