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

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

Go to download

The AWS Java SDK for AWS Systems Manager Incident Manager Contacts module holds the client classes that are used for communicating with AWS Systems Manager Incident Manager Contacts Service

The 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.ssmcontacts.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Information about a rotation in an on-call schedule. *

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

* The Amazon Resource Name (ARN) of the rotation. *

*/ private String rotationArn; /** *

* The name of the rotation. *

*/ private String name; /** *

* The Amazon Resource Names (ARNs) of the contacts assigned to the rotation team. *

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

* The date and time the rotation becomes active. *

*/ private java.util.Date startTime; /** *

* The time zone the rotation’s activity is based on, in Internet Assigned Numbers Authority (IANA) format. For * example: "America/Los_Angeles", "UTC", or "Asia/Seoul". *

*/ private String timeZoneId; /** *

* Information about when an on-call rotation is in effect and how long the rotation period lasts. *

*/ private RecurrenceSettings recurrence; /** *

* The Amazon Resource Name (ARN) of the rotation. *

* * @param rotationArn * The Amazon Resource Name (ARN) of the rotation. */ public void setRotationArn(String rotationArn) { this.rotationArn = rotationArn; } /** *

* The Amazon Resource Name (ARN) of the rotation. *

* * @return The Amazon Resource Name (ARN) of the rotation. */ public String getRotationArn() { return this.rotationArn; } /** *

* The Amazon Resource Name (ARN) of the rotation. *

* * @param rotationArn * The Amazon Resource Name (ARN) of the rotation. * @return Returns a reference to this object so that method calls can be chained together. */ public Rotation withRotationArn(String rotationArn) { setRotationArn(rotationArn); return this; } /** *

* The name of the rotation. *

* * @param name * The name of the rotation. */ public void setName(String name) { this.name = name; } /** *

* The name of the rotation. *

* * @return The name of the rotation. */ public String getName() { return this.name; } /** *

* The name of the rotation. *

* * @param name * The name of the rotation. * @return Returns a reference to this object so that method calls can be chained together. */ public Rotation withName(String name) { setName(name); return this; } /** *

* The Amazon Resource Names (ARNs) of the contacts assigned to the rotation team. *

* * @return The Amazon Resource Names (ARNs) of the contacts assigned to the rotation team. */ public java.util.List getContactIds() { return contactIds; } /** *

* The Amazon Resource Names (ARNs) of the contacts assigned to the rotation team. *

* * @param contactIds * The Amazon Resource Names (ARNs) of the contacts assigned to the rotation team. */ public void setContactIds(java.util.Collection contactIds) { if (contactIds == null) { this.contactIds = null; return; } this.contactIds = new java.util.ArrayList(contactIds); } /** *

* The Amazon Resource Names (ARNs) of the contacts assigned to the rotation team. *

*

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

* * @param contactIds * The Amazon Resource Names (ARNs) of the contacts assigned to the rotation team. * @return Returns a reference to this object so that method calls can be chained together. */ public Rotation withContactIds(String... contactIds) { if (this.contactIds == null) { setContactIds(new java.util.ArrayList(contactIds.length)); } for (String ele : contactIds) { this.contactIds.add(ele); } return this; } /** *

* The Amazon Resource Names (ARNs) of the contacts assigned to the rotation team. *

* * @param contactIds * The Amazon Resource Names (ARNs) of the contacts assigned to the rotation team. * @return Returns a reference to this object so that method calls can be chained together. */ public Rotation withContactIds(java.util.Collection contactIds) { setContactIds(contactIds); return this; } /** *

* The date and time the rotation becomes active. *

* * @param startTime * The date and time the rotation becomes active. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** *

* The date and time the rotation becomes active. *

* * @return The date and time the rotation becomes active. */ public java.util.Date getStartTime() { return this.startTime; } /** *

* The date and time the rotation becomes active. *

* * @param startTime * The date and time the rotation becomes active. * @return Returns a reference to this object so that method calls can be chained together. */ public Rotation withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** *

* The time zone the rotation’s activity is based on, in Internet Assigned Numbers Authority (IANA) format. For * example: "America/Los_Angeles", "UTC", or "Asia/Seoul". *

* * @param timeZoneId * The time zone the rotation’s activity is based on, in Internet Assigned Numbers Authority (IANA) format. * For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". */ public void setTimeZoneId(String timeZoneId) { this.timeZoneId = timeZoneId; } /** *

* The time zone the rotation’s activity is based on, in Internet Assigned Numbers Authority (IANA) format. For * example: "America/Los_Angeles", "UTC", or "Asia/Seoul". *

* * @return The time zone the rotation’s activity is based on, in Internet Assigned Numbers Authority (IANA) format. * For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". */ public String getTimeZoneId() { return this.timeZoneId; } /** *

* The time zone the rotation’s activity is based on, in Internet Assigned Numbers Authority (IANA) format. For * example: "America/Los_Angeles", "UTC", or "Asia/Seoul". *

* * @param timeZoneId * The time zone the rotation’s activity is based on, in Internet Assigned Numbers Authority (IANA) format. * For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". * @return Returns a reference to this object so that method calls can be chained together. */ public Rotation withTimeZoneId(String timeZoneId) { setTimeZoneId(timeZoneId); return this; } /** *

* Information about when an on-call rotation is in effect and how long the rotation period lasts. *

* * @param recurrence * Information about when an on-call rotation is in effect and how long the rotation period lasts. */ public void setRecurrence(RecurrenceSettings recurrence) { this.recurrence = recurrence; } /** *

* Information about when an on-call rotation is in effect and how long the rotation period lasts. *

* * @return Information about when an on-call rotation is in effect and how long the rotation period lasts. */ public RecurrenceSettings getRecurrence() { return this.recurrence; } /** *

* Information about when an on-call rotation is in effect and how long the rotation period lasts. *

* * @param recurrence * Information about when an on-call rotation is in effect and how long the rotation period lasts. * @return Returns a reference to this object so that method calls can be chained together. */ public Rotation withRecurrence(RecurrenceSettings recurrence) { setRecurrence(recurrence); 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 (getRotationArn() != null) sb.append("RotationArn: ").append(getRotationArn()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getContactIds() != null) sb.append("ContactIds: ").append(getContactIds()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getTimeZoneId() != null) sb.append("TimeZoneId: ").append(getTimeZoneId()).append(","); if (getRecurrence() != null) sb.append("Recurrence: ").append(getRecurrence()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Rotation == false) return false; Rotation other = (Rotation) obj; if (other.getRotationArn() == null ^ this.getRotationArn() == null) return false; if (other.getRotationArn() != null && other.getRotationArn().equals(this.getRotationArn()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getContactIds() == null ^ this.getContactIds() == null) return false; if (other.getContactIds() != null && other.getContactIds().equals(this.getContactIds()) == 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.getTimeZoneId() == null ^ this.getTimeZoneId() == null) return false; if (other.getTimeZoneId() != null && other.getTimeZoneId().equals(this.getTimeZoneId()) == false) return false; if (other.getRecurrence() == null ^ this.getRecurrence() == null) return false; if (other.getRecurrence() != null && other.getRecurrence().equals(this.getRecurrence()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRotationArn() == null) ? 0 : getRotationArn().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getContactIds() == null) ? 0 : getContactIds().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getTimeZoneId() == null) ? 0 : getTimeZoneId().hashCode()); hashCode = prime * hashCode + ((getRecurrence() == null) ? 0 : getRecurrence().hashCode()); return hashCode; } @Override public Rotation clone() { try { return (Rotation) 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.RotationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy