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

com.amazonaws.services.ssmcontacts.model.Plan Maven / Gradle / Ivy

/*
 * 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;

/**
 * 

* Information about the stages and on-call rotation teams associated with an escalation plan or engagement plan. *

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

* A list of stages that the escalation plan or engagement plan uses to engage contacts and contact methods. *

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

* The Amazon Resource Names (ARNs) of the on-call rotations associated with the plan. *

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

* A list of stages that the escalation plan or engagement plan uses to engage contacts and contact methods. *

* * @return A list of stages that the escalation plan or engagement plan uses to engage contacts and contact methods. */ public java.util.List getStages() { return stages; } /** *

* A list of stages that the escalation plan or engagement plan uses to engage contacts and contact methods. *

* * @param stages * A list of stages that the escalation plan or engagement plan uses to engage contacts and contact methods. */ public void setStages(java.util.Collection stages) { if (stages == null) { this.stages = null; return; } this.stages = new java.util.ArrayList(stages); } /** *

* A list of stages that the escalation plan or engagement plan uses to engage contacts and contact methods. *

*

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

* * @param stages * A list of stages that the escalation plan or engagement plan uses to engage contacts and contact methods. * @return Returns a reference to this object so that method calls can be chained together. */ public Plan withStages(Stage... stages) { if (this.stages == null) { setStages(new java.util.ArrayList(stages.length)); } for (Stage ele : stages) { this.stages.add(ele); } return this; } /** *

* A list of stages that the escalation plan or engagement plan uses to engage contacts and contact methods. *

* * @param stages * A list of stages that the escalation plan or engagement plan uses to engage contacts and contact methods. * @return Returns a reference to this object so that method calls can be chained together. */ public Plan withStages(java.util.Collection stages) { setStages(stages); return this; } /** *

* The Amazon Resource Names (ARNs) of the on-call rotations associated with the plan. *

* * @return The Amazon Resource Names (ARNs) of the on-call rotations associated with the plan. */ public java.util.List getRotationIds() { return rotationIds; } /** *

* The Amazon Resource Names (ARNs) of the on-call rotations associated with the plan. *

* * @param rotationIds * The Amazon Resource Names (ARNs) of the on-call rotations associated with the plan. */ public void setRotationIds(java.util.Collection rotationIds) { if (rotationIds == null) { this.rotationIds = null; return; } this.rotationIds = new java.util.ArrayList(rotationIds); } /** *

* The Amazon Resource Names (ARNs) of the on-call rotations associated with the plan. *

*

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

* * @param rotationIds * The Amazon Resource Names (ARNs) of the on-call rotations associated with the plan. * @return Returns a reference to this object so that method calls can be chained together. */ public Plan withRotationIds(String... rotationIds) { if (this.rotationIds == null) { setRotationIds(new java.util.ArrayList(rotationIds.length)); } for (String ele : rotationIds) { this.rotationIds.add(ele); } return this; } /** *

* The Amazon Resource Names (ARNs) of the on-call rotations associated with the plan. *

* * @param rotationIds * The Amazon Resource Names (ARNs) of the on-call rotations associated with the plan. * @return Returns a reference to this object so that method calls can be chained together. */ public Plan withRotationIds(java.util.Collection rotationIds) { setRotationIds(rotationIds); 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 (getStages() != null) sb.append("Stages: ").append(getStages()).append(","); if (getRotationIds() != null) sb.append("RotationIds: ").append(getRotationIds()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Plan == false) return false; Plan other = (Plan) obj; if (other.getStages() == null ^ this.getStages() == null) return false; if (other.getStages() != null && other.getStages().equals(this.getStages()) == false) return false; if (other.getRotationIds() == null ^ this.getRotationIds() == null) return false; if (other.getRotationIds() != null && other.getRotationIds().equals(this.getRotationIds()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStages() == null) ? 0 : getStages().hashCode()); hashCode = prime * hashCode + ((getRotationIds() == null) ? 0 : getRotationIds().hashCode()); return hashCode; } @Override public Plan clone() { try { return (Plan) 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.PlanMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy